The document discusses reactive approaches to collecting and modeling uncertain data from sensors in a distributed system. It presents reactive techniques like using queues and immutable data structures to handle out-of-order and concurrent updates at scale. Distributed databases allow scaling data collection across nodes while handling incomplete data from failures. The overall approach focuses on reactive systems principles of responding to changes instead of shared mutable state.
34. Uncertain Data Model
case class PreyReading(sensorId: Int,
locationId: Int,
timestamp: Long,
animalsLowerBound: Double,
animalsUpperBound: Double,
percentZebras: Double)
39. Mutable State
case class Region(id: Int)
import collection.mutable.HashMap
var densities = new HashMap[Region, Double]()
densities.put(Region(4), 52.4)
43. Out of Order Updates
densities.put(Region(6), 73.6)
densities.put(Region(6), 0.5)
densities.get(Region(6)).get
44. Out of Order Updates
densities.put(Region(6), 73.6)
densities.put(Region(6), 0.5)
densities.get(Region(6)).get
densities.put(Region(6), 0.5)
densities.put(Region(6), 73.6)
densities.get(Region(6)).get