Stock Ticks Time Series processing with PHP and MongoDB Aggregation (Rollups)

Closed Posted Aug 5, 2014 Paid on delivery
Closed Paid on delivery

Must be familiar with MongoDB and PHP especially MonogDB aggregation and Rollups. Be very comfortable with time series data and OHLCV concepts.

Preference to those who private message with schema/implementation ideas or previous relevant examples.

Task: Design MongoDB Schema and write php/mongo code for aggregation + rollups

We process thousands of rows per hour of incoming data that looks like this:

time|amount|price|total

time|amount|price|total

....

data is received via a JSON GET api which causes issues since data at the api can have old trades be but only new data must be added to mongodb.

Data comes from various sources so PHP function should take an input similar to

process_ticks($time,$amount,$price,$tid){

//VERSION1

//record a raw trade … 1. for long term and one for short cap like “100 last trades"

$trade=record_raw_trade(){};

//WriteResult()

if($trade){

//if trade is recorded then update stats/graphs …etc

$roll_up = roll_up_trade(){

do_per_minute(o,h,l,c,v)

};

}

//VERSION2 (shorter)

mongo find(where trade_id < $this_trade_id, insert_id, do_rollup($inc))

}

Requirements

1. Real time … as data comes in

2. Atomic Inserts + Data consistency, don’t insert / rollup the same trade more then once

3. Archive old data

Expectations:

1. Well commented and nicely structured code

2. Meaningful variable and functions names

3. Documentation if needed

NoSQL Couch & Mongo PHP Software Architecture

Project ID: #6280307

About the project

3 proposals Remote project Active Sep 11, 2014

3 freelancers are bidding on average $266 for this job

zahariash

Hello, I think that solution with atomic agregate operactions could be possible in MongoDB... I have some questions: 1. Is there some sort of unique id to detect duplicates? 2. Are there any requiments for time More

$333 USD in 7 days
(6 Reviews)
4.0
prasannakumarkk

Am well versed in the No SQL Mongo. I have experience in working in the aggregation framework and map-reduce function in mongo. I have little exposure to PHP. Let me know if PHP knowledge is more needed.

$222 USD in 7 days
(0 Reviews)
0.0