ses schrieb:
> I'm looking forward to seeing more on the pages about
> 'Internet Logic Programming' and maybe some more Prolog
> Server Pages examples.
You might also look at the deployment examples for Jekejeke
Prolog Runtime. A poor mans solution to web services is to use
the GET method and extract the parameters, and then generate
a response. This is for example done here:
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/05_run/15_stdy/08_deploy/08_client/01_agent.html
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/05_run/15_stdy/08_deploy/08_client/03_service.html
The deployment is such that the knowledge base is once loaded
the first time the service is called. And that service requests
are served by the thread pool of the servlet container. Means
no expensive process creation as CGI would do. Dunno, I guess
this is called FastCGI.
With the Jekejeke Prolog Runtime you can have multiple knowledge
bases in a servlet container, since a knowledge base is just
an object that you allocate. Then for the requests, an interpreter
is just an object that you allocate and that sits on a knowledge
base (*). Since the knowledge base allows multi-threaded access
via interpreter objects, you can easily do FastCGI.
Bye
(*)
I had a discussion about this design on LtU some months ago. It
is still that you need one interpreter object per thread. But
you can leave the reclaiming of interpreter objects to the Java
GC. Just create an interpreter object when you need it. Creation
is not ultra cheap, but cheap enough for web service, and I am
still a little bit working on making it cheaper.