开发者

High concurrent request server in ruby

I'm trying to write a simple server that will grab an mp3 file from rackspace cloudfiles, and开发者_StackOverflow社区 stream it to a client over HTTP.

The server must be able to stream to multiple clients simultaneously, however, I'm finding it difficult to come up with a viable solution.

Anyone have some ideas?


There are several servers that might fit you.

  • http://code.macournoyer.com/thin/

    A server based on EventMachine, hence capable of supporting a large number of concurrent and long-running requests without problems. It's currently one of the most widely used servers, as it's fast and frequently updated.

  • http://rainbows.rubyforge.org/

    Rainbows! is an HTTP server for sleepy Rack applications. It is based on Unicorn, but designed to handle applications that expect long request/response times and/or slow clients. For Rack applications not heavily bound by slow external network dependencies, consider Unicorn instead as it simpler and easier to debug.

  • http://unicorn.bogomips.org/

    Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the the request and response in between Unicorn and slow clients.


Another in vogue server solution for high concurrency would be node.js:

http://nodejs.org/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜