GithubHelp home page GithubHelp logo

magic-batch's Introduction

magic-batch

Built with Java 8+, Spring Boot (2.0.3) Redis (3.0.4)

Tested with JUnit (4.12) and JMeter

Executes via Spring Boot with three Spring Profiles (dev, qa, dk) - assumes mvn clean install

  • dev Profile processes the batch asynchronously and logs out the data

mvn spring-boot:run -Drun.arguments="-Xmx256m,-Xms128m"

  • qa Profile requires Redis running (configured via application-qa.properties)

mvn spring-boot:run -Drun.profiles=qa -Drun.arguments="-Xmx256m,-Xms128m"

  • dk Profile requires Docker (configured via application-dk.properties)

docker-compose up

or update docker-compose.yml and instead of building pull down image

image: "jtdeane/magic-batch"

then execute compose

docker-compose up

Submit Batch (dev, qa)

POST http://localhost:8080/batch

Content-Type application/json

Batch JSON (example)

{"batchId":"A1234","date":"09252017","orders":[
{"id":"X1351","customer":"Turner","item":"Rings","amount":4},
{"id":"X1352","customer":"Turner","item":"Dice","amount":2},
{"id":"X1353","customer":"Turner","item":"Scarf","amount":1}
]}

See src/main/resources/application.properties for available items.

Query Order (qa)

Assuming a batch of orders have been posted and stored in Redis, then individual order totals can be retrieved.

GET http://localhost:8080/order/{id}

magic-batch's People

Contributors

jtdeane avatar

Stargazers

 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.