absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.46k stars 669 forks source link

Evaluate RethinkDB #56

Closed drasko closed 7 years ago

drasko commented 8 years ago

Based on this: https://groups.google.com/forum/#!topic/rethinkdb/Iax_-VPmUuQ, and also on https://github.com/Mainflux/mainflux/issues/55 and https://github.com/Mainflux/mainflux/issues/53 (Hydra uses RethinkDB), we need to evaluate it and see how it fits in Mainflux system.

Opening this issue so we can track observations.

drasko commented 8 years ago

@nmarcetic What is the conclusion about this? Do we need it? Or we stay with MongoDB?

One potential use - we need triggers, IMHO (or some kind of). For examle - when you delete the device you must trigger deletion of all of it's channels.

For users, we might potentially also need triggers.

Would you guys consider also Scylla? Maybe it is better for our needs than RethinkDB (faster, more scalable as it cluterable)... I saw that Go driver is still not so stable (they use Cassandra one) - but I guess official one will come soon.

nmarcetic commented 7 years ago

@darkodraskovic I am still thinking on this, will come with useful info soon.

drasko commented 7 years ago

@nmarcetic OK, great. Hydra uses RethingDB, and I am currently doing PoC for our custom Identity Provider.

I think it would be great that our IdP is Hydra-compliant, i.e. that it can handle Hydra consent.

But we will not need Oauth2.0 in the beginning - it will be needed later for tenant apps, so that you can give your users opportunity to log in with Mainflux account (the thig that does redirection for user of your app to log-in into Mainflux)

For now we need only custom IdP and then ACL, for example like this: https://github.com/ory-am/ladon

For Mainflux itself I would rather look at Scylla, it seems to have killer performances.

drasko commented 7 years ago

@nmarcetic can RethinkDB be used to achieve user-defined triggers, similar to this: https://m2x.att.com/developer/tutorials/triggers

I.e. we need possibility for user to define "less-than" or "greater-than" or similar on the channel he is observing and then his callback will be called (anomaly detected, alarm risen),

drasko commented 7 years ago

This (sadly) concludes the discussions: https://rethinkdb.com/blog/rethinkdb-shutdown/