Question

I have an embedded system using a python interface. Currently the system is using a (system-local) XML-file to persist data in case the system gets turned off. But normally the system is running the entire time. When the system starts, the XML-file is read in and information is stored in python-objects. The information then is used for processing. My aim is to edit this information remotely (over TCP/IP) even during process. I would like to use JAVA to get this done, and i have been thinking about something to share the objects. The problem is, that I'm missing some keywords to find the right technologies to get this done. What i found is SOAP, but i think it is not the right thing for this case, is that true? I'm grateful for any tips.

Était-ce utile?

La solution

As I understand, you are using XML file to store start up configuration

And my assumptions on your interface between Java & Python apps

  • You want your Java application to retrieve objects over Python interface
  • And process them locally and send it back to Python interface to reload config ?

So, depending on your circumstances, you can workout something with the following

Jython

Pickle (if you have no restriction on startup config file format or can afford to do conversion)

https://pypi.python.org/pypi/Pyro4

Also you can get some ideas from here: Sharing a complex object between Python processes?

Autres conseils

You should ask your python application to open a XML-RPC socket which clients can connect on. This could let an outside application to execute an endpoint, which would manipulate your python object values in someway. There are several good choices for Java XML-RPC libraries, including the amazing org.apache.xmlrpc library.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top