I need to develp a real production webservice with python that will be used by another client application (with an开发者_如何学Pythonother progamming language ) . I mean in real production webservice that this webserivce is will be used on critical environment that failure of the webserivce could cause major problems.
could someone provide /suggest which library to use in order to build such webservice with python ?
I know that python has the built in simpleXMLRPCServer but i don't know its quality and if its apropriate for real production usage .
Python has been used to develop production grade web services. There are numerous framework to do that. (Django, Twisted etc).
You expect certain quality attributes from production grade servers like availability, scalability etc. For mission critical applications, availability becomes important. Your application architecture and development may influence these attributes more than the frameworks that you may use to develop them with. You can plan to provide extensive fault tolerance, redundant systems and various other strategies to improve availability.
This applies to building application with Python framework too.
Twisted is a very good framework to develop networking and web applications. There are other frameworks available in Python too, for example : Tornado etc
You can go through certain twisted docs and also the following blog posts that can help understanding twisted better.
- Twisted in 60 seconds series
- A very good twisted introduction
- I have been exploring twisted basics and have posted a few notes at my blog
Twisted docs:
- http://twistedmatrix.com/documents/10.1.0/web/howto/xmlrpc.html
- Python: deferToThread XMLRPC Server - Twisted - Cherrypy?
- http://nullege.com/codes/search/SimpleXMLRPCServer.SimpleXMLRPCDispatcher/all/1
- http://code.activestate.com/recipes/526625-twisted-xml-rpc-server-with-basic-http-authenticat/
- http://www.artima.com/weblogs/viewpost.jsp?thread=156396
Some projects along this line:
- http://freshmeat.net/projects/python-xmlrpc-server-w-ssl-authentication
Django:
- https://launchpad.net/django-xmlrpc
- http://djangosnippets.org/snippets/2078/
- http://www.drdobbs.com/184405364
- http://www.davidfischer.name/2009/06/django-with-jsonrpc-and-xmlrpc/
Others:
- http://www.f4ntasmic.com/2009/03/simple-xmlrpc-server.html
I hope this helps. :)
精彩评论