Cluster state from client point of view with EventStore.JVM

Hello,

I saw this question about cluster health : https://groups.google.com/forum/#!searchin/event-store/cluster/event-store/JgPa9SvDJM8/v2PohBPjGtkJ

But i need to know from the EventStore.JVM client point of view, which nodes are connected.

Is there a way to get ClusterInfo with all the MemberInfo ?

Regards

Damien

http GET /gossip any node

I already saw this possibility, put i want to do this from the client point of view.

My client can be by example only connected to node number 1 and if i make a HTTP request /gossip to server only node 2 and 3.

It’s not the same thing.

Do you understand what i mean ?

Do you think, it’s relevant ?

Damien

"My client can be by example only connected to node number 1 and if i
make a HTTP request /gossip to server only node 2 and 3.
It's not the same thing."

Not sure I understand you.

I want to build a monitoring by layer.

I have a layer “web”

I have a layer “eventstore”

After a network error, if my web layer cannot speak to eventstore layer, i want to raise an alert. In this case, the eventstore layer is working correctly. I would like to be able to use eventstore connection of my web to check if it’s ok.

But it’s true, i could make a HTTP resquest from my web layer to event store layer.

WDYT ?

Gossip is over http not tcp

After a network error, if my web layer cannot speak to eventstore
layer, i want to raise an alert. In this case, the eventstore layer is
working correctly. I would like to be able to use eventstore
connection of my web to check if it's ok.

That said define "I want to check if its ok" gossip will tell you the
status that nodes perceive each other. There are other things you may
want to look at such as the stream $statistics-ip:port which will
contain statistics information about your nodes

And the JVM client use HTTP or TCP ?

Le jeu. 12 mars 2015 à 15:05, Greg Young [email protected] a écrit :

TCP

Writing a jvm client over http would be about a days work (its just
implementing atom feeds and I think one exists somewhere). The TCP
interface is lower level and faster.

Thanks for your answers.

But if my TCP network is down. I won’t be able to detect a network failure between my web layer and my eventstore layer.

Le jeu. 12 mars 2015 à 15:14, Greg Young [email protected] a écrit :

Hi Damien, it is on todo list to provide api so user could register own listener and get cluster info whenever it changes. Would it help you ?

If you tcp network is down you will get errors on any of your
operations over tcp no?

Hi,

I think that whats Damien wants to know is how to check that the client is correctly connected to the eventstore cluster, from within the client itself.

Cheers

Thanks Yaroslav, that exactly what i need.

The reactivemongo client allow the same things. Maybe you can take a look : http://reactivemongo.org/releases/0.9/api/index.html#reactivemongo.core.commands.ReplStatus$

Damien

The JVM client gets it over http too wouldn't that cause the same
issue as you mention above?

Yes, maybe the JVM client should use TCP for that

Le ven. 13 mars 2015 à 10:14, Greg Young [email protected] a écrit :

What is the issue you are trying to solve?

I want to regularly check that my client is able to communicate with my cluster

Le ven. 13 mars 2015 à 10:18, Greg Young [email protected] a écrit :

OK so http will tell you the state of your cluster (not just one node).

There is another message called ping though I have to check if its
exposed that tells you if the other side is alive. That said there are
already messages that go back and forth and work like ping (heartbeat
messages). If you lose network connectivity or the server dies etc you
will lose your connection.