From bourassa@magma.ca Tue May 28 16:58:00 2002 From: Gregory Bourassa To: ciao-users@cliplab.org Subject: Re: forward-chaining/persistence Date: Tue, 28 May 2002 16:56:53 +0200 Message-ID: <15603.39605.293916.744809@salmon.ls.fi.upm.es> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8357262400153558876==" --===============8357262400153558876== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Candide, Regarding notifications, database connections and so on, you might consider t= his strategy=20 which I have employed successfully to integrate Prolog with various other lan= guages and=20 packages (like databases): 1) Define a little XML message protocol which maps easily between Prolog pred= icates and=20 any structures or objects on the other side of the interface. "MyJavaObject= " with=20 instance variables "name" and "city" would become=20 GregoryOttawa. On th= e Prolog=20 side this would map to the fact, myJavaObject(name('Gregory'),city('Ottawa')). 2) Using a message middleware such as CORBA or MQSeries, or even something as= simple as=20 http or TCP/IP sockets, communicate with very small, simple programs that ins= ert and=20 fetch from the data store using EJB or JDBC. 3) Notify users using this same XML inter-lingua. If the Prolog you choose does not directly support the middleware you want to= use, it is=20 very simple to implement this scheme using the standard in and standard out s= treams; this=20 way the Prolog program simply responds to the input stream as if to interacti= ve Goals,=20 and makes requests to store or get data via the output stream. Then a very = simple=20 helper program in a language with bindings to the chosen middleware simply st= arts the=20 Prolog program and attaches to its in and out streams -- all the helper progr= am does=20 after that is provide strings from the Middleware to the Prolog and from the = Prolog to=20 the Middleware. Regards. Gregory Bourassa On May 28, Candide Kemmler wrote: >=20 >=20 > Hi, >=20 > I'm considering a number of options in trying to architect a distributed > system in line with the semantic web's ambitions. >=20 > I haven't yet given a try to ciao prolog, but I would like to know a > number of things before I get into more details. >=20 > First: I have read that prolog systems are generally backward-chaining > systems. I would like to do forward-chaining so I can deal with > notification of particular events to the users. >=20 > Second: The user contributed libraries mention a utility to convert > Prolog to SQL... Does that cover triggers ? :-) that would be too easy, > wouldn't it ? More seriously, what does it cover ? It just sounds like > magic ! >=20 > Finally: what kind of persistence does ciao prolog allow for ? In regard > to XSB for example. I'm concerned about the convenience of writing > triggered code to write things down to a database or an EJB,... Is such > a thing possible ? >=20 > Thanks in advance for taking the time to answer my naive questions, >=20 > Candide Kemmler > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > Message: Address: Action: > help majordomo(a)clip.dia.fi.upm.es Info. on useful comma= nds > subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list > unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this= list > ciao-users(a)clip.dia.fi.upm.es Send message to list > ---------------------------------------------------------------------------= -- > Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ > ---------------------------------------------------------------------------= -- >=20 >=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this l= ist ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ ----------------------------------------------------------------------------- --===============8357262400153558876==--