Jython to Java object translation (pickle)

View: New views
1 Messages — Rating Filter:   Alert me  

Jython to Java object translation (pickle)

by Daniel Watrous :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

[background]
I have a networked system that currently uses python.  It uses
sqlalchemy against a SQL Server database for persistence.  I pass
information from one component to another using the standard python
pickle (text) format.  When I unpickle at the central component I can
access the python objects directly. The load on the central component
is too much and it starts to slow down/fail when the threads exceed
500 or so.  I would like to replace the central threaded tcp server
with a Java implementation.

[problem]
Since my Java threaded TCP server component will receive it's input as
pickled python objects, I was hoping to be able to use jython to
unpickle the objects and then do my processing in Java.  I could then
re-pickle the objects before sending the response.  The objects are
very simple DTOs containing only values (there are no functions).

[question]
Is it possible to unpickle using jython then somehow translate my
jython objects to a Java object.  Note that I'm not asking how to
convert python source code to Java source code.  I want to actually
convert an instance of a python DTO to a Java object so that I can do
my processing, then convert it back to a python DTO, re-pickle and
send as a response.

Thanks in advance for you suggestions.

Daniel

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users