When developing a (web) interface for a deductive database, functionality required by the client is provided by means of HTTP handlers that wrap the logical data access predicates. These handlers are responsible for converting between client and server data representations and typically include options for paginating results. Designing the web accessible API is difficult because it is hard to predict the exact requirements of clients. Pengines changes this picture. The client provides a Prolog program that selects the required data by accessing the logical API of the server. The pengine infrastructure provides general mechanisms for converting Prolog data and handling Prolog non-determinism. The Pengines library is small (2000 lines Prolog, 150 lines JavaScript). It greatly simplifies defining an AJAX based client for a Prolog program and provides non-deterministic RPC between Prolog processes as well as interaction with Prolog engines similar to Paul Tarau's engines. Pengines are available as a standard package for SWI-Prolog 7.
翻译:当为推算数据库开发一个(网络)界面时,客户所需的功能由包绕逻辑数据访问前端的 HTTP 处理器提供。 这些处理器负责客户和服务器数据表示器之间的转换,通常包括推导结果的选项。 设计网络可访问的 API 是困难的, 因为很难预测客户的确切要求。 Pengines 改变这一图片。 客户提供了一个Prolog 程序, 通过访问服务器的逻辑 API 来选择所需的数据。 小引擎基础设施为转换Prolog 数据并处理Prolog 非确定性提供一般机制。 Pengines 库小(2000 行Prolog, 150 行 JavaScript) 。 它大大简化了基于 AJAX 的客户对Prolog 程序的定义, 提供了与 Paul Tarau 引擎类似的Prolog 进程之间非确定性 RPC 的 RPC, 以及与Prolog 引擎的互动。 Pengines 可作为SWI-Prolog 7 的标准软件包。