Event Store blog - page 4

Projections (intermission)

Tutorials
,

Yesterday I was meeting with a company. We were going through some of their problems and looking at whether the Event Store and in particular stream querying might be a viable solution to any of their problems. It turned out one of the problems was a perfect example of where projections can make a big project tiny. The Problem People put “Bid Strategies” in through a web application. These strategies are then used for blind...


Projections 3: Using state

Tutorials
,

In Projections 2 we looked at creating a very simple projection that would analyze our statistics inside of the Event Store. The projection was: fromStream('$stats-127.0.0.1:2113'). when({ "$statsCollected" : function(s,e) { var currentCpu = e.body["sys-cpu"]; if(currentCpu > 40) { emit("heavycpu", "heavyCpuFound", {"level" : currentCpu}) } } }); This is a very common type of scenario we will find in event based systems. We can describe this as: “When this event happens and this information is on...


Projections 2: a simple SEP projection

Tutorials
,

In the first post on projections we talked a bit about the theory behind projections. In this post we are going to try to create a very simple projection and talk about how it actually works. To start with there is a very special stream inside of the event store. This stream represents statistics measurements that are happening internally. You can control how often they are taken via config. To find this stream in your...


Projections 1: Theory

Tutorials
,

Over at eventstore.com we have 1.0’d the Event Store database as an Event Store (i.e. storing/retrieving events/multinode version/etc) but in the process we did not release projections. They are still marked as experimental. Projections are however getting close to ready so its time to write a bit about them as the official documentation takes shape. Through the series we will get fairly deep into their usage but for many the best way to understand them...


The cost of creating a stream

Articles
,

Travelling and watching people using the Event Store I have seen many with a confusion about how streams work. In particular people are worried about the cost of creating a new stream in the system. The Event Store is built with an expectation that you will have many (millions!) streams. When people talk about doing Event Sourcing for most models they end up with a stream for every instance of an aggregate. Many have been...


Debugging support

News
,

Merry Christmas! We are quite happy to announce that we have recently pushed debugging support for projections to the dev branch (will be on master shortly). When you have a failed projection there is a new button “debug” that you can click. The UI then will tell you how to debug using chrome as your browser. This is actually quite easy to do based on the decision to make JavaScript the programming language for projections....


It’s competition time!

News
,

As Christmas and New Year fast approach us, we have lots of goodies we’re going to be announcing at Event Store! Whenever we talk about the Event Store, we’re careful to point out things that really shouldn’t be done (like using projections to build a broker in JavaScript), but now is the time to ignore that advice for a few days for our Christmas competition! Whoever comes up with what we consider to be the...


Applications and IEvent

Articles
,

We had a question on Twitter about whether events stored in the Event Store have to implement any interfaces or inherit from a base class or similar. Fundamentally, the Event Store doesn’t care what you store inside it - you are responsible for serialization. The remainder of this post talks about the TCP Client API. The reading methods on EventStoreConnection return an EventStreamSlice object, which contains an array of RecordedEvent objects (which are also used...


Øredev Developer Conference: A deep look into the Event Store

News
,

What if I told you that the new Event Store database is an ACID compliant database with only 24 bytes of mutable data? This session will look deep inside the Event Store and architectural decisions and trade offs made in the development of it. See the full presentation (52 minutes) below: A deep look into the Event Store from Øredev Conference on Vimeo. The video was recorded on Thursday 8th November 2012 at the Øredev...


Using JS projections from the browser

Tutorials
,

One of the main use cases we had for using Javascript as our query language was that the same code could be hosted in a browser. You can see a more in depth example of this in the “Event store chat example” that is reachable from the main screen in the management console. Sometimes code speaks 1000 words. <!doctype html> <html> <head> <title>Simple Chat</title> <script src="lib/jquery/jquery-1.8.0.min.js"></script> <script src="js/projections/v8/Prelude/Modules.js"> </script> <script src="js/projections/v8/Prelude/Projections.js"> </script> <script src="js/projections/es.projections.environment.js"> </script>...