Coder Social home page Coder Social logo

hackerdetetorservice's Introduction

Assumption:
- All inputs will be in the format of [Date in the epoch format,IP,Username,SUCCESS or FAILURE] as json in payload of request Ex: 1507365137,187.218.83.136,John.Smith,SUCCESS
- All events sent in order by time. So I have search for failure logins during period of last 5 minutes
Note:
- If there many requests sent to server on parallel, server response based on current status and count he received so far. as example server may have 3 failed and next one arrived due to latency in network the fifth before the forth. Then fifths will be normal but forth will be suspecious
PreRequists as on mac:
brew install sbt
brew install cassandra
Steps to Run:
1- Install Cassandra DB : I selected as it will be easy handle millions of recoreds of logs per clustered DB and parition keys
2- Create Schema using file Schema.txt located at "./HackerDetectorService/conf/cql"
3- This is Intellij project created by Playframwork and you can run it by calling commands
-> sbt clean cleanFiles update compile
then
-> sbt run
4- you can test endpoint by either postman or curl command as follow :
curl -X POST http://localhost:9000/parselogline -H 'content-type: application/json' -d '"1907365745,187.218.83.190,John.Smith,FAILURE"'
5- I have added endpoint /test which run about 1000 parallel thread to hit server to make sure all requests are processed fine.

hackerdetetorservice's People

Contributors

aismail2008 avatar

Watchers

James Cloos avatar  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.