Giter VIP home page Giter VIP logo

jcme's Introduction

jcme

The purpose of this project is to compare/contrast java and clojure implementations of naive matching (stock) price engine.

Expected hyposis is that:

  1. java implementation should be a bit faster (2-9 times)
  2. clojure implementation should be much shorter and modular

Project structure

  • bin - fat jars for the implementations
  • jcmec - clojure implementation
    • builds with leiningen
    • uses ring (jetty 6x), moustache
  • jcmegen - clojure client that generates input, calls into web service/s, verifies and prints results
  • jcmej - java implementation
    • builds with maven
    • uses CXF (jetty 7x)
  • build.sh - bash script that builds the implementations
  • buid_run.sh - bash script wrapper that invokes build.sh and then run.sh
  • config.clj - input configuration in clojure reader compatible format
  • README.md - this file
  • run.bat - Windows version of run.sh
  • run.sh - invokes main of jcmegen against pre-build jars in bin

Matching engine requirements

  1. REST JSON interface
    • POST /match
      • json: orderId (B|S plus sequence number), price
    • GET /max/B|S
    • GET /results
    • GET /reset
  2. Support concurrent requests for match and get max buy and sell price.
  3. Return unmatched items.
  4. Reset internal state so matching session can be repeated.

To run

./run.sh || run.bat

To build and run (if you made changes)

Make sure maven and leiningen are installed and on the PATH ./build_run.sh

Todo List

  1. Port the rest of bash scripts to Windows bat
  2. Implement scala version
  3. Implement haskell version
  4. Collect run statistics: jcmegen will call into public web app which will store and report on run statistics.

License

Copyright (C) 2011 Vitaly Peressada

Distributed under the Eclipse Public License, the same as Clojure.

jcme's People

Stargazers

Francisco Gutierrez avatar  avatar Fernando Racca 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.