6 ms·
Build Your First Real-Time App in Node
- abhisuri97 7y agoNice writeup...but why is this on the front page? Socket.io apps w/a node backend are run-of-the-mill for any CS course dealing with web dev in javascript.
- softfalcon 7y agoI find this comment incredibly condescending. Asking "why is this on the front page?" and "...are run-of-the-mill for any CS course..." after you say "Nice writeup" isn't a compliment. It's a back-handed compliment.
- abhisuri97 7y agoSorry, I didn't mean for it to come off that way. I genuinely meant that it was a good writeup; however, tutorials that make it to the front page (I have noticed) usually have some content that's new/uses some newer or relatively unknown technology. The author definitely has a lot of other more interesting and in-depth writeups e.g. a 3 pt fullstack series on using svelt w/a node backend (https://tahazsh.com/fullstack-app-with-svelte-and-node-part-1 https://tahazsh.com/fullstack-app-with-svelte-and-node-part-...) that barely got attention upon HN submission. It's just surprising that out of that content, this makes it to the frontpage. I'm not faulting the author, I'm just curious as to what insight HN readers got out of this article.
- FunnyLookinHat 7y agoI don't think it's condescending - I clicked the link thinking it was something other than some run of the mill socket.io demo... and then that's exactly what it was. Oh well! :)
- christiansakai 7y agoI generally agree with the commenter here, its really rare to see a tutorial article on the front page of HN (I work in NodeJS fullstack web development)
- jaequery 7y agoI am not certain but I think it might be social voting, where you get all your friends and neighbor to upvote on a thread. But then again HN crowd there are lot of beginning programmers.
- ripley12 7y agoSoftware development is a really big space, people can be experienced in certain areas but not others. I have a CS degree but am largely self-taught when it comes to web development; I found the article useful.
- pickdenis 7y agoNode.js is the opposite of what some people would consider "real time." https://en.wikipedia.org/wiki/Real-time_computing https://en.wikipedia.org/wiki/Real-time_computing
- aikah 7y agoUnfortunately both "realtime" and "systems" have become buzzwords, void of their actual meaning. "Websocket" isn't real time of even close to it.
- claytongulick 7y agoWords take on different meanings in different contexts, and get adopted in different domains all the time - this is how language works. An example - "I'm going to ping Bob to see if he's available" There are innumerable others. Sure, this isn't "real-time" in the context of microcontrollers, and RTOS stuff, but in the web app context, I think it counts.
- goatlover 7y agoRight, but it would be best to stick with accurate technical definitions when discussing technical issues.
- deleted 7y ago[deleted]
- dkarl 7y agoWhat I've learned from years of working with product managers is that anything that is both faster than a day and faster than we've conditioned users to expect can be called "real time." If you switch from generating reports nightly to doing it every four hours, that's "real time reporting."
- jjtheblunt 7y agoWanted to say the same thing, in my case thinking of Sun's ChorusOS and Solaris schedulers and definitions of realtime wrt bounded dispatch latency. I can't believe, even having been a v8 committer ten years ago, that node can make guarantees about response time to events, i.e., bounds on dispatch latency, that are super enthusiastic. I hope I learn there's more to be enthused about.
- codedokode 7y agoPoor cross-browser compatibility. You don't need flexbox and new CSS units to display a page with a single button. Javascript code doesn't handle connection errors and disconnects. The app by itself is completely useless and doesn't use a database or something to persist state, and cannot be used as a base for writing a real app. Node is a poor choice because it forces you to write asynchronous code and it is very inconvenient. Also, it is easy to leak memory in Node and I am not sure whether there are memory profilers for Node with GUI. Also the article doesn't give any explanations, so the only thing it teaches is how to copy the code into the editor.
- dkarras 7y agoFlexbox has been supported pretty much everywhere for many many years. Same goes for the CSS units I could see. Which browsers were you thinking of? Async of Node is a feature, and you can write it like it is sync with async / await these days so there is nothing inconvenient about it (anymore - I used to hate callback hell back in the day).
- blunte 7y ago"real-time" - You keep using that word. I do not think it means what you think it means.
- welder 7y agoYep, he means an interactive websockets app. Title should be corrected to reflect that.
- codebeaker 7y agoI'm on the fence, having done embedded work, I understand the importance of hard-/soft-realtime distinctions. Our technical terms to some extent do need to be gate-kept against having their meanings watered down, but I've seen so many "realtime" browser projects, that I'm afraid we have to accept it has entered into the common vernacular like "serverless" has, in spite of the inaccuracies.
- 52-6F-62 7y agoI think the context is supposed to be "web application for interacting in real-time [as opposed to more-significantly-delayed time]" versus "real-time computing" in spite of the term "real-time application"
- simonbw 7y agoThe term “real-time” generally has a different meaning in the context of web development than in the context of systems programming. A lot of people in these comments seem to be making fun of the author for using the term in a different context than they’re used to.
- blunte 7y agoI know. I was being a little snarky, but I'm also trying to make a point. The problem is that one of the (most commonly accepted, if not official) meanings of "real-time" is a system that guarantees response within a specific time period. Usually this is a pretty small time period. So also using the term to refer to systems where there is actually no limit on the response time creates a problem. If we allow "real-time" to be used to represent anything interactive, then how can we make clear when we're actually talking about a real-time system? Really real-time? Legit real-time?
- marknadal 7y agoGreat resource! For those interested in creating something similar with NodeJS, but not having to write or manage any of the socket or socketio logic yourself, check out this 5min interactive tutorial of ours: https://gun.eco/docs/Todo-Dapp https://gun.eco/docs/Todo-Dapp !
- sealthedeal 7y agoI thought this piece was quite refreshing. The author did a wonderful job writing a technical blog post that was also enjoyable to read. We have been kicking off some of our technical posts at Routefusion, so maybe I am biased towards nice technical writing, but kudos, and congrats to making it to the front page of HN!
- TacticalTable 7y agoFunny anecdote from using Socket.io for the first time several years ago. Some friends and I were building a fairly standard CRUD webapp, and we misunderstood some Socket.io documentation, thinking it handled the session separation under the covers. Instead, when we tried it on a shared server instead of locally, we discovered that any UI action was sent to all users of the site. There was effectively one session that all users shared. We pivoted to a 'Lightweight Collaborative Web Browsing Experience', but couldn't get it working reliably.