Micronaut is a JVM-based full-stack framework used to build modular microservices making
- Use of Java Reflections as the last meachanism to build the dependency tree
- Compile-time dependency injection for inline bytecode generation
- Less CPU & memory resource utilizations
The codebase is built on Micronaut to collate interested stock RSS feeds and render a webpage view from server side, itself. The RSS feeds Google alert urls are in the .env file delimited by '|'. The file has been omitted in the repository, though.
- Operating-system specific configuration files to adhere to 12-factor app principles
- RSS feeds Google alerts in .env file under boot >> src >> main >> resources
- Thread executor pattern & CountDownLatch to synchronize among parallel threads
- Ensure unique row in H2 database in MySQL mode
- Named Query in repository layer
- Server-side web page rendering Micronaut Thymeleaf
- Run in Raspberry Pi B plus on 1 CPU core | 512 Mb RAM
- Run unit tests & build project :
mvn clean package -T 8
- Start H2 Database (Windows) :
java -Xms16m -Xmx16m -Xss512k -XX:+UseG1GC -cp h2-2.1.214.jar org.h2.tools.Server
- Start H2 Database (Linux) :
nohup java -Xms16m -Xmx16m -Xss512k -XX:+UseG1GC -cp h2-2.1.214.jar org.h2.tools.Server
- Run stock feed executable jar (
Windows) :
nohup java -Xms64m -Xmx64m -Xss512k -Dmicronaut.environments=windows -XX:+UseConcMarkSweepGC -jar stock-feeds.jar
- Run stock feed executable jar (
Linux) :
nohup java -Xms64m -Xmx64m -Xss512k -Dmicronaut.environments=linux -XX:+UseConcMarkSweepGC -jar stock-feeds.jar
- Shell script (Linux) :
nohup ./stock-feed-start-up.sh
- Raspberry Pi startup script :
- Edit crontab :
crontab -e
- Add line :
@reboot /home/pi/stock-feeds/stock-feed-start-up.sh >/dev/null 2>&1
- Reboot :
sudo reboot
- Edit crontab :