The goal of this command line application is to merge events, that comes in parties from a file and save into a database.
The application use clean architecture, multi-thread and support files over 1GB.
$> git clone https://github.com/mateushenriquebrum/EventAnalyzer
$> cd EventAnalyzer
$> chmod +x gradlew
$> ./gradlew build
$> java -jar build/libs/EventAnalyzer-1.0.0.jar $(pwd)/events.txt
You can also use events-gen.js
to generate some huge files for test.
You will see the import in progress, after all you can access the data by jdbc:hsqldb:file:$(pwd)\hsqldb\events uri.
The architecture consiste in a version of infamous MapReduce Architecture but in this case using threads as processing unit.
All the caution were toke to keep infrastructure code away from domain code, the pattern used was Clean Architecture.