Question

I'm evaluating Hazelcast and I have a simple clustered application which is doing a simple distributed computing. What I need is a way to log messages on the cluster nodes and have a single point for viewing them. Is this possible using Hazelcasts LoggingService ? or do I need to write my own code for that ?

Use Case: Cluster with 2 nodes, a Runnable which is logging some information, submitting the Runnable to distributed executor and have a one log file on one machine to view all the logs from all the nodes.

Thanks in advance

Was it helpful?

Solution

There are many ways to do it.

You could use one (or more) blocking queues for that. Produces send messages to the queue and you can have a listener that reads them from the queue.

You could also use a ITopic for that, so you can have multiple listeners for the same stream of log events.

But be careful with the granularity of logging. Logging in itself can be expensive due to object creation, but it will also put a lot of pressure on the cluster if you send many little messages.

A bad solution can be implemented in no time. So make sure that you have got your specifications clear and do benchmarking from day one so that you are not shooting yourself in the foot.

OTHER TIPS

After some investigations we can up with the solution to use one of the Log Management Solutions available at the market. And we have choosen the Graylog2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top