3 ms·
The original motivation was exactly because it was interesting and fun. When we got something working, I benchmarked it on my MacBook Pro and saw 1500 reqs/sec
by imbriaco 17y ago
The original motivation was exactly because it was interesting and fun. When we got something working, I benchmarked it on my MacBook Pro and saw 1500 reqs/sec being handled on a single core. Those benchmarks made it much more real and so I decided to put the extra effort into making it ready for production.
It may or may not be as fast as the FastCGI based C polling service that we had been using, but it's certainly more maintainable. I'd much rather manage three Erlang nodes than the 240 FastCGI processes that we were running.
In fairness, we could have written a threaded poller in C and ended up with the same ease of management, but it would have been a heck of a lot more code.
- jimbokun 17y ago"In fairness, we could have written a threaded poller in C and ended up with the same ease of management, but it would have been a heck of a lot more code." What's the equivalent of Greenspunning when you find yourself trying to duplicate the features of Erlang in some other language? Do you just say "Greenspunning Erlang," or is it only proper to use Greenspunning when the other language is Common Lisp?
- aaronblohowiak 17y agoI don't think that writing a threaded poller in C would be trying to duplicate the features of Erlang. Epoll / kqueue (and historically, poll/select) are in c, made to be used with C. That being said, the 283 lines of 37S application code is impressive to me. It would be fun if they opened up this bit of infrastructure (or at least its functional spec) so we could add it to the programming language shootout. To save you the googling: "GreenSpunning is the ad hoc implementation of domain-independent language features in a language which lacks the feature; it can range from a simple one-line function or macro to the canonical description of GreenSpunning: a "half-assed implementation of half of CommonLisp''. " http://c2.com/cgi-bin/wiki?LevelsOfGreenspunning http://c2.com/cgi-bin/wiki?LevelsOfGreenspunning