Networking in Prolog - a survey
- From: Alessio Stalla <alessiostalla@xxxxxxxxx>
- Date: Tue, 13 May 2008 13:56:04 -0700 (PDT)
Hello, for my dissertation I developed a little Prolog interpreter
with didactical purposes (that was in late 2006). I coded it in Java
because it was the language I knew better. These days my professor
kindly asked if it was possible to extend the interpreter with various
facilities, among which basic networking support (thus allowing
different instances of the system to share knowledge). I think the
task is not difficult implementation-wise, since I can leverage Java's
libraries. However, before starting writing code, I wanted to check
the state of the art in Prolog networking libraries to see if I could
get any inspiration. Specifically, I'd like to make it possible to
write in Prolog a simple server capable of handling multiple
connections "simultaneously" or better asynchronously, but adding
multithreading to my interpreter is not going to be easy, so I'd avoid
that if possible; instead, I thought of using an event-based approach
(the programmer registers a goal with two free variables, Connection
and Message, as an "event handler" that will be automatically invoked
by the system each time a "message" arrives on an open connection.
What a message is concretely is rather vague at the moment, but I
digress. This way I will probably still have to manage threads, but
I'll be able to do it from the internals of the interpreter, without
exposing a threading API on the prolog side). I read about SWI
Prolog's clib networking support, which as far as I can tell is a
Prolog skin over the standard Unix socket library; it even mentions
fork! Besides that, I found no other convincing example of networking
libraries in Prolog. Has anyone on this group any insight into the
problem?
Thanks in advance to anyone who answers!
Kind regards,
Alessio Stalla
.
- Follow-Ups:
- Re: Networking in Prolog - a survey
- From: rupertlssmith@xxxxxxxxxxxxxx
- Re: Networking in Prolog - a survey
- From: A . L .
- Re: Networking in Prolog - a survey
- From: Jan Wielemaker
- Re: Networking in Prolog - a survey
- Prev by Date: why not use LISP-imp of Prolog as opposed to Prolog itself?
- Next by Date: Re: why not use LISP-imp of Prolog as opposed to Prolog itself?
- Previous by thread: why not use LISP-imp of Prolog as opposed to Prolog itself?
- Next by thread: Re: Networking in Prolog - a survey
- Index(es):
Relevant Pages
|