File: README.md

package info (click to toggle)
swi-prolog 9.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,408 kB
  • sloc: ansic: 387,503; perl: 359,326; cpp: 6,613; lisp: 6,247; java: 5,540; sh: 3,147; javascript: 2,668; python: 1,900; ruby: 1,594; yacc: 845; makefile: 428; xml: 317; sed: 12; sql: 6
file content (98 lines) | stat: -rw-r--r-- 2,218 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# HTTP example files

This is a simple demo of the  HTTP server facilities, providing a simple
body and the three documented server instantiations.

## The server main programs are:

	$ demo_threads.pl :
	Run threaded server. Requires SWI-Prolog with thread-support.
	The server is started at port 3000 using server/0.  server/2
	allows to specify options. tm/0 provides a graphical display
	of the runing threads.  See source-file.

## Unix services demo:

	$ demo_daemon.pl :
	Demo script to run the SWI-Prolog HTTP server as a Unix
	service.

	$ linux-init-script :
	/etc/init.d script for Debian and Redhat based Unix systems.
	Must be configured.

	$ upstart-script.conf :
	Ubuntu `upstart` script.  Must be configured and placed in
	`/etc/init`

	$ systemd-script.service :
	Linux `systemd` script.  The typical installation sequence
	is:

	    cp systemd-script.service demo.service
	    <edit>
	    cp demo.service /etc/systemd/system
	    systemctl enable demo
	    systemctl start demo
	    journalctl -f -u demo

## Session management demo:

	$ calc.pl :
	Multi-threaded server with session management using the
	html_write.pl library.  See source for usage.

## File serving demo:

	$ demo_files.pl :
	Is a multi-threaded server that serves static files and
	directory indices.

## Client demo

	$ demo_client.pl :
	Simple multi-threaded client to test the server under
	different conditions.  Requires SWI-Prolog with thread-support.
	See source for usage.

## HTTP digest authentication

	$ demo_digest.pl :
	Simple demo showing HTTP digest authentication at work.

## Login and request rewriting

	$ demo_login.pl :
	Demonstrated using request rewriting and redefining status
	pages to provide cookie based login with RBAC authorization.

	$ demo_rest.pl :
	Demonstrates path wildcarts for common REST api routing.

## Performance testing

A very early start of some  routines   to  validate the server platform.
Eventually, stress_server.pl will serve different   tests  from multiple
locations  and  stress_client.pl  will  contain    client  code  to  run
individual tests as well as doing multi-threaded tests.

	$ stress_server.pl :
	Server platform.

	$ stress_client.pl :
	Client.