openbabel web service

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

openbabel web service

Christian Meisenbichler-2
Is someone interested in creating an openbabel web service?

Let me explain what I mean by that. I Just recently got convinced by
the idea of software as a service and the practical elegance of
knitting together various parts of software by http requests.
Openbabel as a converter tool would just be perfect for such a
service.

The service would accept a http post request with the file to convert
as post data.  The source and target file format is encoded in the URI
and the request returns the converted file.

As there are already python bindings, a simple python http request
handler that provides this service is something I would quite like to
implement. Question is if there is someone who would be interested to
host such a service? Maybe even as a part of the open babel project?

Motivation of course is that one sometimes wants to use openbabel
functionality but it is for some reason impossible or impractical to
install it or deal with the dependencies. In such an situation the
script or application must only be able to issue an http request. I
think thats utterly elegant.

What do you think?

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Tim Vandermeersch
Hi,

On Tue, Apr 13, 2010 at 2:02 PM, Christian Meisenbichler
<[hidden email]> wrote:

> Is someone interested in creating an openbabel web service?
>
> Let me explain what I mean by that. I Just recently got convinced by
> the idea of software as a service and the practical elegance of
> knitting together various parts of software by http requests.
> Openbabel as a converter tool would just be perfect for such a
> service.
>
> The service would accept a http post request with the file to convert
> as post data.  The source and target file format is encoded in the URI
> and the request returns the converted file.
>
> As there are already python bindings, a simple python http request
> handler that provides this service is something I would quite like to
> implement. Question is if there is someone who would be interested to
> host such a service? Maybe even as a part of the open babel project?

Technically, this isn't hard to implement. The biggest problem
probably is that dedicated hosting (or hosting that allows you to use
c++ programs) is usually expensive. However, you can easily do this on
a (linux) server at home. There are free services which will translate
a dns name to your ip. This is an easy way to play with the concept...
Depending on the usage, the home solution might not be sufficient
though.

You (or we, if there are other developers interested) can always look
for a sponsor to provide hosting later.

> Motivation of course is that one sometimes wants to use openbabel
> functionality but it is for some reason impossible or impractical to
> install it or deal with the dependencies. In such an situation the
> script or application must only be able to issue an http request. I
> think thats utterly elegant.
>
> What do you think?
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Noel O'Boyle
Administrator
In reply to this post by Christian Meisenbichler-2
On 13 April 2010 13:02, Christian Meisenbichler
<[hidden email]> wrote:
> Is someone interested in creating an openbabel web service?

It sounds like you are! :-)

But seriously, it's a great idea. I've never gotten around to doing it
myself, but we really should have one plus a web site frontend. See
how Markus has set up the Chemical Identifier Resolver as a REST-based
webservice (http://cactus.nci.nih.gov/chemical/structure, and his blog
for background). In the past, it has just accepted string formats
(e.g. InChI, SMILES) but going forward it's going to accept files.

If you are planning to do this (and I would encourage you to go
ahead), we can link to it from the wiki and give it a virtual home at
openbabel.org/whatever. Where the actual home goes will depend on the
required resources - if we can get a proof of concept going that would
be the first thing (as Tim says). We can then starting thinking about
how to deploy it for mass use.

> Let me explain what I mean by that. I Just recently got convinced by
> the idea of software as a service and the practical elegance of
> knitting together various parts of software by http requests.
> Openbabel as a converter tool would just be perfect for such a
> service.

Sure - I completely agree. Google "webel cinfony" for an example of a
cheminformatics toolkit that runs only on webservices.

> The service would accept a http post request with the file to convert
> as post data.  The source and target file format is encoded in the URI
> and the request returns the converted file.

> As there are already python bindings, a simple python http request
> handler that provides this service is something I would quite like to
> implement. Question is if there is someone who would be interested to
> host such a service? Maybe even as a part of the open babel project?

> Motivation of course is that one sometimes wants to use openbabel
> functionality but it is for some reason impossible or impractical to
> install it or deal with the dependencies. In such an situation the
> script or application must only be able to issue an http request. I
> think thats utterly elegant.
>
> What do you think?

Bring it on. But do think about the API at least as much as the
technical aspects.

> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Nina Jeliazkova
Noel O'Boyle wrote:
On 13 April 2010 13:02, Christian Meisenbichler
[hidden email] wrote:
  
Is someone interested in creating an openbabel web service?
    

It sounds like you are! :-)

But seriously, it's a great idea. I've never gotten around to doing it
myself, but we really should have one plus a web site frontend. See
how Markus has set up the Chemical Identifier Resolver as a REST-based
webservice (http://cactus.nci.nih.gov/chemical/structure, and his blog
for background). In the past, it has just accepted string formats
(e.g. InChI, SMILES) but going forward it's going to accept files.

If you are planning to do this (and I would encourage you to go
ahead), we can link to it from the wiki and give it a virtual home at
openbabel.org/whatever. Where the actual home goes will depend on the
required resources - if we can get a proof of concept going that would
be the first thing (as Tim says). We can then starting thinking about
how to deploy it for mass use.

  
Let me explain what I mean by that. I Just recently got convinced by
the idea of software as a service and the practical elegance of
knitting together various parts of software by http requests.
Openbabel as a converter tool would just be perfect for such a
service.
    

Sure - I completely agree. Google "webel cinfony" for an example of a
cheminformatics toolkit that runs only on webservices.

  
The service would accept a http post request with the file to convert
as post data.  The source and target file format is encoded in the URI
and the request returns the converted file.
    

  
As there are already python bindings, a simple python http request
handler that provides this service is something I would quite like to
implement. Question is if there is someone who would be interested to
host such a service? Maybe even as a part of the open babel project?
    

  
Motivation of course is that one sometimes wants to use openbabel
functionality but it is for some reason impossible or impractical to
install it or deal with the dependencies. In such an situation the
script or application must only be able to issue an http request. I
think thats utterly elegant.

What do you think?
    

Bring it on. But do think about the API at least as much as the
technical aspects.
  

Regarding the REST API - we are trying to do something similar (although not only format conversions, but various predictions ) in OpenTox  project http://opentox.org/.   The developer's  list is open to everybody.

Best regards,
Nina Jeliazkova

  
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

    

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
  


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Rajarshi Guha-4
In reply to this post by Christian Meisenbichler-2
At one point IU and Cambridge both had services based on OpenBabel. I
think the IU services are still up. They were originally written as
SOAP services (blech!) but may have been updated to REST interfaces

http://www.chembiogrid.org/projects/proj_ws_all.html

On Tue, Apr 13, 2010 at 8:02 AM, Christian Meisenbichler
<[hidden email]> wrote:

> Is someone interested in creating an openbabel web service?
>
> Let me explain what I mean by that. I Just recently got convinced by
> the idea of software as a service and the practical elegance of
> knitting together various parts of software by http requests.
> Openbabel as a converter tool would just be perfect for such a
> service.
>
> The service would accept a http post request with the file to convert
> as post data.  The source and target file format is encoded in the URI
> and the request returns the converted file.
>
> As there are already python bindings, a simple python http request
> handler that provides this service is something I would quite like to
> implement. Question is if there is someone who would be interested to
> host such a service? Maybe even as a part of the open babel project?
>
> Motivation of course is that one sometimes wants to use openbabel
> functionality but it is for some reason impossible or impractical to
> install it or deal with the dependencies. In such an situation the
> script or application must only be able to issue an http request. I
> think thats utterly elegant.
>
> What do you think?
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>



--
Rajarshi Guha
NIH Chemical Genomics Center

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Chris Morley-3
In reply to this post by Christian Meisenbichler-2
Christian Meisenbichler wrote:

> Is someone interested in creating an openbabel web service?
>
> Let me explain what I mean by that. I Just recently got convinced by
> the idea of software as a service and the practical elegance of
> knitting together various parts of software by http requests.
> Openbabel as a converter tool would just be perfect for such a
> service.
>
> The service would accept a http post request with the file to convert
> as post data.  The source and target file format is encoded in the URI
> and the request returns the converted file.
>
> As there are already python bindings, a simple python http request
> handler that provides this service is something I would quite like to
> implement. Question is if there is someone who would be interested to
> host such a service? Maybe even as a part of the open babel project?
>
> Motivation of course is that one sometimes wants to use openbabel
> functionality but it is for some reason impossible or impractical to
> install it or deal with the dependencies. In such an situation the
> script or application must only be able to issue an http request. I
> think thats utterly elegant.
>
> What do you think?

I think it would be a good idea.

There have been several OpenBabel web services. One that is still
going is http://vcclab.org/lab/babel/ There is also webbabel
http://sourceforge.net/projects/webbabel/ which is local but with a
browser interface.

IMHO to be successful the service needs to have a good user interface.
Especially so because it will have a greater proportion of casual
users: it should not require extensive consultation of the
documentation before doing anything. This means that all the formats
and options should be visible to choose from (as in the GUI...of
course). I imagine this could be done by AJAX and the interface would
not need re-writing as OpenBabel developed.

Chris

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Craig James-2
In reply to this post by Christian Meisenbichler-2
On 4/13/10 5:02 AM, Christian Meisenbichler wrote:

> Is someone interested in creating an openbabel web service?
>
> Let me explain what I mean by that. I Just recently got convinced by
> the idea of software as a service and the practical elegance of
> knitting together various parts of software by http requests.
> Openbabel as a converter tool would just be perfect for such a
> service.
>
> The service would accept a http post request with the file to convert
> as post data.  The source and target file format is encoded in the URI
> and the request returns the converted file.
>
> As there are already python bindings, a simple python http request
> handler that provides this service is something I would quite like to
> implement. Question is if there is someone who would be interested to
> host such a service? Maybe even as a part of the open babel project?
>
> Motivation of course is that one sometimes wants to use openbabel
> functionality but it is for some reason impossible or impractical to
> install it or deal with the dependencies. In such an situation the
> script or application must only be able to issue an http request. I
> think thats utterly elegant.
>
> What do you think?

I can probably provide the hosting.  We're already doing a little bit of this with http://depict.emolecules.com/, which is just a very thin front-end for OpenBabels -gen2D service, combined with our GIF generator.  We are  also hosting http://www.opensmiles.org/.

It doesn't have to be exclusive either, it would be nice if there were "mirror" sites that all ran one set of code from the SVN or git repository.

Craig

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Craig James-2
In reply to this post by Christian Meisenbichler-2
One more thing...

On 4/13/10 9:48 AM, Craig A. James wrote:

> On 4/13/10 5:02 AM, Christian Meisenbichler wrote:
>> Is someone interested in creating an openbabel web service?
>>
>> Let me explain what I mean by that. I Just recently got convinced by
>> the idea of software as a service and the practical elegance of
>> knitting together various parts of software by http requests.
>> Openbabel as a converter tool would just be perfect for such a
>> service.
>>
>> The service would accept a http post request with the file to convert
>> as post data. The source and target file format is encoded in the URI
>> and the request returns the converted file.
>>
>> As there are already python bindings, a simple python http request
>> handler that provides this service is something I would quite like to
>> implement. Question is if there is someone who would be interested to
>> host such a service? Maybe even as a part of the open babel project?
>>
>> Motivation of course is that one sometimes wants to use openbabel
>> functionality but it is for some reason impossible or impractical to
>> install it or deal with the dependencies. In such an situation the
>> script or application must only be able to issue an http request. I
>> think thats utterly elegant.
>>
>> What do you think?
>
> I can probably provide the hosting. We're already doing a little bit of
> this with http://depict.emolecules.com/, which is just a very thin
> front-end for OpenBabels -gen2D service, combined with our GIF
> generator. We are also hosting http://www.opensmiles.org/.
>
> It doesn't have to be exclusive either, it would be nice if there were
> "mirror" sites that all ran one set of code from the SVN or git repository.

By the way, we recently added InChI to the list of formats you can use.  For example...

http://depict.emolecules.com/cgi-bin/mymol/depict.cgi?smiles=InChI%3D1S%2FC7H8N2%2Fc8-7%289%296-4-2-1-3-5-6%2Fh1-5H,%28H3,8,9%29&width=400&height=400&colorscheme=cow&format=gif

Craig


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Tim Vandermeersch
In reply to this post by Noel O'Boyle
On Tue, Apr 13, 2010 at 5:27 PM, Noel O'Boyle <[hidden email]> wrote:

> On 13 April 2010 13:02, Christian Meisenbichler
> <[hidden email]> wrote:
>> Is someone interested in creating an openbabel web service?
>
> It sounds like you are! :-)
>
> But seriously, it's a great idea. I've never gotten around to doing it
> myself, but we really should have one plus a web site frontend. See
> how Markus has set up the Chemical Identifier Resolver as a REST-based
> webservice (http://cactus.nci.nih.gov/chemical/structure, and his blog
> for background). In the past, it has just accepted string formats
> (e.g. InChI, SMILES) but going forward it's going to accept files.
>
> If you are planning to do this (and I would encourage you to go
> ahead), we can link to it from the wiki and give it a virtual home at
> openbabel.org/whatever. Where the actual home goes will depend on the
> required resources - if we can get a proof of concept going that would
> be the first thing (as Tim says). We can then starting thinking about
> how to deploy it for mass use.

If you use django, you don't even have to worry about setting up an
http server.. It comes with a http server written in python for
development purposes.

>> Let me explain what I mean by that. I Just recently got convinced by
>> the idea of software as a service and the practical elegance of
>> knitting together various parts of software by http requests.
>> Openbabel as a converter tool would just be perfect for such a
>> service.
>
> Sure - I completely agree. Google "webel cinfony" for an example of a
> cheminformatics toolkit that runs only on webservices.
>
>> The service would accept a http post request with the file to convert
>> as post data.  The source and target file format is encoded in the URI
>> and the request returns the converted file.
>
>> As there are already python bindings, a simple python http request
>> handler that provides this service is something I would quite like to
>> implement. Question is if there is someone who would be interested to
>> host such a service? Maybe even as a part of the open babel project?
>
>> Motivation of course is that one sometimes wants to use openbabel
>> functionality but it is for some reason impossible or impractical to
>> install it or deal with the dependencies. In such an situation the
>> script or application must only be able to issue an http request. I
>> think thats utterly elegant.
>>
>> What do you think?
>
> Bring it on. But do think about the API at least as much as the
> technical aspects.
>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Christian Meisenbichler-2
I did an implementation that  suits my needs.

It is has a http REST API that does _only_ file conversion. No user
interface included or intended.

The python program uses the BaseHTTPRequestHandler module. All used
Modules except for the openbabel are included in the python standard
library.

The service has two features.

1.) A GET request to "http://hostname:<portnumber>/supportedformats"
returns an XML document that lists all supported input and output
formats.

2.) a POST request to
"http://hostname:<portnumber>/?in=<informat>&out=<outformat>" with the
input file as post content, returns the converted file.

To start the service: Simply execute the attached script. The service
listens on port  8071

I hope this is useful. For me it does all I need. Tell me what you think!

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

babelConvertService.py (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Andrew Dalke
On Apr 15, 2010, at 5:04 PM, Christian Meisenbichler wrote:
> I hope this is useful. For me it does all I need. Tell me what you think!

Some comments purely regarding the Python side of things.

If you made it a WSGI interface it would run on more systems, and I think be a bit simpler to write. You can support basic WSGI using the Python standard library.


Instead of
            url=urlparse(self.path)
            params = dict([part.split('=') for part in url[4].split('&')])
you can use
            url=urlparse.urlparse(self.path)
            params = dict(urlparse.parse_psl(url.query)


Did you really mean a 301 response?
            self.send_response(301)


> 10.3.2 301 Moved Permanently
>
> The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.
>
> The new permanent URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

Perhaps you meant a 303?

   http://en.wikipedia.org/wiki/Post/Redirect/Get

but in any case, there's no location so it doesn't seem that useful. What not a regular 200?

Cheers from the self-appointed code reviewer :)


                                Andrew
                                [hidden email]



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Christian Meisenbichler-2
On Thu, Apr 15, 2010 at 6:29 PM, Andrew Dalke <[hidden email]> wrote:

> Some comments purely regarding the Python side of things.
>
> If you made it a WSGI interface it would run on more systems, and I think be a bit simpler to write. You can support basic WSGI using the Python standard library.

>
> Instead of
>            url=urlparse(self.path)
>            params = dict([part.split('=') for part in url[4].split('&')])
> you can use
>            url=urlparse.urlparse(self.path)
>            params = dict(urlparse.parse_psl(url.query)

my urlparse module doesn't have a parse_psl attribute (so it says)

I tried to understand what  WSGI  may mean here. I didn't hear of this
before. Does it mean to have a URL like /convert/informat/outformat ?

I think, I do not see a big advantage for this here. Should I?

[...]
>
> but in any case, there's no location so it doesn't seem that useful. What not a regular 200?
>
Yes, This is a mistake I did overlook.
> Cheers from the self-appointed code reviewer :)
>
Thank you very much
>
>                                Andrew
>                                [hidden email]
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Andrew Dalke
On Apr 15, 2010, at 7:19 PM, Christian Meisenbichler wrote:
>>            params = dict(urlparse.parse_psl(url.query)
>
> my urlparse module doesn't have a parse_psl attribute (so it says)

Grr. Next time I'll copy&paste . It's parse_qsl not pql.

("qsl" here is "parse Query String and return a List")



> I tried to understand what  WSGI  may mean here. I didn't hear of this
> before. Does it mean to have a URL like /convert/informat/outformat ?
>
> I think, I do not see a big advantage for this here. Should I?

WSGI is a relatively standard way to write modules and middleware for Python which is supported by many Python web servers. The goal is to improve portability, so that code you write for one system doesn't need to be rewritten for another. Details about it are in

  http://docs.python.org/library/wsgiref.html
  http://www.wsgi.org/wsgi/

I've written your module to work under WSGI, although I've got a problem with my local OB install so I can't fully test it. It's not a direct comparison regarding LOC because I simplified your XML generation set a bit, but it's enough to show a few things that are easier:

  - I can send the response headers as a list name/value tuples rather than a function call for each one,
  - I use 'yield' more like a sort of print statement, rather then wfile.write(text)
  - The most important HTTP variables are preextracted (like the query string)

One thing is more complicated - it wants the text which goes along with the HTTP error code.

I also didn't port over the exception handling code you wrote.





                                Andrew
                                [hidden email]



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

babelConvertService_wsgi.py (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Christian Meisenbichler-2
> I've written your module to work under WSGI, although I've got a problem with my local OB install so I can't fully test it. It's not a direct comparison regarding LOC because I simplified your XML generation set a bit, but it's enough to show a few things that are easier:
>

You obviously have much more experience in python webservice
programming. Your code is not any more complicated than my draft. If
you say so that it is more reusable I am totally happy. I tried it out
and it works  very well. Thanks.

I am using it in an web application context, namely an xml database
for dft results from the exciting code.

Christian

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Tim Vandermeersch
Hi,

Here is my own attempt at an openbabel webservice:
http://openbabel.selfip.org/  It runs on some spare hardware here at
home so I don't know how the performance will be. It's not meant as a
complete API yet since there are only 3 apps but the main page has
instructions for contributors... :-)

Cheers,
Tim

On Fri, Apr 16, 2010 at 10:47 AM, Christian Meisenbichler
<[hidden email]> wrote:

>> I've written your module to work under WSGI, although I've got a problem with my local OB install so I can't fully test it. It's not a direct comparison regarding LOC because I simplified your XML generation set a bit, but it's enough to show a few things that are easier:
>>
>
> You obviously have much more experience in python webservice
> programming. Your code is not any more complicated than my draft. If
> you say so that it is more reusable I am totally happy. I tried it out
> and it works  very well. Thanks.
>
> I am using it in an web application context, namely an xml database
> for dft results from the exciting code.
>
> Christian
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Seth Alves
This is pretty simple (no REST api, maybe I should add one?) compared
to what you've made, but maybe you'll find it entertaining.

  http://mol.hungry.com/

This wont work in IE (until the next version?)  The interface is weird
because I was trying to make it usable on iProducts.

    -seth


On Tue, Apr 20, 2010 at 5:06 PM, Tim Vandermeersch
<[hidden email]> wrote:

> Hi,
>
> Here is my own attempt at an openbabel webservice:
> http://openbabel.selfip.org/  It runs on some spare hardware here at
> home so I don't know how the performance will be. It's not meant as a
> complete API yet since there are only 3 apps but the main page has
> instructions for contributors... :-)
>
> Cheers,
> Tim
>
> On Fri, Apr 16, 2010 at 10:47 AM, Christian Meisenbichler
> <[hidden email]> wrote:
>>> I've written your module to work under WSGI, although I've got a problem with my local OB install so I can't fully test it. It's not a direct comparison regarding LOC because I simplified your XML generation set a bit, but it's enough to show a few things that are easier:
>>>
>>
>> You obviously have much more experience in python webservice
>> programming. Your code is not any more complicated than my draft. If
>> you say so that it is more reusable I am totally happy. I tried it out
>> and it works  very well. Thanks.
>>
>> I am using it in an web application context, namely an xml database
>> for dft results from the exciting code.
>>
>> Christian
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Seth Alves-2
In reply to this post by Tim Vandermeersch
This is pretty simple (no REST api, maybe I should add one?) compared
to what you've made, but maybe you'll find it entertaining.

  http://mol.hungry.com/

This wont work in IE (until the next version?)  The interface is weird
because I was trying to make it usable on iProducts.

    -seth


On Tue, 20 Apr 2010 17:06:11 -0700, Tim Vandermeersch  
<[hidden email]> wrote:

> Hi,
>
> Here is my own attempt at an openbabel webservice:
> http://openbabel.selfip.org/  It runs on some spare hardware here at
> home so I don't know how the performance will be. It's not meant as a
> complete API yet since there are only 3 apps but the main page has
> instructions for contributors... :-)
>
> Cheers,
> Tim
>
> On Fri, Apr 16, 2010 at 10:47 AM, Christian Meisenbichler
> <[hidden email]> wrote:
>>> I've written your module to work under WSGI, although I've got a  
>>> problem with my local OB install so I can't fully test it. It's not a  
>>> direct comparison regarding LOC because I simplified your XML  
>>> generation set a bit, but it's enough to show a few things that are  
>>> easier:
>>>
>>
>> You obviously have much more experience in python webservice
>> programming. Your code is not any more complicated than my draft. If
>> you say so that it is more reusable I am totally happy. I tried it out
>> and it works  very well. Thanks.
>>
>> I am using it in an web application context, namely an xml database
>> for dft results from the exciting code.
>>
>> Christian
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: openbabel web service

Tim Vandermeersch
In reply to this post by Seth Alves
On Wed, Jul 7, 2010 at 12:07 AM, Seth Alves <[hidden email]> wrote:
> This is pretty simple (no REST api, maybe I should add one?) compared
> to what you've made, but maybe you'll find it entertaining.
>
>  http://mol.hungry.com/
>
> This wont work in IE (until the next version?)  The interface is weird
> because I was trying to make it usable on iProducts.

If you are interested in cheminformatics using javascript, have a look
at kemia (previously known as jchemhub).
(http://wiki.github.com/kemia/kemia/) I've made some contributions
myself and more developers are always welcome.

Tim

>    -seth
>
>
> On Tue, Apr 20, 2010 at 5:06 PM, Tim Vandermeersch
> <[hidden email]> wrote:
>> Hi,
>>
>> Here is my own attempt at an openbabel webservice:
>> http://openbabel.selfip.org/  It runs on some spare hardware here at
>> home so I don't know how the performance will be. It's not meant as a
>> complete API yet since there are only 3 apps but the main page has
>> instructions for contributors... :-)
>>
>> Cheers,
>> Tim
>>
>> On Fri, Apr 16, 2010 at 10:47 AM, Christian Meisenbichler
>> <[hidden email]> wrote:
>>>> I've written your module to work under WSGI, although I've got a problem with my local OB install so I can't fully test it. It's not a direct comparison regarding LOC because I simplified your XML generation set a bit, but it's enough to show a few things that are easier:
>>>>
>>>
>>> You obviously have much more experience in python webservice
>>> programming. Your code is not any more complicated than my draft. If
>>> you say so that it is more reusable I am totally happy. I tried it out
>>> and it works  very well. Thanks.
>>>
>>> I am using it in an web application context, namely an xml database
>>> for dft results from the exciting code.
>>>
>>> Christian
>>>
>>> ------------------------------------------------------------------------------
>>> Download Intel&#174; Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> _______________________________________________
>>> OpenBabel-discuss mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss