EventStoreConnection vs ProjectionsManager && IsConnected property in EventStoreConnection

Hello,

I made some tests in .NET about EventStore and I have some questions about the design of the .NET client.

**Events/Projections **

I have the feeling the streams and the projections are totally separated in the client…

To interact with the streams (events) I just need to create an instance of I*EventStoreConnection *which is pretty easy thanks to the Create static method: an URI and it’s OK.

To interact with the projections I thought I would be able to use the same object but it’s not.
I need to create an instance of ProjectionsManager. In order to create that I need :

  • A logger (specific interface from EventStore).
  • An endpoint (not an URI).
  • An operation timeout.
  • A schema (optional).

Maybe I’m missing something but I don’t understand why:

  • Both are totally separated?
  • Both are so different? Why can’t I create a ProjectionManager in the same way as EventStoreConnection?
    I mean let’s take ADO.NET. I create a DBConnection and this connection allows me to do basic queries or call some store procedures. Two different mechanisms on the server (queries/stored procedures) but the same connection from the client (just few adaptations)…

IsConnected

I also have another (more basic) question: Why in the EventStoreConnection there is not property to know if the connection is connected ?

I subscribed to the Connected/Disconnected events to maintain the IsConnected value but I have the feeling it’s not the best way to do it…

Thanks you in advance if you can answer to these questions :slight_smile:

Kind regards,

Dominic

The EventStoreConnection is a TCP connection to the server which runs an async protobufs based protocol.

The calls in a ProjectionManager are just wrappers around the http calls (rest) to control things associated with projections.

re connected I thought there was one, I will go look through the code (there has been at some point).