Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.65 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.65 KB

Risk Control System(RCS)

RCS is a risk control system for complete process, contains data-flow and customizable rules.

Features

  • Microservices.
  • Asyncio everywhere.
  • Full process for risk control. Defined rule and runer, receive data from api, clean and distribute data to rule engine, match rule and save punishment record.
  • Customizable rules by simple and convenient http API.
  • SceneScript, rule runner, simple use and wrote by Python for developers.
  • Caches by modified retrieve method which get data from db.

Techs

Directory Structure

Access

Event gateway. Pre-processing data.

DataProcessor

Processing data flow, saving event data snapshot, calculate aggregate data, trigger rules.

RuleEngine

Rule checking and building. Simple rule engine wrote by Python.

SceneScript

Rule runner for Scene(pre-defined rules).

Data flow

Data flow

Deploy

  1. MongoDB export/import

    os CMD,not mongo Shell

    1. mongodump --port 27017 -u "RCSAccess" -p "c972745e8083bc5226e07f54f4d2b8ab71db3425ee2dac05811c162759628171" --authenticationDatabase "admin" --db RCSAccess --collection scene --archive=gz --gizp
    2. mongorestore --uri="mongodb://USERNAME:PASSWORD@HOST:PORT" --archive=backup.tgz
  2. MongoDB timezone is UTC,remember to convert it to local time(tool at utils.gtz.Dt