4 ms·
Well, most any language you'd use for web will have the capability. I think more pick a language that makes it -easy-.
by lostcolony 6y ago
Well, most any language you'd use for web will have the capability. I think more pick a language that makes it -easy-.
- t-writescode 6y agoRuby doesn't. Python, until recently, didn't.
- zo1 6y agoDoes 10 years ago count as "until recently"? Below is Tornado, an async-based web server. https://github.com/tornadoweb/tornado/tree/branch1.2/tornado https://github.com/tornadoweb/tornado/tree/branch1.2/tornado That's the earliest I could find off the top of my head - But the other comment responding to you found an even earlier one where they mention the "select" feature that was added sometime around 1998 (22 years ago). The twisted async networking library seems to have been released/started at least 13-14 years ago as well. I think we all (myself included) kinda forget or underestimate how old Python really is.
- lostcolony 6y agoRuby does via libraries ( https://github.com/socketry/async https://github.com/socketry/async for instance). Which is my point. Pick a language that makes it easy. Even then, it's a bit misleading; make it so concurrency, in general, is easy and efficient. Async is immaterial if you have green threads or similar (a la Go or Erlang). Point is, you shouldn't risk a model that ends up unnecessarily blocking/synchronizing execution.
- t-writescode 6y agoThis is news to me. Very nice :) Do you have any examples of this being used with Rails? I'm having a bit of trouble finding examples of both Socketry and Rails being used concurrently; and, I will admit, my Rails knowledge is a bit .... intermediate or less.
- lostcolony 6y agoI don't I'm afraid; I've been out of the ecosystem for a while (and was never -that- involved with it).
- Lio 6y agoI'd suggest having a look at Concurrent Ruby[1], it's one of ActiveSupport's dependencies so you get it for "free" in Rails. 1. https://github.com/ruby-concurrency/concurrent-ruby https://github.com/ruby-concurrency/concurrent-ruby
- empthought 6y agoThis is absolutely wrong. https://docs.python.org/release/1.5.2p2/lib/module-select.html https://docs.python.org/release/1.5.2p2/lib/module-select.ht...
- dec0dedab0de 6y agoPython has had multithreading and multiprocessing for quite a while. Plus celery and twisted.
- gregors 6y agoRuby doesn't block other waiting threads on IO https://yehudakatz.com/2010/08/14/threads-in-ruby-enough-already/ https://yehudakatz.com/2010/08/14/threads-in-ruby-enough-alr...