Re:Build Your First Real-Time App in Node
by abhisuri97 on Thursday December 05, 2019 @01:55PM
(#21715131)
Nice 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.
Re:Build Your First Real-Time App in Node
by softfalcon on Thursday December 05, 2019 @02:06PM
(#21715265)
I 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.
Re:Build Your First Real-Time App in Node
by abhisuri97 on Thursday December 05, 2019 @02:15PM
(#21715398)
Sorry, 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-...) 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.
Re:Build Your First Real-Time App in Node
by FunnyLookinHat on Thursday December 05, 2019 @03:22PM
(#21716080)
I 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! :)
Re:Build Your First Real-Time App in Node
by christiansakai on Thursday December 05, 2019 @05:00PM
(#21717094)
I 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)
Re:Build Your First Real-Time App in Node
by jaequery on Thursday December 05, 2019 @02:20PM
(#21715453)
I 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.
Re:Build Your First Real-Time App in Node
by tluyben2 on Thursday December 05, 2019 @02:36PM
(#21715634)
When I saw the title, I saw this misery before me where recruiters serve up people like the author to companies looking for ‘realtime system engineers’ just because people put keywords on their linked in and have blog posts which look insightful etc. We all have our skills, but realtime system engineering is not an easy one. Replacing that with something websockets would be better imho.
Re:Build Your First Real-Time App in Node
by dkarl on Thursday December 05, 2019 @04:58PM
(#21717073)
What 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."
Re:Build Your First Real-Time App in Node
by progre on Thursday December 05, 2019 @02:34PM
(#21715613)
Maybe it means "not with the usual latancy of a REST app" in this context. In a prevoius life I did systems that ran on microcontrollers. Back then even having an OS would disqualify you from getting to claim "real time". Everything ran on the interrupts.
Re:Build Your First Real-Time App in Node
by jjtheblunt on Thursday December 05, 2019 @02:30PM
(#21715569)
Wanted 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.
Re:Build Your First Real-Time App in Node
by seangrogg on Thursday December 05, 2019 @03:25PM
(#21716112)
In all fairness, I've heard the use of "real time" applications with respect to chat (websockets) or video (WrbRTC). This is the first time I've been introduced to this definition of real-time computing.
I'd be interested to see how many people are aware of this definition and why there appears to be such a divide in the first place.
Re:Build Your First Real-Time App in Node
by TacticalTable on Thursday December 05, 2019 @04:14PM
(#21716594)
Funny 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.
Re:Build Your First Real-Time App in Node
by simonbw on Thursday December 05, 2019 @04:08PM
(#21716528)
The 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.
Re:Build Your First Real-Time App in Node
by dkarl on Thursday December 05, 2019 @04:41PM
(#21716896)
I think it's worth pointing it out to the author so in the future they can use different terminology that doesn't conflict with existing usage in software development. Some collision in terminology is inevitable, but it's nice to avoid if possible.
I mean, even though I've never done real-time programming and probably never will, I don't treat the term as up for grabs. I like that I know what "real-time" means when I hear it, so I (e.g.) gently steer coworkers towards different terminology every time they try to label something we do "real time."
Re:Build Your First Real-Time App in Node
by tobr on Thursday December 05, 2019 @04:58PM
(#21717069)
So what is the recommended alternative terminology? For example, how would you characterize the type of collaboration that happens in Google Docs, or the type of communication that happens in a chat?
Re:Build Your First Real-Time App in Node
by dkarl on Thursday December 05, 2019 @05:31PM
(#21717394)
I'm not a web developer, so I wouldn't be the best person to ask, but the key aspect is that the server pushes data to the browser as soon as it gets it rather than waiting for it to be requested, right? You could call it "low-latency push" or "low-latency remote interaction" or something like that.
Or you could cut to the chase and call it "websockets." socket.io supports other technologies for ancient browsers, but that's a detail that could be addressed in the post.
Re:Build Your First Real-Time App in Node
by wpietri on Thursday December 05, 2019 @05:20PM
(#21717279)
I think it would be fine to contextualize it as "collaboration". E.g., "real-time collaboration app". You might also say immediate, instant, simultaneous, or live collaboration. Or you could be more specific about the context. Etherpad, for example describes itself as "Etherpad allows you to edit documents collaboratively in real-time, much like a live multi-player editor that runs in your browser."
Re:Build Your First Real-Time App in Node
by blunte on Thursday December 05, 2019 @04:35PM
(#21716830)
I 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?
Re:Build Your First Real-Time App in Node
by pests on Thursday December 05, 2019 @08:02PM
(#21718410)
Real time as you define it isn't even a single concept since we have hard vs soft real time. Maybe this can be called super-soft real time? I jest but the definition is already muddied.
Re:Build Your First Real-Time App in Node
by codebeaker on Thursday December 05, 2019 @03:58PM
(#21716414)
I'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.
Re:Build Your First Real-Time App in Node
by 52-6F-62 on Thursday December 05, 2019 @04:01PM
(#21716449)
I 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"
Re:Build Your First Real-Time App in Node
by marknadal on Thursday December 05, 2019 @03:30PM
(#21716150)
Great 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 !
Re:Build Your First Real-Time App in Node
by codedokode on Thursday December 05, 2019 @02:31PM
(#21715576)
Poor 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.
Re:Build Your First Real-Time App in Node
by dkarras on Thursday December 05, 2019 @02:49PM
(#21715770)
Flexbox 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).
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.
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.
I have a CS degree but am largely self-taught when it comes to web development; I found the article useful.
https://en.wikipedia.org/wiki/Real-time_computing
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.
https://docs.oracle.com/cd/E19455-01/806-4750/chap7rt-21297/...
I'd be interested to see how many people are aware of this definition and why there appears to be such a divide in the first place.
I mean, even though I've never done real-time programming and probably never will, I don't treat the term as up for grabs. I like that I know what "real-time" means when I hear it, so I (e.g.) gently steer coworkers towards different terminology every time they try to label something we do "real time."
Or you could cut to the chase and call it "websockets." socket.io supports other technologies for ancient browsers, but that's a detail that could be addressed in the post.
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?
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.
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 !
Also the article doesn't give any explanations, so the only thing it teaches is how to copy the code into the editor.
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).