roqua / physiqual

Ruby Engine for merging various datasources with diary questionnaire data
MIT License
1 stars 1 forks source link

Multithreading #17

Open frbl opened 9 years ago

frbl commented 9 years ago

Currently, all calls to the external services are done sequentially. If a user would have both a fitbit and a google fit account, this can easily result into 8 calls to the two services. It could be much faster if these calls could be done asynchronously, e.g.

Thread.new do
    data[:activities] = data_aggregator.activities(from, to)
end

although using a library for this is preferred (e.g. sidekiq)