(This message has been automatically imported from the retired mailing list)
Hello!
I have to write a service that interfaces with a system that only provides
Java classes as an option.
Besides not using Zato, I thought about:
- Write Java Restful services and deploy on some Java Server (Tomcat
probably), then my Zato services consume these rest services.
- Use py4j, that is minimalist compared to the previous option, and
provides it’s own “ClientServer” socket-based protocol with collection
conversion
I gave up on “jpype” as it starts JVM from Python and also introduces high
dependencies between then, and the other python packages that do the same.
Any suggestions/thoughts/critics are welcome!
Thanks and Best Regards,
Guilherme
Hi Dariusz,
py4j has a multi threading and single threading models and looks nice, but
before going forward with it I would create a prototype with multiple
greenlets in parallel to see how it handle this. It is a standalone java
process so we don’t mess with JVM starts inside python, JNI, RMI, etc.
One other option I have just looked into is RestExpress (
https://github.com/RestExpress/RestExpress), that is a minimalist headless
Rest Server but to be honest maven is always a nightmare to me… But once
setup I guess it would be less surprise prone than py4j.
[]s!
On Tue, May 24, 2016 at 6:29 PM, Dariusz Suchojad dsuch@zato.io wrote:
On 24/05/16 22:53, Guilherme Monteiro wrote:
- Write Java Restful services and deploy on some Java Server (Tomcat
probably), then my Zato services consume these rest services.
- Use py4j, that is minimalist compared to the previous option, and
provides it’s own “ClientServer” socket-based protocol with collection
conversion
Hi Guilherme,
py4j looks nice enough - but make sure you investigate first how its
threading model works. In particular, Zato is based on gevent down below
so there can be multiple greenlets running in parallel, I do not know
how py4j works in that regards.
Also, where does the server part of its protocol run? Is it a standalone
process or one that would be embedded in Zato?
Alternatively, I am sure there are some nice Spring libraries for REST
that you can easily deploy on Tomcat/Jetty, just like you said.
regards,
–
Dariusz Suchojad
https://zato.io
ESB, SOA, REST, APIs and Cloud Integrations in Python
On 24/05/16 22:53, Guilherme Monteiro wrote:
- Write Java Restful services and deploy on some Java Server (Tomcat
probably), then my Zato services consume these rest services.
- Use py4j, that is minimalist compared to the previous option, and
provides it’s own “ClientServer” socket-based protocol with collection
conversion
Hi Guilherme,
py4j looks nice enough - but make sure you investigate first how its
threading model works. In particular, Zato is based on gevent down below
so there can be multiple greenlets running in parallel, I do not know
how py4j works in that regards.
Also, where does the server part of its protocol run? Is it a standalone
process or one that would be embedded in Zato?
Alternatively, I am sure there are some nice Spring libraries for REST
that you can easily deploy on Tomcat/Jetty, just like you said.
regards,