Suitable software stacks for simple python web service

Discussion in 'Python' started by Kev Dwyer, Nov 21, 2012.

  1. Kev Dwyer

    Kev Dwyer Guest

    Hello List,

    I have to build a simple web service which will:

    - receive queries from our other servers
    - forward the requests to a third party SOAP service
    - process the response from the third party
    - send the result back to the original requester

    >From the point of view of the requester, this will happen within the scope

    of a single request.

    The data exchanged with the original requester will likely be encoded as
    JSON; the SOAP service will be handled by SUDS.

    The load is likely to be quite light, say a few requests per hour, though
    this may increase in the future.

    Given these requirements, what do you think might be a suitable software
    stack, i.e. webserver and web framework (if a web framework is even
    necessary)?

    Candidates should be compatible with Python2.7, though I'd be happy to
    consider Python 3 if anyone knows of a Python3 SOAP library that has good
    WSDL support.

    Cheers,

    Kev
     
    Kev Dwyer, Nov 21, 2012
    #1
    1. Advertising

  2. Kev Dwyer

    Steve Petrie Guest

    On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:
    > Hello List,
    >
    >
    >
    > I have to build a simple web service which will:
    >
    >
    >
    > - receive queries from our other servers
    >
    > - forward the requests to a third party SOAP service
    >
    > - process the response from the third party
    >
    > - send the result back to the original requester
    >
    >
    >
    > >From the point of view of the requester, this will happen within the scope

    >
    > of a single request.
    >
    >
    >
    > The data exchanged with the original requester will likely be encoded as
    >
    > JSON; the SOAP service will be handled by SUDS.
    >
    >
    >
    > The load is likely to be quite light, say a few requests per hour, though
    >
    > this may increase in the future.
    >
    >
    >
    > Given these requirements, what do you think might be a suitable software
    >
    > stack, i.e. webserver and web framework (if a web framework is even
    >
    > necessary)?
    >
    >
    >
    > Candidates should be compatible with Python2.7, though I'd be happy to
    >
    > consider Python 3 if anyone knows of a Python3 SOAP library that has good
    >
    > WSDL support.
    >
    >
    >
    > Cheers,
    >
    >
    >
    > Kev


    I'm using the Bottle web framework (http://bottlepy.org) to integrate requests and replies originating in a Drupal site, a Beanstream (payment processor) account, and a Salesforce instance.

    Communication with Salesforce is done through the Salesforce Python Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which uses Suds.

    Communication with the Drupal site uses Python's (and PHP's on the Drupal side) native JSON support.

    This is under Python 2.6.8 and Apache 2.2.23 running on an AWS EC2 instance.

    No (major) problems so far, though still in the early stages of this project.

    Steve



    I chose Bottle after trying a few other frameworks because, well, I can't remember exactly why, though thinking back it's probably because of the clarity of Bottle's approach and the simplicity of the documentation.
     
    Steve Petrie, Nov 21, 2012
    #2
    1. Advertising

  3. Kev Dwyer

    Steve Petrie Guest

    On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:
    > Hello List,
    >
    >
    >
    > I have to build a simple web service which will:
    >
    >
    >
    > - receive queries from our other servers
    >
    > - forward the requests to a third party SOAP service
    >
    > - process the response from the third party
    >
    > - send the result back to the original requester
    >
    >
    >
    > >From the point of view of the requester, this will happen within the scope

    >
    > of a single request.
    >
    >
    >
    > The data exchanged with the original requester will likely be encoded as
    >
    > JSON; the SOAP service will be handled by SUDS.
    >
    >
    >
    > The load is likely to be quite light, say a few requests per hour, though
    >
    > this may increase in the future.
    >
    >
    >
    > Given these requirements, what do you think might be a suitable software
    >
    > stack, i.e. webserver and web framework (if a web framework is even
    >
    > necessary)?
    >
    >
    >
    > Candidates should be compatible with Python2.7, though I'd be happy to
    >
    > consider Python 3 if anyone knows of a Python3 SOAP library that has good
    >
    > WSDL support.
    >
    >
    >
    > Cheers,
    >
    >
    >
    > Kev


    I'm using the Bottle web framework (http://bottlepy.org) to integrate requests and replies originating in a Drupal site, a Beanstream (payment processor) account, and a Salesforce instance.

    Communication with Salesforce is done through the Salesforce Python Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which uses Suds.

    Communication with the Drupal site uses Python's (and PHP's on the Drupal side) native JSON support.

    This is under Python 2.6.8 and Apache 2.2.23 running on an AWS EC2 instance.

    No (major) problems so far, though still in the early stages of this project.

    Steve



    I chose Bottle after trying a few other frameworks because, well, I can't remember exactly why, though thinking back it's probably because of the clarity of Bottle's approach and the simplicity of the documentation.
     
    Steve Petrie, Nov 21, 2012
    #3
  4. Kev Dwyer

    Kev Dwyer Guest

    Steve Petrie wrote:

    > On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:
    >> Hello List,
    >>
    >>
    >>
    >> I have to build a simple web service which will:
    >>
    >>
    >>
    >> - receive queries from our other servers
    >>
    >> - forward the requests to a third party SOAP service
    >>
    >> - process the response from the third party
    >>
    >> - send the result back to the original requester
    >>
    >>
    >>
    >> >From the point of view of the requester, this will happen within the
    >> >scope

    >>
    >> of a single request.
    >>
    >>
    >>
    >> The data exchanged with the original requester will likely be encoded as
    >>
    >> JSON; the SOAP service will be handled by SUDS.
    >>
    >>
    >>
    >> The load is likely to be quite light, say a few requests per hour, though
    >>
    >> this may increase in the future.
    >>
    >>
    >>
    >> Given these requirements, what do you think might be a suitable software
    >>
    >> stack, i.e. webserver and web framework (if a web framework is even
    >>
    >> necessary)?
    >>
    >>
    >>
    >> Candidates should be compatible with Python2.7, though I'd be happy to
    >>
    >> consider Python 3 if anyone knows of a Python3 SOAP library that has good
    >>
    >> WSDL support.
    >>
    >>
    >>
    >> Cheers,
    >>
    >>
    >>
    >> Kev

    >
    > I'm using the Bottle web framework (http://bottlepy.org) to integrate
    > requests and replies originating in a Drupal site, a Beanstream (payment
    > processor) account, and a Salesforce instance.
    >
    > Communication with Salesforce is done through the Salesforce Python
    > Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which uses
    > Suds.
    >
    > Communication with the Drupal site uses Python's (and PHP's on the Drupal
    > side) native JSON support.
    >
    > This is under Python 2.6.8 and Apache 2.2.23 running on an AWS EC2
    > instance.
    >
    > No (major) problems so far, though still in the early stages of this
    > project.
    >
    > Steve
    >
    >
    >
    > I chose Bottle after trying a few other frameworks because, well, I can't
    > remember exactly why, though thinking back it's probably because of the
    > clarity of Bottle's approach and the simplicity of the documentation.



    Hello Steve,

    Thanks for your comment.

    I'm curious, did you consider any web servers other than Apache?

    Kev
     
    Kev Dwyer, Nov 22, 2012
    #4
  5. Kev Dwyer

    Steve Petrie Guest

    On Thursday, November 22, 2012 1:42:42 AM UTC-5, Kev Dwyer wrote:
    > Steve Petrie wrote:
    >
    >
    >
    > > On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:

    >
    > >> Hello List,

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> I have to build a simple web service which will:

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> - receive queries from our other servers

    >
    > >>

    >
    > >> - forward the requests to a third party SOAP service

    >
    > >>

    >
    > >> - process the response from the third party

    >
    > >>

    >
    > >> - send the result back to the original requester

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> >From the point of view of the requester, this will happen within the

    >
    > >> >scope

    >
    > >>

    >
    > >> of a single request.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> The data exchanged with the original requester will likely be encoded as

    >
    > >>

    >
    > >> JSON; the SOAP service will be handled by SUDS.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> The load is likely to be quite light, say a few requests per hour, though

    >
    > >>

    >
    > >> this may increase in the future.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Given these requirements, what do you think might be a suitable software

    >
    > >>

    >
    > >> stack, i.e. webserver and web framework (if a web framework is even

    >
    > >>

    >
    > >> necessary)?

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Candidates should be compatible with Python2.7, though I'd be happy to

    >
    > >>

    >
    > >> consider Python 3 if anyone knows of a Python3 SOAP library that has good

    >
    > >>

    >
    > >> WSDL support.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Cheers,

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Kev

    >
    > >

    >
    > > I'm using the Bottle web framework (http://bottlepy.org) to integrate

    >
    > > requests and replies originating in a Drupal site, a Beanstream (payment

    >
    > > processor) account, and a Salesforce instance.

    >
    > >

    >
    > > Communication with Salesforce is done through the Salesforce Python

    >
    > > Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which uses

    >
    > > Suds.

    >
    > >

    >
    > > Communication with the Drupal site uses Python's (and PHP's on the Drupal

    >
    > > side) native JSON support.

    >
    > >

    >
    > > This is under Python 2.6.8 and Apache 2.2.23 running on an AWS EC2

    >
    > > instance.

    >
    > >

    >
    > > No (major) problems so far, though still in the early stages of this

    >
    > > project.

    >
    > >

    >
    > > Steve

    >
    > >

    >
    > >

    >
    > >

    >
    > > I chose Bottle after trying a few other frameworks because, well, I can't

    >
    > > remember exactly why, though thinking back it's probably because of the

    >
    > > clarity of Bottle's approach and the simplicity of the documentation.

    >
    >
    >
    >
    >
    > Hello Steve,
    >
    >
    >
    > Thanks for your comment.
    >
    >
    >
    > I'm curious, did you consider any web servers other than Apache?
    >
    >
    >
    > Kev


    You're telling me that there are other web servers? ;)

    I didn't try any others seriously, no. My experience is with Apache and IIS, and I try to stay away from Windows.

    I should mention, given Dieter Maurer's comment, that Bottle is a (fairly thin) layer built over WSGI. I've built applications directly over WSGI as well; that's another way to go, it's quite straightforward. mod_python is no longer supported: http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-officially.html.
     
    Steve Petrie, Nov 24, 2012
    #5
  6. Kev Dwyer

    Steve Petrie Guest

    On Thursday, November 22, 2012 1:42:42 AM UTC-5, Kev Dwyer wrote:
    > Steve Petrie wrote:
    >
    >
    >
    > > On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:

    >
    > >> Hello List,

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> I have to build a simple web service which will:

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> - receive queries from our other servers

    >
    > >>

    >
    > >> - forward the requests to a third party SOAP service

    >
    > >>

    >
    > >> - process the response from the third party

    >
    > >>

    >
    > >> - send the result back to the original requester

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> >From the point of view of the requester, this will happen within the

    >
    > >> >scope

    >
    > >>

    >
    > >> of a single request.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> The data exchanged with the original requester will likely be encoded as

    >
    > >>

    >
    > >> JSON; the SOAP service will be handled by SUDS.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> The load is likely to be quite light, say a few requests per hour, though

    >
    > >>

    >
    > >> this may increase in the future.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Given these requirements, what do you think might be a suitable software

    >
    > >>

    >
    > >> stack, i.e. webserver and web framework (if a web framework is even

    >
    > >>

    >
    > >> necessary)?

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Candidates should be compatible with Python2.7, though I'd be happy to

    >
    > >>

    >
    > >> consider Python 3 if anyone knows of a Python3 SOAP library that has good

    >
    > >>

    >
    > >> WSDL support.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Cheers,

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Kev

    >
    > >

    >
    > > I'm using the Bottle web framework (http://bottlepy.org) to integrate

    >
    > > requests and replies originating in a Drupal site, a Beanstream (payment

    >
    > > processor) account, and a Salesforce instance.

    >
    > >

    >
    > > Communication with Salesforce is done through the Salesforce Python

    >
    > > Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which uses

    >
    > > Suds.

    >
    > >

    >
    > > Communication with the Drupal site uses Python's (and PHP's on the Drupal

    >
    > > side) native JSON support.

    >
    > >

    >
    > > This is under Python 2.6.8 and Apache 2.2.23 running on an AWS EC2

    >
    > > instance.

    >
    > >

    >
    > > No (major) problems so far, though still in the early stages of this

    >
    > > project.

    >
    > >

    >
    > > Steve

    >
    > >

    >
    > >

    >
    > >

    >
    > > I chose Bottle after trying a few other frameworks because, well, I can't

    >
    > > remember exactly why, though thinking back it's probably because of the

    >
    > > clarity of Bottle's approach and the simplicity of the documentation.

    >
    >
    >
    >
    >
    > Hello Steve,
    >
    >
    >
    > Thanks for your comment.
    >
    >
    >
    > I'm curious, did you consider any web servers other than Apache?
    >
    >
    >
    > Kev


    You're telling me that there are other web servers? ;)

    I didn't try any others seriously, no. My experience is with Apache and IIS, and I try to stay away from Windows.

    I should mention, given Dieter Maurer's comment, that Bottle is a (fairly thin) layer built over WSGI. I've built applications directly over WSGI as well; that's another way to go, it's quite straightforward. mod_python is no longer supported: http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-officially.html.
     
    Steve Petrie, Nov 24, 2012
    #6
  7. Kev Dwyer

    Kev Dwyer Guest

    Steve Petrie wrote:

    > On Thursday, November 22, 2012 1:42:42 AM UTC-5, Kev Dwyer wrote:
    >> Steve Petrie wrote:
    >>
    >>
    >>
    >> > On Wednesday, November 21, 2012 2:32:40 AM UTC-5, Kev Dwyer wrote:

    >>
    >> >> Hello List,

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> I have to build a simple web service which will:

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> - receive queries from our other servers

    >>
    >> >>

    >>
    >> >> - forward the requests to a third party SOAP service

    >>
    >> >>

    >>
    >> >> - process the response from the third party

    >>
    >> >>

    >>
    >> >> - send the result back to the original requester

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> >From the point of view of the requester, this will happen within the

    >>
    >> >> >scope

    >>
    >> >>

    >>
    >> >> of a single request.

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> The data exchanged with the original requester will likely be encoded
    >> >> as

    >>
    >> >>

    >>
    >> >> JSON; the SOAP service will be handled by SUDS.

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> The load is likely to be quite light, say a few requests per hour,
    >> >> though

    >>
    >> >>

    >>
    >> >> this may increase in the future.

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> Given these requirements, what do you think might be a suitable
    >> >> software

    >>
    >> >>

    >>
    >> >> stack, i.e. webserver and web framework (if a web framework is even

    >>
    >> >>

    >>
    >> >> necessary)?

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> Candidates should be compatible with Python2.7, though I'd be happy to

    >>
    >> >>

    >>
    >> >> consider Python 3 if anyone knows of a Python3 SOAP library that has
    >> >> good

    >>
    >> >>

    >>
    >> >> WSDL support.

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> Cheers,

    >>
    >> >>

    >>
    >> >>

    >>
    >> >>

    >>
    >> >> Kev

    >>
    >> >

    >>
    >> > I'm using the Bottle web framework (http://bottlepy.org) to integrate

    >>
    >> > requests and replies originating in a Drupal site, a Beanstream
    >> > (payment

    >>
    >> > processor) account, and a Salesforce instance.

    >>
    >> >

    >>
    >> > Communication with Salesforce is done through the Salesforce Python

    >>
    >> > Toolkit (http://code.google.com/p/salesforce-python-toolkit/), which
    >> > uses

    >>
    >> > Suds.

    >>
    >> >

    >>
    >> > Communication with the Drupal site uses Python's (and PHP's on the
    >> > Drupal

    >>
    >> > side) native JSON support.

    >>
    >> >

    >>
    >> > This is under Python 2.6.8 and Apache 2.2.23 running on an AWS EC2

    >>
    >> > instance.

    >>
    >> >

    >>
    >> > No (major) problems so far, though still in the early stages of this

    >>
    >> > project.

    >>
    >> >

    >>
    >> > Steve

    >>
    >> >

    >>
    >> >

    >>
    >> >

    >>
    >> > I chose Bottle after trying a few other frameworks because, well, I
    >> > can't

    >>
    >> > remember exactly why, though thinking back it's probably because of the

    >>
    >> > clarity of Bottle's approach and the simplicity of the documentation.

    >>
    >>
    >>
    >>
    >>
    >> Hello Steve,
    >>
    >>
    >>
    >> Thanks for your comment.
    >>
    >>
    >>
    >> I'm curious, did you consider any web servers other than Apache?
    >>
    >>
    >>
    >> Kev

    >
    > You're telling me that there are other web servers? ;)
    >
    > I didn't try any others seriously, no. My experience is with Apache and
    > IIS, and I try to stay away from Windows.
    >
    > I should mention, given Dieter Maurer's comment, that Bottle is a (fairly
    > thin) layer built over WSGI. I've built applications directly over WSGI
    > as well; that's another way to go, it's quite straightforward. mod_python
    > is no longer supported:
    > http://blog.dscpl.com.au/2010/05/modpython-project-soon-to-be-

    officially.html.


    Based on Dieter's comment I'm using Bottle as a framework, with gunicorn
    (behind nginx) as the webserver. Even Bottle is probably overkill for my
    use case, but my time is rather limited, so I'm happy to use an off the
    shelf solution. And I must say, configuring gunicorn and nginx contrasted
    pleasantly with my memories of struggling with httpd.conf :)
     
    Kev Dwyer, Nov 24, 2012
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vanessa T.

    Stacks

    Vanessa T., Oct 8, 2003, in forum: C++
    Replies:
    5
    Views:
    552
    rossum
    Oct 8, 2003
  2. John
    Replies:
    0
    Views:
    1,037
  3. John
    Replies:
    0
    Views:
    1,048
  4. Dieter Maurer
    Replies:
    0
    Views:
    156
    Dieter Maurer
    Nov 22, 2012
  5. Kev Dwyer
    Replies:
    0
    Views:
    160
    Kev Dwyer
    Nov 22, 2012
Loading...

Share This Page