Using JPL (Java + Prolog) in a Java EE Web Application

I would like to develop a Java EE web application that requires Prolog via JPL for certain search related tasks. The web application will be deployed to the JBoss application server. The Prolog engine can be YAP or SWI (afaik are the only Prolog engines currently compatible with JPL). Prolog requests are dependent on information stored in a (potentially large) database.

If someone tried this or something similar, could you give me feedback on the following issues:

  • What is the best way to manage concurrent HTTP sessions that need access to the Prolog engine ?. Is this possible - desirable? - Assign each individual session its own Prolog engine ?. If this solution works, is it possible to implement something similar to the “Prolog engine pool” to quickly assign prolog mechanisms for new sessions ?, Or is the best solution to have one Prolog engine that will manage all request requests synchronously? (and slowly).
  • How can I control the interaction of Prolog with the database ?. If the data often changes in the database and you need this data to check Prolog requests, what is the best strategy to synchronize the facts in the Prolog processor with the data in the database ?. A fleet option starting from scratch in each new session (for example, reloading all the data from the database as Prolog facts) does not seem to be a good idea if the database is growing.
  • Any other expected issues / difficulties related to java-prolog-database interaction during implementation?

Thanks in advance!

+3
source share
1 answer

What is the best way to manage concurrent HTTP sessions that need access to the Prolog engine?

JPL, , . close(). , , .

, HTTP- Prolog . HTTP-, , http. .

Prolog ?

. , . , , .

. , /. -, . , . - junks -.

, , -. , . , Java EE , Prolog .

+1

All Articles