EventStore 3.0.0 Embedded mode

The release notes for 3.0.0 say that “Embedded mode allows hosting of the Event Store in your own processes”. Is there any docs on how to setup inproc hosting of EventStore?

Thanks.

See embedded client. Lots of tests there. Basically you want to use the vnode builder then there is a client api that works almost exactly like the dotnet client

Thanks for the quick reply. Have one more question though.

Is it ok to use this mode to run EventStore in production?

Yes it is. If you look ClusterNode as an example just hosts
clusteredvnode as well.

I put up an issue for an example/docs.

More questions regarding embedded mode.

  1. Is it possible not to not use any TCP/HTTP ports? We are using EventStore in the IIS process, so user has no permissions to use ports by default.

  2. How to manage projections? Is it possible to do with EmbeddedEventStoreConnection? I’ve seen the issue on github, but it looks like there is no API for it yet.

  3. When projections management is available? What I mean is that I’ve found a code in tests of EventStore that handles start:

var embeddedVNodeBuilder = EmbeddedVNodeBuilder.AsSingleNode().RunOnDisk(settings.EventStorePath)

                                                                      .RunProjections(ProjectionsMode.All)

                                                                      .WithInternalTcpOn(new IPEndPoint(serverIp, intTcpPort))

                                                                      .WithExternalTcpOn(tcpEndPoint)

                                                                      .WithInternalHttpOn(new IPEndPoint(serverIp, intHttpPort))

                                                                      .WithExternalHttpOn(httpEndPoint);

     ClusterVNode clusterVNode = embeddedVNodeBuilder.Build();

var startedEvent = new ManualResetEventSlim(false);

        clusterVNode.MainBus.Subscribe(new AdHocHandler<UserManagementMessage.UserManagementServiceInitialized>(m => startedEvent.Set()));

        clusterVNode.Start();

        if (!startedEvent.Wait(60000))

            throw new TimeoutException("EventStore haven't started in 60 seconds.");

But it seems that its not enough, because this code

    var statusString = await manager.GetStatusAsync("$by_category");

Fails with System.Net.WebException: The request was aborted: The request was canceled.

Thanks.

var notListening = new IPEndPoint(IPAddress.None, 0);

_node = EmbeddedVNodeBuilder.AsSingleNode()

.WithExternalTcpOn(notListening)

.WithInternalTcpOn(notListening)

.WithExternalHttpOn(notListening)

.WithInternalHttpOn(notListening);

I would recommend against running GES on IIS. What happens during a recycle?