From: Michael Sullivan Date: 2001-12-20T06:12:26+09:00 Subject: [ruby-talk:28989] Re: Best way to do XML-RPC Michael, Thanks for the great information. I hadn't considered FastCGI, but it looks like the combination of Apache/FastCGI/Ruby XML-RPC is the best and most flexible way to go. I'm doing an app which will require SSL, and it would be nice to maintain database connections to avoid the overhead of connecting to the database with each request. Thanks again, Mike On Wed, Dec 19, 2001 at 09:34:23PM +0900, Michael Neumann wrote: > 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 -- Michael P. Sullivan Distributed Computing Systems, LLC Cell: 516-429-2080 E-Mail: mps@discomsys.com http://www.discomsys.com/ * UNIX Systems and Database Consulting, Architecture and Management * "Failing to plan, is planning to fail... plan for the worst, hope for the best"