The anti-fraud research project aims to explore the tech that is suitable for malicious activities detection
- Download Amazon Corretto JDK 21:
curl -k -LO https://corretto.aws/downloads/latest/amazon-corretto-21-x64-linux-jdk.tar.gz
- Extract the archive:
tar -xf amazon-corretto-21-*.tar.gz
- Export
JAVA_HOME
:
export JAVA_HOME=./amazon-corretto-*/
- Clone the project:
git clone https://github.com/neshkeev/anti-fraud.git
- Enter the directory:
cd antifraud
- Run the project:
./mvnw compile -pl anti-fraud-drools exec:java -Dexec.mainClass=com.githib.neshkeev.antifraud.Main
In order to run benchmarks execute:
./mvnw clean package -T 2C -PBenchmark &&
java -XX:+HeapDumpOnOutOfMemoryError \
-XX:HeapDumpPath=/tmp/DroolsRuleBenchmark-heapdump \
-Xms2g \
-Xmx2g \
-jar benchmark/target/benchmarks.jar
There is a hello world temporal workflow. In order to start it, please execute the following commands:
- Start a Temporal Server as a Docker service:
docker compose up -d
- Build the project:
./mvnw clean package -T 2C
- Start a worker:
./mvnw compile -pl anti-fraud-temporal-workflow exec:java -Dexec.mainClass=com.githib.neshkeev.antifraud.workflow.HelloWorldWorker
- Run a couple workflows
./mvnw compile -pl anti-fraud-temporal-workflow exec:java -Dexec.mainClass=com.githib.neshkeev.antifraud.workflow.WorkflowInitiator
Workflows can be triggered with a REST API request. In order to start a web server, please execute the following commands:
- Start a Temporal Server as a Docker service:
docker compose up -d
- Build the project:
./mvnw clean package -T 2C
- Start a worker:
java -jar anti-fraud-worker/target/anti-fraud-worker-0.0.1-SNAPSHOT.jar
- Run the web server:
java -jar anti-fraud-web/target/anti-fraud-web-0.0.1-SNAPSHOT.jar
- Trigger a workflow:
curl -v http://localhost:18080/check -H 'Content-Type: application/json' -d '{}'
- Check the console with the worker
docker compose down
docker compose --profile=base --profile=grpc --profile=rest --profile=perf --profile=worker -f ./docker-compose-perf.yml down
docker compose --profile=base -f ./docker-compose-perf.yml up --build -d
TEMPORAL_ADDRESS=<TEMPORAL ADDRESS> docker compose --profile=rest -f ./docker-compose-perf.yml up --build -d
TEMPORAL_ADDRESS=<TEMPORAL ADDRESS> docker compose --profile=grpc -f ./docker-compose-perf.yml up --build -d
TEMPORAL_ADDRESS=<TEMPORAL ADDRESS> POSTGRES_HOST=<POSTGRES HOST> docker compose --profile=worker -f ./docker-compose-perf.yml up --build -d
docker compose --profile=perf -f ./docker-compose-perf.yml down
TEMPORAL_WORKFLOW_WEB_ADDRESS=<REST WORKFLOW HOST:PORT> TEMPORAL_WORKFLOW_GRPC_ADDRESS=<GRPC WORKFLOW HOST:PORT> docker compose --profile=perf -f ./docker-compose-perf.yml up --build -d
MSYS_NO_PATHCONV=1 docker compose -f ./docker-compose-perf.yml exec -it k6 k6 run --vus 100 --duration 30s /index.js
docker compose --profile=perf down
TEMPORAL_WORKFLOW_WEB_ADDRESS=<REST WORKFLOW HOST:PORT> TEMPORAL_WORKFLOW_GRPC_ADDRESS=<GRPC WORKFLOW HOST:PORT> docker compose --profile=perf -f ./docker-compose-perf.yml up --build -d
MSYS_NO_PATHCONV=1 docker compose -f ./docker-compose-perf.yml exec -it k6 k6 run --vus 100 --duration 30s /grpc.js
docker compose --profile=base --profile=grpc --profile=rest --profile=perf --profile=worker -f ./docker-compose-perf.yml down
docker compose down