You should probably do this using a Graph Database, eg: Neo4j. You can 
solve the problem with one query, instead of actually performing 
calculations: but this obviously would cost your application another 
database, and some learning possibly. But its always cool to learn new 
tools.

Neo4j has REST API, so you can insert nodes, relationships, perform queries 
... you dont actually need Java in your end.

Neo4j you can get an instance on Heroku and do some tests.

Em domingo, 16 de março de 2014 14h47min22s UTC-3, Andy Zelinski escreveu:
>
> I am hoping for someone to point me in the right direction (examples, 
> info) on how best to handle the need for some processor heavy computations 
> that might best be executed with C++ math libraries.
>
> example scenario pseudocode:
>
> 1. application user clicks "give me 10 movies to watch" button after 
> entering age, iq, time of day,  and how much time he/she has to watch. 
> (some post data needed as calculation parameters)
> 2. application pulls some historical data from database: an array of 
> [person id, age, iq, movie watched, time watched, movie length, rating user 
> gave] -- say a million data points in an array
> 3. application then needs to apply a sophisticated math model to all data 
> points and includes other hard-coded parameters. 
> 4. assume after watching one movie, all the hard-coded parameters change 
> as a side effect, so the algorithm should rank all movies in likelihood 
> loved from 1 to n, choose the top ranked movie for user, and then iterate 
> for the next 9, re-applying the math model
>
> is this best handled by forking a child_process? use node-ffi? wrap a c++ 
> object that can handle the math and pass the parameters?
>
> thanks a million
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to