Hacker News new | past | comments | ask | show | jobs | submit login
An XMPP server with Node.js (superfeedr.com)
77 points by julien on Aug 26, 2011 | hide | past | web | favorite | 20 comments



I'll definitely try that out, as I'm not that happy with ejabberd (documentation is awful and erlang is..well.. a little bit weird to me). Does it already support MUC?

Btw. did you see vines? the ruby xmpp server? Sounds also interesting :)


It's amazing how powerful a combination Node and Redis are. What more could you need?


[deleted]


Can you explain please?


all the node.js peeps will be frantically trying to sort out their @node_knockout projects, I hope those that need it see this in time


It would be interesting to see how this stacks up to Ejabbered with say 20k+ concurrent users.


and compared to ejabberd it is, let me guess, slower, unscalable, uses more memory and can handle less simultaneous connections. ^_^


Which only matters when it matters. There's lots of use in having sometging hackable. And who knows where it's heading. So no need for the "it's not as scalable as X hence it's worthless" attitude...


Hear hear! By tossing out that attitude, Node developers have been able to ignore better, more mature codebases like Twisted and Event Machine in favor of hand-rolled event loops built on a slower, less useful language, and the world's definitely better for it.


Since when was Javascript slower and less useful than Python and Ruby? V8 has made JS one of the fastest interpreted languages and it is one of the most used languages around (you're running it right now!). Also, node uses libev for its event loop, not some 'hand-rolled' one.


PyPy's faster than V8 and all of the maintained reactors in Twisted are faster than libev/libevent. Also, no, I block JS by default, and HN is written in Arc (a Lisp), not Node.


I could not find any resource stating that PyPy is faster than V8. May you provide us with your source?

Another thing, the fact that you're blocking JS may counter the "you're running it" example, but as you know, it doesn't invalidate the point that JS in one of the most used languages.


And every time you bank, you use COBOL. You rely on millions of lines of C just to start your computer. You're currently in a web browser written in more C++ than any single site has of JS. (Although I'm sure this last point has a counterexample somewhere, which saddens me.)


There are room for so many different things in the world. Lighten up and accept that sometimes people have different needs, wants and tastes to you.

And X is way more fast/scalable/mature/secure than Twisted and Event Machine for some values of X I'm sure, yet Twisted and Event Machine are still worthwhile and useful things.


Maybe you could provide a few arguments, or better yet : benchmark things :) I have no idea how far this XMPP server can go, how slow it is, but I know that at least 3 orders of magnitude more people on earth can hack on it, debug, provide patches and won't charge insane amounts of money for this :)


ejabberd is free and open software, licensed under the GPL and freely available without charge. I'm not sure where you get "charg[ing] insane amounts of money" from.


That seems cool but it took me a few seconds to realize that their 4th and 5th line of code in the clustering example in the post are identical. I doubt that should be the case. Pretty early it seems.


Jerome, the cluster example is just an example of clustering :) you can run the example/c2s.js for a single node example (which won't even require redis).

Also, the 2 lines are actually different. The node.js lib for redis is a bit weird, so we need both a "pub" client and a "sub" client :)


Sorry about the remark. What a difference a character makes... I suppose it was too late or too early in the day. In any case, your article was quite helpful because I've been using Redis a lot, but not yet the PubSub functions. I've found this approach solves a clustering problem I foresee with a current real-time node project.


pub + sub


Doh! I really need to improve my code reading skills, it seems. Sorry. :-(




Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: