There are 3 modules for structuring the back-end:
- persistence
- swapi-client
- rest api (this one)
- Java8 (JEE CDI)
- Maven
- MongoDB
- payara-micro
- JAX-RS Jersey & Jackson (JAXB)
- JPA Eclipselink (NoSQL)
- JUnit and TestNG
- embedmongo-maven-plugin for database IT
- microshed-testing-core for rest IT
(tested in Fedora 32)
- Most services are not async
- No request throttling (use load-balancer)
- No user authentication (no specs)
- The swapi-client caches requests (external dependency). The specs don't say if "number of films" could be part of the DB and kept in sync by another process.
Addresses, ports and database names are maven properties. Defaults:
- localhost: http/8080, mongodb/27017
- database name: test
- build: mvn clean install -Dmaven.test.skip
- test: mvn clean compile test-compile package integration-test
- docs: mvn site:site
- game-swapi-client-x.x.x (jar)
- game-planet-model-x.x.x (jar)
- game-planet-service-api-x.x.x (war)
- game-planet-service-api-x.x.x-microbundle (jar)
(target dir of module)
- as a war in a container
- this basedir (needs payara-micro): java -jar payara-micro-5.201.jar --deploy target/game-planet-service-api-1.0.0.war
- standalone anywhere: java -jar game-planet-service-api-1.0.0-microbundle.jar
(v. 1.0.0)
- swapi-client cold cache and rate limiting (queuing would just make this complex)
- not web-scale, just a micro-service, replicate x-times
- embedmongo-maven-plugin downloads MongoDB
- time/hardware/network/os may break things
- microshed-testing-core (usually) doesn't shutdown the java process if there is more than one java process
- microshed-testing-payara-micro is not working with podman
- embedmongo-maven-plugin doesn't support versions greater than 3.4 sometimes socket does not close
- some others for sure (help me test more)