AO-StreetArt / CrazyIvan

A Service for tracking relationships between different coordinate systems for use in graphics programming
Other
2 stars 1 forks source link

Scene-Device Caching #72

Closed AO-StreetArt closed 6 years ago

AO-StreetArt commented 6 years ago

Short-term in-memory cache for Scene-Device relationships to reduce need to call to Neo4j. The cache should be utilized instead of calling Neo4j when available for identifying devices to send updates to.

AO-StreetArt commented 6 years ago

Here's the logic:

  1. On receipt of kafka update, add scene to time-expired cache of scene ID's
  2. Check Scene-Device cache (seperate, time-expired cache of scene ID's and device info) for scene 2a. If not present, execute query & populate. If configured to still send updates, do so 2b. If present, send update
  3. On background thread, periodically query Neo4j and populate Scene-Device cache