3 ms·
>> "I want to make a materialized view that's the result of a query, but that gets updated as new rows get inserted or as the rows it uses gets updated." Raven
by judah 12y ago
>> "I want to make a materialized view that's the result of a query, but that gets updated as new rows get inserted or as the rows it uses gets updated."
RavenDB[0] gets a lot of this right for the .NET stack.
RavenDB creates something very much like your continuous view -- called indexes[1] in RavenDB -- for every query you've run against it. Any successive queries aren't really queries at all, but are results from a pre-computed set.
When new data is inserted, the index gets updated asynchronously, leaving you with eventual consistency for your queries.
Raven creates these indexes automatically when you query it. It then maintains these indexes: long periods without querying an index will relegate the index to idle (updates on low priority), and eventually abandoned (no longer updated). This way, your app hot path -- the queries most often used -- remain the fasts, alleviating a lot of performance issues.
[0]: http://ravendb.net http://ravendb.net
[1]: http://ravendb.net/docs/article-page/3.0/Csharp/indexes/what-are-indexes http://ravendb.net/docs/article-page/3.0/Csharp/indexes/what...