title: Aggregate design with EventSourcing and large number of events
body: <p>I'd like to start adventure with EventSourcing. As a playground I have a system that gathers data from set of Sensors organized in Arrays. Each Sensor have a single value like temperature. What I need from this system is </p>
  
  <ol>
  <li>to get the current value of Sensors readings</li>
  <li>last month of Sensor value history</li>
  <li>when Sensor value changes, I have to calculate Array "status" and
  store it (also for a month)</li>
  <li>Array "status" can be corrected manually by the user</li>
  </ol>
  
  <p>Number of Arrays and Sensors is growing. For each Array I have many readings per second.</p>
  
  <p>Now I wanted to have the Array as an Aggregate with Sensors as it's entities. In this case each Sensor reading update would upgrade Array Aggregate version. That gives > 10M of changes for a month. In this design I can't cut off not old events. I can't think about time required for restoring ReadModels after a year of data.</p>
  
  <p>I think I could store current state as CRUD table and remove Sensor current data from Array. Keep just definition. Then I can use service that will handle the Sensor data stream, check Array "status" and keep Array "status" as separate Aggregate. Service would emit "Sensor data update" event. This event would trigger ReadModel keeping historical data handling 1 month constraint. I will not pollute event store with Sensor readings events. In case of Array "status" I will be able to remove whole past "status" Aggregates from the event store. Arrays would keep only Sensor definitions, so EventStore would be relatively small.</p>
  
  <p>I loose complete history. I can't restore my 1 month signal history ReadModel. I would have to pay additional attention not to break it.</p>
  
  <p>The goal is to learn how to scale EventSourcing / CQRS system. How to handle large EventStore and rebuild damaged or inflate new ReadModels within hours not days.</p>
  
  <p>Does this idea fits into ES / CQRS? 
  (EDIT: is it OK to update RM with event stream not from an Aggregates?)</p>
  
  <p>How to handle issues with growing event store and fixing broken ReadModels?</p>
  
  <p>Thanks!</p>