Live data from Hacker News

Ruby, Let's Take a Break. I Want To Date Node For a While.

grantmuller.com

31–32 of 32 posts

Re: Ruby, Let's Take a Break. I Want To Date Node For a While.

#31

I don't know, I want to make an HTTP spider and I don't want to have one process per request, so the obvious thing was to use something asynchronous. Still, Python+gevent sounds better than node, so I don't see the advantages of using Javascript for that. What does it get me over Python+gevent, which has a more natural asynchronous programming syntax?

There are also threads, which are typically much easier to program for than an asynchronous system, but will still let you have more than 1 request per process.

I don't know, it seems that greenlets are basically exactly as easy to program with as threads, from a quick skim of the docs.

Re: Ruby, Let's Take a Break. I Want To Date Node For a While.

#32
post #18

Earlier quoted context omitted.

> I don't want to have one process per request, so the obvious thing was to use something asynchronous There's these amazing things called threads you can use too

Why would I do that when 99% of the time is spent waiting on the http call to return?

Because unless you have an unusually high (>1000) concurrency level for your HTTP connections, threads are a more than adequate solution to the problem.
Post reply on HN