From: Kevin B. <kb...@ca...> - 2002-03-22 23:29:22
|
One more I forgot to mention, which may be suitable for your application: If you are going to have one of your processes spawn the other, you can just use os.popen* (in CPython) or Java's Runtime.exec (in Jython until I or someone else implements popen* functions) to spawn the child process. The parent then reads from/writes to the returned file handles, and the child reads/writes stdin/stdout. kb Kevin Butler wrote: > You have several options, ranging in rough order of difficulty: > > - Python-specific RPC technology (PYRO http://pyro.sourceforge.net/ or > DOPY http://www.users.cloud9.net/~proteus/dopy/) > I actually haven't used either, as I've needed cross language > interoperability, but I probably would use one of them if I were doing > all-Python RPC > > - Python-based CORBA solution (Fnorb or omniorb and possibly Java's > CORBA interfaces) > > - XML-based RPC technology (xmlrpc/soap) (haven't done much with these) > > - custom sockets (probably using pickles, maybe SimpleTCPServer or > BaseHTTPServer) > > - some other communication mechanism you dream up - write to a file, > database, etc. > > In spite of what RPC vendors would have you think, none of this is > very difficult, and unless you > have significant stability or performance requirements, all should be > quite suitable. I imagine that > if PYRO or DOPY works for you, they will be significantly easier than > any of the others, but all > the others are pretty similar in difficulty. > > IMO, YMMV, etc. > > kb > > Stephen Naicken wrote: > >> I have a system made up of two parts. One in Jython and the other in >> CPython. The reason for this is that I could not find a Gnutella >> library in CPython, but I could in Java. Also I have been having >> difficulties with BerkeleyDB Java bindings, so I decided to use >> CPython's bsddb. >> >> Anyway, I would like the jython and python processes to communicate with >> each other. I was think of IPC using scokets, but I'm not sure if this >> is the best option. >> >> I'd be grateful for any advice on this as I have not done this sort of >> thing before. Alternatively if anyone knows of a good python gnutella >> library (like Jtella), that would be an alternative solution. >> >> Thanks Again. >> >> Stephen >> >> >> _______________________________________________ >> Jython-users mailing list >> Jyt...@li... >> https://lists.sourceforge.net/lists/listinfo/jython-users >> > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |