volgre

command module
v0.0.0-...-2ce9800 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

README

Multi Rule Engine Processor


Install volgre application + dependencies:

$ git clone https://github.com/boomerlang/volgre

Run the application:

$ cd volgre

$ go build

$ ./volgre -host your server ip address -port 8082 &

Test the server

In other console:

$ cd volgre

$ curl -v -X POST http://your server ip address:8082/run/engine/credit_card --data @input.json

Output Data

Uses 'volgre' namespace in the response json data that appends to the original json.

On an Intel(R) Core(TM) i5-5675R CPU @ 3.10GHz, 8GB RAM rule engine execution time is few hundred microseconds.

On other configuration the timings might vary.

Quick Test

$ curl -X POST http://141.147.22.26:8084/run/engine/credit_card --data @input.json

Endpoints

  1. Runs a rule engine with the corresponding loaded rule set:

/run/engine/{engine_name}

  1. Refreshes a rule engine with a new set of rules

/refresh/engine/{engine_name}

  1. Show the version of the current rule set of a given rule engine

/version/engine/{engine_name}

Measurements

No. of rulesEngine execution time (ms)Total execution time (ms)Refresh time
50.645
10 0.8 57
50 2.5 8 12
100 5 10 20
300 17 20 40
600 40 45 90
1000 90 95145
1500 150 148205
2000 255 250269
3000 495 485403

Examples

$ curl -X POST http://141.147.22.26:8084/run/engine/credit_card --data @input.json

$ curl -X GET http://141.147.22.26:8084/refresh/engine/credit_card

$ curl -X GET http://141.147.22.26:8084/version/engine/credit_card

Misc

To generate a set of 1200 distinct rules use the following shell script:

$ bash gen_rules.sh 200 > path_to/rule_file.grl

Documentation

Overview

main package Author Bogdan Peta

Directories

Path Synopsis
Controllers
Controllers
lib
Validators for all rule engines
Validators for all rule engines
volantere
Rule engine for credit card
Rule engine for credit card

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL