Raven StreamsWhat to do with the data?
So, we have events sitting in a stream, and you can append to them as long as you like. And you can read from them, too. And you can also generate aggregations and look at those. In the previous post, I discussed the example of billing for a phone company as the example.
Let us consider this for a second. You’ll probably have aggregation per customer per month. So loading them would probably look something like:
eventStream.AggregationFor<MonthlyBilling>(“customers/1234/2013-05”);
And that is nice & all, but what about the more complex things? What happen if I want to search for high billing statement? Or all statements for the past year? What happen if I want to do a lookup by the customer name, not its id?
Well, I already know how to use Lucene, so we can plug this into the system and allow you to sear…
Wait a second! I already wrote all of that. As it turns out, a lot of the stuff that we want to do is already done. RavenDB has it implemented. For that matter, storing the aggregation results in RavenDB is going to introduce a lot of additional options. For example, we can do another map/reduce (inside RavenDB) to give you additional aggregation. We can do full text search, enrich the data and a lot more.
So that is what will probably happen. We will be writing the aggregated results from Raven Streams into RavenDB as standard documents, and you could then process them further using RavenDB’s standard tools.
More posts in "Raven Streams" series:
- (06 Jun 2013) What to do with the data?
- (05 Jun 2013) Aggregations–from the system point of view
- (04 Jun 2013) aggregations–how the user sees them
Comments
Comment preview