An approach to designing a distributed task Scheduler service. We can schedule tasks with timestamps. The task can be anything like sending an email, text, hitting a third party API or as simplistic as printing a message on the terminal.
The service works on plug n' play architecture and is written keeping in mind to be able to scale horizontally in case of large number of requests.
$./redis-cli
127.0.0.1:6379>
$./mysql -uroot -p123
http://localhost:15672
mvn spring-boot:run
curl --location --request POST 'localhost:8080/tasks/submit' \
--data-raw '{
"message":"drredecff",
"timestamp":"2020-03-10T00:42:30"
}'
curl --location --request GET 'localhost:8080/tasks/{id}' \
--header 'Content-Type: application/json'
Spring Boot 2.2.5.RELEASE
JDK 1.8
Apache Maven 3.6.3
Lombok 1.18.10
Spring AMQP 2.2.5.RELEASE
Hibernate 5.14.12
Spring Data Redis 2.2.5.RELEASE