Coder Social home page Coder Social logo

steccami / paysim-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voutilad/paysim-demo

0.0 1.0 0.0 288 KB

Generate network graphs of virtual mobile money networks including simulating some bad apples

License: GNU General Public License v3.0

Java 100.00%

paysim-demo's Introduction

Modeling 1st & 3rd Party Fraud with PaySim 2.1

Create your own fraud network in your local Neo4j instance and explore a virtual mobile money network!

Requirements

To build and run this demo, you'll need:

Known Issues ⚠️

Before you get started, keep in mind the following caveats:

  • Large simulations generate a lot of Neo4j write transactions. I've done little tuning of batch sizing, so make sure to allocate at least 2GB of JVM heap space as there's no error handling in the loader currently.
  • You may get org.neo4j.driver.exceptions.TransientExceptions spit out into the console...don't panic and just ignore those for now 😉 it's due to my sloppy coding.
  • There's a WARNING: An illegal reflective access operation has occurred because of a 3rd party dependency in use

Building & Running 🛠

This project uses Gradle and should work with your favorite Java IDE (if so desired) or you can just use the provided gradle wrapper scripts. They will download the appropriate version of Gradle for your platform and orchestrate things for you.

Quick & Dirty with Gradle Run 🏃

If you want to use all the following defaults, this is the easiest way to run the simulation and build the graph.

Assuming:

  • bolt uri: bolt://localhost:7687
  • neo4j admin user is neo4j and password is password

On Linux/*BSD/macOS:

$ ./gradlew run

On Windows:

> .\gradlew.bat run

Packaging to Run without Gradle

First, build a distribution.

On Linux/*BSD/macOS:

$ ./gradlew distTar

On Windows:

> .\gradlew.bat distZip

In ./build/distributions you'll find either the .tar or .zip file. You can unpack the contents wherever you want to "install" the demo app.

burritogrande[paysim-demo-0.1.0]$ ls -alFh
total 8
drwxr-xr-x  6 dave  staff   192B Feb  3 09:22 ./
drwxr-xr-x  4 dave  staff   128B Feb  3 09:22 ../
-rw-r--r--  1 dave  staff   671B Feb  3 09:22 PaySim.properties
drwxr-xr-x  4 dave  staff   128B Feb  3 09:22 bin/
drwxr-xr-x  9 dave  staff   288B Feb  3 09:22 lib/
drwxr-xr-x  9 dave  staff   288B Feb  3 09:22 paramFiles/

Inside bin/ you'll find a shell script and batch file for easily running the demo:

burritogrande[paysim-demo-0.2.0]$ ./bin/paysim-demo -h
usage: paysim-demo [-h] [--properties PROPERTIES] [--uri URI] [--username USERNAME] [--password PASSWORD] [--tls TLS]
                   [--batchSize BATCHSIZE] [--queueDepth QUEUEDEPTH]

Builds a virtual mobile money network graph in Neo4j

named arguments:
  -h, --help             show this help message and exit
  --properties PROPERTIES
                         PaySim properties file (with paramFiles adjacent in same dir) (default: PaySim.properties)
  --uri URI              Bolt URI to target Neo4j database (default: bolt://localhost:7687)
  --username USERNAME    (default: neo4j)
  --password PASSWORD    (default: password)
  --tls TLS              Ues a TLS Bolt connection? (default: false)
  --batchSize BATCHSIZE  transaction batch size (default: 500)
  --queueDepth QUEUEDEPTH
                         PaySim queue depth (default: 5000)

Querying the Graph

...queries TBA :-)

License ⚖️

The demo code and any packaged releases are provided under the GPLv3 (see LICENSE). Copyright for my contributions most likely should be attributed to my employer, Neo4j Inc.

This project requires 3rd party dependencies under various licenses, which may or may not be compatible with the GPLv3. As such,

Due to the unfortunate combination of the Academic Free License v3 and the GPLv3 (the original PaySim license), you cannot distribute a complete standalone build of this application and its dependencies (i.e. MASON).

To overcome this, one would have to replace the MASON framework with something GPL compatible. 🤷‍

paysim-demo's People

Contributors

voutilad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.