- If you find a bug, please, report this issue.
- Pull requests are aso welcome!
- JCMRest class starts JaCaMo platform inserting RestAgArch class, its agent architecture.
- JCMRest class configures and starts the web server, in which RestAppConfig class registers endpoints.
- Package implementation constains REST implementation, the facade of this API.
- Package mediation constains intermediary classes that links the facade and JaCaMo, the resolvers of this API.
- Requirements: jdk >= 15
- Considering you have cloned this repository using
$ git clone http://github.com/jacamo-lang/jacamo-rest
- In the root folder of the project execute on mac/linux
$ ./gradlew run
, on windows$ gradlew run
. - To test this project, run
./gradlew test
. For details, please, see unit tests.
$ ./gradlew marcos
runs agent marcos and the REST platform.$ ./gradlew bob
runs agents bob and alice. Bob sends a message to marcos using its rest API.
$ docker build -t jomifred/jacamo-runrest .
$ docker network create jcm_net
$ docker run -ti --rm --net jcm_net --name host1 -v "$(pwd)":/app jomifred/jacamo-runrest gradle marcos
$ docker run -ti --rm --net jcm_net --name host2 -v "$(pwd)":/app jomifred/jacamo-runrest gradle bob_d
These commands build a docker image and launch marcos and bob projects. Usually super user privileges are necessary.