From: Michael Neumann Date: 2001-12-19T21:34:23+09:00 Subject: [ruby-talk:28899] Re: Best way to do XML-RPC Michael Sullivan wrote: > Hi, > > I'm trying to promote the use of Ruby on a project I'm working on. > Since I'm relatively new with the language, I'd like to hear what > others' thoughts are. From what I've seen and done, I like the language > much better than Perl - can do more easier especially when dealing with > code in an Object Oriented way, too many OOP hoops to jump through to > force Perl to perform OO. > > I was wondering what the various opinions of doing XML-RPC are. I may > have non-Ruby applications connecting to my XML-RPC server such as Perl, > or Java. So a couple of questions/thoughts: > > Should I use a "stand-alone" server or CGI server? Using a CGI or FastCGI server with an Apache server gives you more power/speed and functionality, e.g. SSL encryption using mod_ssl, or password authentification to mention only two. But this depends on what you need. > Why? > > CGI or mod_ruby? FastCGI ! * CGI is too slow, and mod_ruby reaches not the performance of a FastCGI based server. * I don't know the state of mod_ruby if it's stable or not. > What are the benefits and drawbacks of them? Both cannot handle persistent data or database connections, FastCGI can. (I am not sure if mod_ruby can handle it or not). > Should I use SOAP4R? Depends on your usage. There are far more XML-RPC interfaces for other langages available (see www.xmlrpc.com), and they are usually smaller and faster (parsing the XML stuff). > On a related note, is there any way to have a persistent database > connection using mod_ruby? Has anyone done this, or thought about how? > Global variables? Shared memory? With FastCGI this is possible; or using a standalone Ruby (web-)server. > Might a persistent database conenction be one reason why I might want to > use a stand-alone XML-RPC server? The thought of using threads for > multiple incoming connections RPC bothers me a bit, though - I know one > can do this single threaded, but I'm wondering about load and > scalability. If you need real power then use Apache together with FastCGI. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de