Commit dff91a13 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

revised readme.md main text

parent de917aac
### Prerequisites ###
Check that SWI-Prolog has version `8.2.2` or higher.
# Dare2Del Demonstrator – WebAPI
### Starting
The Dare2Del Demonstrator identifies irrelevant files in the user's file system and suggests to delete them. This project provides the required reasoning facilities as Service over HTTP. This component holds all parts required to answer whether some file is irrelevant and to explain why this is the case.
Basically, the core logic is encapsulated into a web-based API that receives and responds JSON objects:
You can start the server using `run.pl`, starting a listener on port `4444` with a thread pool of 5 workers.
### Overview
The basic idea is to encapsulate the core logic into a web-based API that receives and responds JSON objects:
```mermaid
sequenceDiagram
......@@ -23,7 +18,57 @@ sequenceDiagram
API->>Client: HTTP Response
```
### Documentation ###
## Running the server
The server component is written in Prolog. Running the server requires [SWI-Prolog](https://www.swi-prolog.org/) in version 8.2.2 or above.
To start the server, clone the git repository.
```bash
git clone git@gitlab.rz.uni-bamberg.de:cogsys/dare2del/demonstrator.git demonstrator-webapi
cd demonstrator-webapi
```
Then start the server using SWI-Prolog, optionally with a custom port (default is 4444).
```bash
swipl run.pl
swipl run.pl --port 4444
```
After some informational messages you will see the interactive prolog interpreter. Then the server is running and accepting requests at localhost:PORT as given in the last informational message.
```
% Loading explanation templates from file irrelevance_templates:
% file/1
% abs_path/2
% file_size/2
% directory/1
% in_directory/2
% in_directory_recursive/2
% in_directory_recursive/2
% item_name/2
% creation_time/2
% change_time/2
% modification_time/2
% access_time/2
% newer/2
% same_directory/2
% Started server at http://localhost:4444/
Welcome to SWI-Prolog (threaded, 64 bits, version 8.2.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?-
```
You may freely use the Prolog interpreter while the server is running to stop the server enter `stop_server.`
## Documentation
Ongoing. Please check the [Wiki](https://gitlab.rz.uni-bamberg.de/cogsys/dare2del/demonstrator/-/wikis/home) in the meantime.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment