Candide,
Regarding notifications, database connections and so on, you might consider this strategy which I have employed successfully to integrate Prolog with various other languages and packages (like databases):
1) Define a little XML message protocol which maps easily between Prolog predicates and any structures or objects on the other side of the interface. "MyJavaObject" with instance variables "name" and "city" would become <MyJavaObject><name>Gregory</name><city>Ottawa</city></MyJavaObject>. On the Prolog 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 http or TCP/IP sockets, communicate with very small, simple programs that insert and 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 very simple to implement this scheme using the standard in and standard out streams; this way the Prolog program simply responds to the input stream as if to interactive Goals, and makes requests to store or get data via the output stream. Then a very simple helper program in a language with bindings to the chosen middleware simply starts the Prolog program and attaches to its in and out streams -- all the helper program does after that is provide strings from the Middleware to the Prolog and from the Prolog to the Middleware.
Regards.
Gregory Bourassa
On May 28, Candide Kemmler <candide(a)urbanium.tv> wrote:
Hi,
I'm considering a number of options in trying to architect a distributed system in line with the semantic web's ambitions.
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.
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.
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 !
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 ?
Thanks in advance for taking the time to answer my naive questions,
Candide Kemmler
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 list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
Archived messages: <a href='http://www.clip.dia.fi.upm.es/Mail/ciao-
users/'>http://www.clip.dia.fi.upm.es/Mail/ciao-users/</a>
============================================================================== 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 list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------