Pengine client sample using Javascript, not Prolog?

#1

I am using SWI-Prolog 8.0.2. I have been reading about Pengine for the last few hours. I have found the Genealogy tutorial and plenty of docs, and samples for using Pengines as a client from Prolog (i.e. - The Prolog API). But I can’t seem to find any client samples showing how to interface with Pengines from Javascript. I did find the Javascript API page:

https://pengines.swi-prolog.org/docs/documentation.html

But not a client side code sample. Can someone point me to one?

Also, what is the underlying transport or O/S service that facilitates the RPC calls, on Windows and Linux? DDE? Sockets? HTTP? etc.

Note: in my use case Pengines will be on an Ubuntu Linux 18.04 box and not available from outside the local box (i.e. - it’s server ports will not be allowed through the firewall by adding a ufw entry.). It’s only for internal use by the Node.JS process on the same box. I assume that means I don’t have to take extraordinary security measures to protect my Pengines instances.

#2

Example in online documentation
http://www.swi-prolog.org/pldoc/man?section=pengine-examples

Examples in GIT.

1 Like
#3

Thanks Ian! That’s what I needed.