Skip to content

Thoughts on architecture

Alexander Batischev edited this page Apr 23, 2016 · 1 revision

This is NOT an official documentation; it's just a collection of thoughts on how Gestalt might be architectured.

Frontend -- computed stats cache

When frontend receives a request, it just pulls the data from the cache.

If the data is not in the cache, frontend should return an appropriate HTTP error code to the client.

Data fetcher -- computed stats cache

Data fetcher spawns an actor for each stat, then periodically pings them all with a request to update the stat.

When an actor dies, its cache entry should be removed.

Stat actors

  • registers an endpoint with Cowboy, providing a module with a handler
  • registers an updater, providing a cache key

computed stats cache

An ETS table.

TODO: a way for plugins to know if upstream data changes, so that they can avoid recomputing things?