From: "Catherine S." Date: 2010-10-20T18:06:50+09:00 Subject: Concurrent Ruby webservices from wsdl2ruby Hi, as a ruby-newbie I'm currently stuck with a problem (possibly more problems?) with the setup of an webservice environment on Windows. 1st try: Ruby/wsdl2ruby I've created two webservices from wsdls and I am able to run them 'concurrently', the client - written in C++ with gSoap - is able to connect and get the data. One problem was that I didn't know how to get an entrypoint like "http://:/Path/to/my/webservice?" like it is originally stated in the wsdls, but I used em-proxy to create two transparent proxies in a seperate 'application' to redirect the requests to the webservices (So: another possible cause for the problem I noticed - problem stated below) *** Problem *** When running both webservices and both proxies the system is 'stable' for 2 minutes, then it starts to get stuck. Client is getting problems, webservice-responses delay and are delivered 'clustered' back to client (which is not good for client). With wireshark the communication looks ok, so perhaps a printout-problem (1). Or a thread problem (native/green?)(2)? This is the main problem. While investigating it I noticed with TCPView that there are lots of ports in TIME_WAIT (kept by System process '0'). This seems to be caused by the webservices. Not much data is sent on them (1kb) - another problem. 2nd try: JRuby/wsdl2ruby With the possible thread problem I switched to jruby and ran my applications with this. On TCPView I saw that there are instances of jruby started, finished and simultaneously another port goes to TIME_WAIT. They remain there until my process dies/gets killed. As far as I read, this is 'normal', but I'm not really proud of this ressources usage and until now I didn't find the reason for starting another jruby-instance... I moved my proxies to the webservices application, it's now containing mainthread, 2 proxythreads, 2 webservice-threads and all is started, but problems exist of course still... so, questions: Is the design approach in its basics - wsdl2ruby generated webservices in a multithreaded way and transparent proxies - okay? I would appreciate not to use a whole server (tomcat), but how can I investigate (or solve?) the existing problems? One of my guesses is that webservices gets interrupted while some operations... or the webservices need some 'configuration' data (connect_timeout, recv_timeout - the gsoap-client used something like that)? If it is not okay... are there any other 'easy' approaches for two webservices from wsdl? The environment is just needed for testing, but it is necessary to have it stable/runnable in an acceptable time... so especially setting it up should go fast... Best regards and hoping for good suggestions, CS -- Posted via http://www.ruby-forum.com/.