The service was created using Java 11, Spring Boot 2.4.4 and PostgreSQL 11. It was deployed in 5 initial instances in GCP and is prepared to auto-scale up to 10000 instances.
- Install and configure a Postgresql database
- Change file
src/main/resources/application-develop.yml
using your DB configs. - Execute
mvn clean package
- To run this service, execute
mvn spring-boot:run -Dspring-boot.run.profiles=develop
orjava -jar target/mutants-0.0.1-SNAPSHOT.jar --spring.profiles.active=develop
The service will be available on the default port 8080. Ex. http://localhost:8080
with paths POST /mutant/
, GET /stats/
and DELETE /stats/flush/
curl --location --request POST 'https://mutants-310221.ue.r.appspot.com/mutant/' \
--header 'Content-Type: application/json' \
--data-raw '{
"dna": [
"ATGCGA",
"CAGCGC",
"TTAATT",
"AGTTGG",
"GAGTTA",
"TCACTT"
]
}'
curl --location --request GET 'https://mutants-310221.ue.r.appspot.com/stats/'
curl --location --request DELETE 'https://mutants-310221.ue.r.appspot.com/stats/flush'
The class of service that includes the DNA analysis logic contains over 95% test coverage and the entire project reaches over 80% coverage