News for hackers. Stuff that matters.
Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by azakai on Sunday May 15, 2011 @09:42PM (#2551324)
I'm not sure this is surprising.

People use Python and JS-based webservers not for their performance, but because they like the languages. And those languages were designed not for speed or concurrency but for other things, like expresiveness.

Erlang was designed with performance and concurrency in mind, and if it didn't beat the pants off of Python and JS servers, I'd be shocked.

Not that that means it's the right choice for all things. Performance isn't everything, being able to write code in Python is a good enough reason to use something like Django.

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by j2d2j2d2 on Sunday May 15, 2011 @09:46PM (#2551335)
I agree. It's interesting to see node fans get huffy when Erlang people say, "hey, we're still #1"

But for people who already love JS, node is a dream come true. It's really fast. Not as fast as Erlang, but more than fast enough to justify building massive projects in it. Assuming you are one of those that loves, or believes in, JavaScript...

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by forensic on Sunday May 15, 2011 @11:38PM (#2551541)
Don't you find using callbacks for everything to be a straightjacket?
Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by j2d2j2d2 on Monday May 16, 2011 @12:12AM (#2551615)
Personally, yes. I like to use eventlet in Python partially because of that. Interacting with the scheduler is implicit in eventlet (and gevent, which some prefer) so you write code that looks synchronous.

On top of that, you get nonblocking I/O almost for free, similar to what node attempts to provide, where instead of real nonblocking I/O the system will make blocking I/O look like it's nonblocking. Scala does this too.

But, users of Twisted could also use inLineCallbacks for a similar feel, though it's not required. I'm curious if Node.js could just build the same?

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by stock_toaster on Sunday May 15, 2011 @11:42PM (#2551548)
There are some nice libraries that ease the pain of callbacks to a certain degree.

Async[1] (the waterfall method) and Step[2] come to mind.

[1]: https://github.com/caolan/async

[2]: https://github.com/creationix/step

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by forensic on Monday May 16, 2011 @12:42AM (#2551669)
This pretty much spoils the whole idea that you'll use your clientside JS on the server though, huh?

The callback issue means that client and server are really not running the same language. They sorta look the same I guess.

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by yesbabyyes on Monday May 16, 2011 @09:28AM (#2552443)
I'm not sure about step, but caolan's async is perfectly usable in the browser, as well as in node.

That said, code sharing between browser and server often extends to templating, validation and a few utilities, in my experience. More complex logic is better served with message passing or something like dnode.

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by cbf on Sunday May 15, 2011 @09:46PM (#2551334)
Erlang was not designed with performance in mind. It's only gotten reasonably performant in it's later life.
Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by regularfry on Monday May 16, 2011 @01:29AM (#2551752)
That's not quite fair. Erlang was designed from the start to be very, very fast at process switching and message passing. True, that design took a while to bear fruit, but my understanding (from listening to Joe Armstrong speak about it) is that being able to make the core of the language highly efficient was a goal from the start.
Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by forensic on Monday May 16, 2011 @08:15AM (#2552305)
Trying to make it as efficient as possible is different from the purpose of the language being efficiency.
Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by regularfry on Tuesday May 17, 2011 @08:34AM (#2556137)
Indeed, but in this case both apply.

EDIT: Give this a listen, the early design and development is described in more detail than I'm capable of going into: http://www.se-radio.net/2008/03/episode-89-joe-armstrong-on-...

Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by dons on Sunday May 15, 2011 @11:06PM (#2551479)
Indeed. I'd really like to see the Haskell servers, warp and snap, thrown in, since the infrastructure there was actually built for raw performance.
Re:A benchmark comparison of Node.js, Tornado, and 3 Erlang ... by ozataman on Monday May 16, 2011 @12:03AM (#2551602)
I have put together the code to implement the benchmark using Snap and would be happy to share with anyone willing to boot up the instance and run.

I might do so myself if I find the time tomorrow.