Running the tools I used in my presentation

Demonstration 1 (running Event Store)

You can use one of my Event Store runner command files to run the single node version of Event Store, using default ports of 2213 for HTTP and 1113 for TCP, and with a wildcard HTTP pattern. Both take a single command line parameter to specify the location of the data and log files. The runners assume the single node executable is located in C:\EventStore\v2.0.1, and will placed data files and logs beneath C:\EventStore\Data, i.e.

RunEventStore.cmd TestData1

This will create data files in C:\EventStore\Data\TestData1\Data and log files in C:\EventStore\Data\TestData1\logs.

If, when running Event Store you may see the following message,

[03288,15,06:23:00.622] Failed to start http server Access is denied

You will either need to run Event Store in an administrator console window, or you can use the netsh command to create a firewall permission to allow HTTP listening (this will need to be run, once, in an administrator console window),

You can always delete this later by running the delete; netsh http delete urlacl url=http://*:2213/

If you want to confirm that everything is running OK, open the management console in a browser by navigating to http://127.0.0.1:2213. If at any point you are asked for a user name and password use the default of ‘admin’/‘changeit’.

Demonstration 2 (reading and adding data, curl)

In my second demonstration I used curl directly from the console to read streams, write events and then read back those events. On GitHub I have included is a set of curl commands, CurlCommandLine.txt, and a sample data file, SampleData.json, to load an event into a DDDNorth3 stream.

As there is not much data in the Event Store at this point I used the $stats-127.0.0.1:2113 which is a stream containing performance statistics for Event Store and is updated every 30 seconds (default).

Demonstration 3 (projections)

On GitHub I have included a sample projection, Projection-ByRoom.txt, which will create streams based on the room on which a session was held on the DDDNorth3 agenda.

Browse to the management console, http://127.0.0.1:2213. Click on Projections, New Projection, give it a name, Sessions-ByRoom, and copy in the JavaScript in the Projection-ByRoom.txt file. Select Continuous, tick Emit Enabled and then click on Post. It should run immediately.

You may by challenged for the administration login for the management console, if so use the default user name and password; 'admin'/'changeit'.

Demonstration 4 (C# client)

The final demonstration was the Visual Studio 2012 project using the Event Store client – referenced directly as C:\EventStore\v2.0.1\EventStore.ClientAPI.dll, although you can switch this to the latest Event Store client NuGet package.

The source code provides a console app for viewing projections with the projection manager (HTTP connection), as well as containing a full set of data for the entire DDDNorth3 agenda. It also deals with the strategy for reading newest events backwards to older events and ignoring older events that have been superseded.