eclipse-ditto / ditto

Eclipse Ditto™: Digital Twin framework of Eclipse IoT - main repository
https://eclipse.dev/ditto/
Eclipse Public License 2.0
693 stars 229 forks source link

Reduce network load for cache-sync of authorization-data #126

Closed danielFesenmeyer closed 6 years ago

danielFesenmeyer commented 6 years ago

We currently use Akka Distributed Data for synchronizing a authorization-cache (thing-cache, policy-cache) between all services which either read (search, gateway) or update (things, policies) this data. This works fine, but creates unnecessary network load because the whole cache is distributed to all shards, even if a shard does not need the data. Another disadvantage of the current approach is that the "Akka Distributed Data" cache cannot be cleared, which may cause memory problems in the long run.

In this task, we should at least address the following issues:

Caffeine seems to be a good choice for a local cache implementation: https://github.com/ben-manes/caffeine

danielFesenmeyer commented 6 years ago

Implemented by PR https://github.com/eclipse/ditto/pull/163.