Next: , Up: lib-prologbeans   [Contents][Index]


10.36.1 Introduction

Please note: You should always take the security implications into account if exposing any service to untrusted clients, e.g. on Internet.

PrologBeans is a package for integrating Prolog with applications written in other languages. Currently Java and .NET are supported. PrologBeans is based on running Prolog as a separate server process, and the other part of the application as a client process. This makes PrologBeans automatically distributable since the server and the client can run on different computers anywhere on the Internet.

PrologBeans is designed to be used when client applications need to send queries to a Prolog server (and less intended for showing a GUI from a Prolog program). One typical application would be to connect a Java or .NET based web application to a Prolog server (see examples later).

images/prologbeansarch

PrologBeans setup where the Prolog application serves several users accessing both via a web application server and a .NET GUI.

The PrologBeans package consists of two parts. The Prolog server is a library module, library(prologbeans). The client is a class library, prologbeans.jar for Java (installed on all platforms), and prologbeans.dll for .NET (only installed on Microsoft Windows platforms).

Please note: The newer library('jsonrpc/jsonrpc_server') (see lib-jsonrpc) is probably an easier way to expose a Prolog program to a client written in some other programming language. One advantage is that it uses a standardized, text-based, protocol for communication, which makes it easier to integrate with arbitrary client languages (not just Java and C#), test, and troubleshoot. Another advantage is that the JSON-RPC library gives the client access to the full power of Prolog, including backtracking and constrained variables.



Send feedback on this subject.