/big-data-wisconsin-2018-demo

Contains the demo materials pertaining to https://2018.bigdatawisconsin.org/sessions/how-to-use-millions-of-mobile-activity-logs-to-understand-our-customers-in-real-time/

Primary LanguageScalaMIT LicenseMIT

Demo Materials

Model creation/export (via Databricks notebook)

You can create a free Community Edition account with Databricks, and then follow the instructions to import the Export Model.dbc notebook into your environment.

Local microservice (via Lagom)

After executing the Databricks notebook (and downloading your model JAR), then update the local path to the model file within the FraudmodelServiceImpl class. Alternatively, you can find a local copy of the model JAR in the resources folder.

Once you've done this, then build and run the project using the SBT command below.

./sbt runAll

Service endpoints

After running the local microservice, you can reach the endpoints below.

Model metadata

GET
http://localhost:9000/api/fraud

Analyze record

POST
http://localhost:9000/api/fraud/analyze

Content-Type
application/json

Body
{"RegisteredDevice":1,"Flow":"hacker-portal","Action":"BALANCE_INQUIRY","Amount":0}