[Pengines] Asynchronous rpc? (instead of pengine_rpc)
Luca Violanti <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAApdSwQwo2JZUkAF2ObB8f7KARfWUuJXBrKoVcAtYtzAHkpm_w@mail.gmail.com> |
Hi all, I am experimenting with pengines as I am implementing a distributed theorem prover for some extensions of Description Logics. At the moment, the theorem prover works as a single threaded program in 2 phases. Current implementation's workflow example: P1 runs... P1 finds a checkpoint P1 invokes P2 locally and waits --- P2 runs --- ... --- P2 ends - control returns to P1 P1 runs... etc. The idea is to develop it so that it can run on a distributed architecture: one "client" program which runs the first phase, then, each time it finds some intermediate results, it invokes a second phase check on a separate "server", asynchronously. Client Server 1 Server 2 P1 runs... P1 finds a checkpoint P1 invokes P2 on Server 1 ---> P2 runs independently P1 keeps running... ... P1 finds a checkpoint ... P1 invokes P2 on Server 2 ----------------------------> P2 runs independently P1 keeps running... ... ... etc. To keep things simple, the servers can assert a "finished" fact and then the Client can do some polling to retreive the results. This way all the servers just have to be listening, do their job when asked to, and they don't need to send anything back to the client. I have played a bit with the client/server example found in the examples folder (pl-7.1.9/packages/pengines/examples), which seems quite suitable for my needs. The only obstacle is that I need a way to do an asynchronous rpc, while the pengine_rpc implementation seems to be locking. Is there a way for my client to send predicates to a server without waiting for their response? Any ideas? Thank you, -- Luca Violanti -------------- next part -------------- HTML attachment scrubbed and removed