[BangPypers] Alternate to XMLRPCServer

2012-01-06 Thread Senthil
Hi All,

I have an xmlRPC standalone server written wholly in python. Now am facing 
problems in scaling the services. The more we start adding features, the 
response gets slower. Is there any alternate server architectures i should 
start thinking of ? This server works on basis of threaded architecture and am 
seeing some complaints about threading in python. Should i be considering 
anything else ?

Please advise.

Thanks.
Senthilkumaran Sundaramurthi.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Alternate to XMLRPCServer

2012-01-06 Thread Balachandran Sivakumar
Hi,

On Fri, Jan 6, 2012 at 2:29 PM, Senthil skksun...@yahoo.co.in wrote:
 Hi All,

 I have an xmlRPC standalone server written wholly in python. Now am facing 
 problems in scaling the services. The more we start adding features, the 
 response gets slower. Is there any alternate server architectures i should 
 start thinking of ? This server works on basis of threaded architecture and 
 am seeing some complaints about threading in python. Should i be considering 
 anything else ?

  It depends on the implementation aspects. I am not very sure
about threads, but for these scenarios, we should ideally be using
reactor/proactor patterns. IIRC, all twisted[1] implementations are
reactors. So, you can switch to twisted. Still proactors are even
better. If you could implement one with Proactors, that should be even
more efficient and scalable. Thanks

[1] Twisted XML-RPC:
http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html

-- 
Thank you
Balachandran Sivakumar

Arise Awake and stop not till the goal is reached.
                                                             - Swami Vivekananda

Mail: benignb...@gmail.com
Blog: http://benignbala.wordpress.com/
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Alternate to XMLRPCServer

2012-01-06 Thread Parth Buch
On Fri, Jan 6, 2012 at 3:02 PM, Balachandran Sivakumar benignb...@gmail.com
 wrote:

 Hi,

 On Fri, Jan 6, 2012 at 2:29 PM, Senthil skksun...@yahoo.co.in wrote:
  Hi All,
 
  I have an xmlRPC standalone server written wholly in python. Now am
 facing problems in scaling the services. The more we start adding features,
 the response gets slower. Is there any alternate server architectures i
 should start thinking of ? This server works on basis of threaded
 architecture and am seeing some complaints about threading in python.
 Should i be considering anything else ?


We had a very simillar problem in our project
https://github.com/FOSSEE/online_test
We circumvent the xmlRPC 2 concurrent sessions problem by making a server
pool. You can check the xmlRPC server pool code in this file
https://github.com/FOSSEE/online_test/blob/master/testapp/code_server.py


   It depends on the implementation aspects. I am not very sure
 about threads, but for these scenarios, we should ideally be using
 reactor/proactor patterns. IIRC, all twisted[1] implementations are
 reactors. So, you can switch to twisted. Still proactors are even
 better. If you could implement one with Proactors, that should be even
 more efficient and scalable. Thanks

 [1] Twisted XML-RPC:
 http://twistedmatrix.com/documents/current/web/howto/xmlrpc.html

 --
 Thank you
 Balachandran Sivakumar

 Arise Awake and stop not till the goal is reached.
  - Swami
 Vivekananda

 Mail: benignb...@gmail.com
 Blog: http://benignbala.wordpress.com/
 ___
 BangPypers mailing list
 BangPypers@python.org
 http://mail.python.org/mailman/listinfo/bangpypers




-- 
Regards
Parth Buch
*http://parthbuch.in*
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Alternate to XMLRPCServer

2012-01-06 Thread Senthil Kumaran
 On Fri, Jan 6, 2012 at 12:59 AM, Senthil skksun...@yahoo.co.in wrote:

  I have an xmlRPC standalone server written wholly in python. Now am facing
  problems in scaling the services. The more we start adding features, the
  response gets slower. Is there any alternate server architectures i should
  start thinking of ? This server works on basis of threaded architecture and
  am seeing some complaints about threading in python. Should i be
  considering anything else ?
 
  Please advise.

As others have advised well, twisted is really suitable candidate for
this. Here is bit of strategy for you if you were to develop your
first application using twisted (if the concept of reactors is new).

- Follow the twisted tutorial right from the finger example.
- At the point in the tutorial were your finger service is going to
  use xmlrpc, try 'fit-in' your requirements logic into that style.

- Once you have small outline of that style of program working for
  multiple parallel connections go head with making your program
  complete.

If you would like to relish in understanding the concepts underlying
twisted, look at the documentation written by dave peticolas. They are
really good.


HTH,
Senthil

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers