Connecting to Zope with a Thick Client
We have created quite a few web-based solutions using Zope. We are now looking at using Zope for a project requiring an application server but with thick clients connecting to it. We will probably use Zope as the application server and connect to it with Python-based wxWindows clients (we MAY add a web interface later on, so Zope seems perfect). Since we would require "callback" abilities to the clients, XML-RPC would not be quite the perfect solution for client to Zope communications. The only way I can think of doing "callbacks" to a client with XML-RPC, is if the client polls the server for callbacks - not exactly a pure callback! We are thinking of using something like OSE to handle client to Zope connections and will have to plug OSE into Zope (or at least incorporate OSE abilities into the classes of our application). The first prize will be if we can plug OSE into Zope in much the same seamless way as XML-RPC is incorporated into Zope. Does this solution sound feasible or are there other better solutions? Any comments, suggestions would be appreciated! Etienne
On Tue, Oct 14, 2003 at 01:56:57PM +0200, Etienne Labuschagne wrote: | Since we would require "callback" abilities to the clients, XML-RPC | would not be quite the perfect solution for client to Zope | communications. The only way I can think of doing "callbacks" to a | client with XML-RPC, is if the client polls the server for callbacks | - not exactly a pure callback! I did use XML-RPC for one school project that needed callbacks between a client and server. What I did was put an XML-RPC server on the client, then the client would "register" itself with the server passing the URL to its XML-RPC server. The server was then an XML-RPC client when invoking the callback methods. The main limitation is the clients can not be hidden behind NAT (but that wasn't a problem for my school project). Perhaps this will work for you as well. For a quality implementation you would have to search for an available port to listen on or else the client program will likely run into problems. I suppose another technique would be for the client to call some method on the server asking for callback data (kinda of like a poll). The server could block until it has data to send back. This sounds like it would be kind of tricky to implement (it wouldn't be your usual method calls) and would probably run into timeout problems if the server didn't return any data soon enough. (Alternatively you could work on integrating some other protocol, such as CORBA, that is designed for this sort of usage.) HTH, -D -- The crucible for silver and the furnace for gold, but the Lord tests the heart. Proverbs 17:3 http://dman13.dyndns.org/~dman/
On Wed, Oct 15, 2003 at 07:11:10PM -0400, Derrick 'dman' Hudson wrote:
On Tue, Oct 14, 2003 at 01:56:57PM +0200, Etienne Labuschagne wrote:
| Since we would require "callback" abilities to the clients, XML-RPC | would not be quite the perfect solution for client to Zope | communications. The only way I can think of doing "callbacks" to a | client with XML-RPC, is if the client polls the server for callbacks | - not exactly a pure callback!
oh yeah - that's the other reason Twisted came to mind. It helps you with both the client and server part. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's THE PERIODIC MASTICATOR! (random hero from isometric.spaceninja.com)
participants (3)
-
Derrick 'dman' Hudson -
Etienne Labuschagne -
Paul Winkler