- Simple to-do app (.net-core, mysql, EF)
- Java Quotations app (java, mysql, mqtt)
- Python Quotations app (python, mysql, amqp-091)
These are simple environments to test The Protocol Master application. We will mock without a line of code the database and a rest api of a simple TODO web application.
Just for fun this is a .NET Core application with Entity Framework and very basic JQuery-based Front-End
- The documentation for the protocol master is here
- A Docker environment
- The Docker environment address (let's use DOCKER_SERVER for now)
All .NET applications run out of the box only on Intel architecture, that means
- Platform: linux/amd64
- Target Architecture: amd64
For Apple M processors should work the following, change the HttpServer and RestServer dockerfile according to your needs (see on Microsoft for further info on the subject)
- Platform: linux/arm64
- Target Architecture: arm64
(Thanks patrick-baker for the UI!)
If you have Intellij or know what are *.http files you can configure this setting the
myhost variable to DOCKER_SERVER
- Clone the repo
https://github.com/kendarorg/the-protocol-master-samples.git
- Configure your browser to use DOCKER_SERVER:29000 as HTTP/S Proxy
- Navigate to the "net-core" directory
- Run
docker-compose up
to generate the environment - Several containers will be created
- net-core-tpm: The Protocol Master server
- net-core-mysql: The mysql database
- net-core-http: The web-ui
- net-core-rest: The rest back-end
- Download the SSL certificate from http://localhost:8081/api/protocols/http-01/plugins/ssl-plugin/der and install it as a trusted root certificate
You can check now the application navigating (in the proxied browser) to anything you want, and you will se the calls flowing on the console.
You can even try the application on http://net-core-http/index.html but for the sake of simplicity please delete all tasks before continuing the tutorial
- Start the recording on all protocols http://localhost:8081/api/protocols/all/plugins/record-plugin/start
- Navigate to http://net-core-http/index.html
- Insert a new task and click Submit
- Task Name: Laundry
- Priority: High
- Notes: Separate Colors
- Set the status to Completed
- Click Update
- Click Archive
- Go on Archive tab (upper right) and notice the task
- Stop the recording on all protocols http://localhost:8081/api/protocols/all/plugins/record-plugin/stop
- You can download all the recordings! http://localhost:8081/api/storage/download as a zip file
- Stop the
db_mysql
container - Start the replaying on MySQL http://localhost:8081/api/protocols/mysql-01/plugins/replay-plugin/start
- Refresh the page http://net-core-http/index.html
- Redo exactly all the actions
- And everything will work!!!! But with a fake DB
- Stop all the replayings http://localhost:8081/api/protocols/all/plugins/replay-plugin/stop
- Stop the
net-core-rest
container - Start the replaying on MySQL http://localhost:8081/api/protocols/http-01/plugins/replay-plugin/start
- Refresh the page http://net-core-http/index.html
- Redo exactly all the actions
- And everything will work!!!! But with a fake Rest API!!
- Stop all the replayings http://localhost:8081/api/protocols/all/plugins/replay-plugin/stop
If you have Intellij or know what are *.http files you can configure this setting the
myhost variable to DOCKER_SERVER
You can check the quotations going to http:\\java-rest\index.html
- Clone the repo
https://github.com/kendarorg/the-protocol-master-samples.git
- Configure your browser to use DOCKER_SERVER:29000 as HTTP/S Proxy
- Navigate to the "java" directory
- Run
docker-compose up
to generate the environment - Several containers will be created
- java-tpm: The Protocol Master server
- java-mysql: The mysql database
- java-mosquitto: The mqtt broker
- java-rest: The application reading mqtt messages (and showing on APIs)
- java-quote-generator: The quote generation (every 10 seconds random stock quotes)
- Download the SSL certificate from http://localhost:8081/api/protocols/http-01/plugins/ssl-plugin/der and install it as a trusted root certificate
- Connect your mysql ui to
DOCKER_HOST:23306
and use the databasedb
Now your environment is ready for a real test!
- Start the recording on mqtt-01 protocol http://localhost:8081/api/protocols/mqtt-01/plugins/record-plugin/start
- Delete all records on
db.quotations
table - Wait for some data on
quotations
table (at least 10 seconds, this is the "run-time") - Stop the recording on all protocols http://localhost:8081/api/protocols/all/plugins/record-plugin/stop
- You can download all the recordings! http://localhost:8081/api/storage/download as a zip file
- Stop the
java-quote-generation
container - Stop the
java-rest
container - Delete all data on
quotations
table - Start the replaying on MQTT http://localhost:8081/api/protocols/mqtt-01/plugins/replay-plugin/start
- Check the new data on
quotations
table - Mqtt simulation... done!
- Stop the recording on all protocols http://localhost:8081/api/protocols/all/plugins/replay-plugin/stop
If you have Intellij or know what are *.http files you can configure this setting the
myhost variable to DOCKER_SERVER
You can check the quotations going to http:\\py-rest\index.html
- Clone the repo
https://github.com/kendarorg/the-protocol-master-samples.git
- Configure your browser to use DOCKER_SERVER:29000 as HTTP/S Proxy
- Navigate to the "python" directory
- Run
docker-compose up
to generate the environment - Several containers will be created
- py-tpm: The Protocol Master server
- py-mysql: The mysql database
- py-rabbit: The amqp broker
- py-rest: The application reading mqtt messages (and showing on APIs)
- py-quote-generator: The quote generation (every 10 seconds random stock quotes)
- Download the SSL certificate from http://localhost:8081/api/protocols/http-01/plugins/ssl-plugin/der and install it as a trusted root certificate
- Connect your mysql ui to
DOCKER_HOST:23306
and use the databasedb
Now your environment is ready for a real test!
- Start the recording on mqtt-01 protocol http://localhost:8081/api/protocols/amqp-01/plugins/record-plugin/start
- Delete all records on
db.quotations
table - Wait for some data on
quotations
table (at least 10 seconds, this is the "run-time") - Stop the recording on all protocols http://localhost:8081/api/protocols/all/plugins/record-plugin/stop
- You can download all the recordings! http://localhost:8081/api/storage/download as a zip file
- Stop the
py-quote-generation
container - Stop the
py-rest
container - Delete all data on
quotations
table - Start the replaying on MQTT http://localhost:8081/api/protocols/amqp-01/plugins/replay-plugin/start
- Check the new data on
quotations
table - Mqtt simulation... done!
- Stop the recording on all protocols http://localhost:8081/api/protocols/all/plugins/replay-plugin/stop