From: "Iñaki Baz Castillo" Date: 2009-01-23T21:12:40+09:00 Subject: Re: Choosing the most appropiate Ruby version and programming model to develop a SIP server 2009/1/23 Brian Candler : > Go back one step. > > You are concerned about performance before you've even written > something. How critical is performance going to be to your finished > product? It's important, but my aim is designing it in a way that it could be scalable by adding more servers in parallel and all of the sharing some resources (storing them in DB for as first approach, using DRB or whatever). There will be a SIP proxy before my server, so the proxy would distribute the requests using some dispatcher algorithm. > If the answer is "very" then maybe Ruby is not the best > platform in the first place. I'd suggest using Erlang instead: it's used > in massive telephony systems, and has extremely good support for > protocol handling. Yes, but I would like to implement it in Ruby due to the easy development it offers. Of course I'll take in count your suggestion. > You'll need to buy Joe Armstrong's Erlang book (pragprog.com), and then > you can make do with the on-line OTP documentation and looking at other > people's code (e.g. mochiweb and yaws, which are HTTP servers). I even > have a vague idea there is an existing Erlang SIP stack you can use. Ah, > here it is: > http://www.stacken.kth.se/project/yxa/ I already know it. However it's a SIP proxy implementation, not a SIP server/B2BUA which is very different. > However, if you have some external requirement which means you *must* > use Ruby, then understand that you may be trading ease of development > against final performance and stability. > Personally, I would start with the simplest possible implementation > (e.g. using gserver.rb to accept incoming TCP connections in Ruby green > threads), and get something working. Once you need to scale up, it > should be pretty easy to refactor to some other model. This is exactly what I'm already doing (gserver and green threads), and this is the reason I would like to migrate to a better and more efficient model. Thanks a lot for your help. -- Iñaki Baz Castillo