Creating web-services with SWI-Prolog is a breeze. This howto is intended as your first bluffer's guide. All examples come with fully operational source-code.
- Hello World
- Development support for web-servers
- Hello World in HTML
- Rule definition facilities (html//1 rules)
- Processing HTTP-parameters
- How do I upload a file, preserving the file-name?
- Serving plain files
- Making your web-server scalable
Deploying Prolog-based web-servers
- Making the server accessible at port 80
- Running the server under VNC
- Running the server from Unix (x)inetd
- Running the server from Unix init
Here is a tutorial with excercises by Anne Ogborn.
We have two servers available with complete source. One is the server that runs http://www.swi-prolog.org, which can be downloaded through GIT from the repository plweb.git. The other is ClioPatria. Although ClioPatria targets semantic web (RDF) applications, it is also useful as a starting point for general purpose web-servers.
Here is a very incomplete selection of functionality that you can find in these servers:
- User management, OpenID
- Extension packs (CPACK)
- Modular server configuration
- Server statistics
- Handle messages from Prolog
- Lots of RDF stuff
- AJAX interaction (YUI, simple table, tree, N-Queens code?)
- Logfiles and processing thereof
- Stress-testing by replaying logfiles