Re: [eclipse-clp-users] how to recompile kernel/io to wrap remote_connect_*

From: Yngwie <yngwie_at_...164...>
Date: Sat, 31 Jan 2009 10:40:01 +0100
Kish Shen wrote:
> Yngwie wrote:
>> Hi there, I'm a new user building an expert system backed by
>> ECLiPSe and accessible from a web application written in PHP.
>> I have implemented the remote protocol and EXDR parsing/generation
>> described in the user manual on the PHP side and performed
>> some tests with success.
>> Now, the problem is that I need to socket/bind/listen and
>> put the application on the ECLiPSe side in the classic "accept"
>> infinite loop waiting for client connections (for now, let's ignore
>> any performance issue may derive from such an iterative server).
> Hi Andrea,
> I am not sure I understand what you are trying to do completely, and I
> don't really know much about PHP, but from what I can see, you
> probably should not be using the remote protocol -- fundamentally,
> there is the concept of a single `attachment' at the start of a
> connection. This is when you use new_socket_server/3 to create a
> socket server connection, and then you create the two socket
> connections (Control and RPC) which are then used for all subsequent
> communications between ECLiPSe and the remote peer.
> What you seem to want to do is for the ECLiPSe side to continuely
> accept new socket connections. Am I correct in thinking that this
> means that each time your remote application wants to communicate with
> ECLiPSe, it needs to create a new socket connection? I am not sure how
> this can fit into the remote protocol, unless each of these connection
> is for a new peer.
> If you cannot change your remote application to communicate via the
> same socket queues once attachment is made, then I would suggest you
> need to implement your own connection to ECLiPSe without using the
> remote interface, and use the lower level  socket/bind/listen etc.
> predicates to do this.
> Cheers,
> Kish
Initially I followed the approach to use the remote connection protocol
to leverage that existing, established and formally defined communication
protocol; now I tried to work with sockets at lower level as you suggested
and obtained what desired.

As in my application the client interacts with ECLiPSe in a
request-reply fashion to execute a single goal per connection, with this
solution even the remote protocol handshake and maintaining overhead
is thrown away.

Thank you for your advice and have a good future,
Received on Sat Jan 31 2009 - 09:39:41 CET

This archive was generated by hypermail 2.3.0 : Wed Aug 21 2019 - 09:13:31 CEST