On 10/6/05, Peter Bodik <[EMAIL PROTECTED]> wrote: > Hi, > we're planning to use ganglia in a Java environment and thus need these two > things: > > 1. from Java/J2EE application update a specific metric: > > We'll probably use a lot of user-defined metrics and some of them will be > updated every second, so running gmetric every time is probably not the best > thing to do. Since gmetric is just a call to the ganglia library, we're > thinking of just calling the library directly from Java.
Even if this *did* work (which may or may not be true); I doubt the data would be transmitted in real-time fast enough for the results to be updated every second. > 2. read the data in Java; we'll need the data in real-time, so this should > be fast: > > Here the plan is to listen on the multicast channel and process the data > directly in Java. However, we don't know how to parse the packet data. > > Do you have any suggestions? If you're going to be sending and listening on the multicast yourself, and parsing the syntax yourself, it may be easiest to design the system to have multiple data transmission system plugins, and for the default one to simply generate and recieve data in a format (maybe a spinoff of a Ganglia-readable XML format?) and then use that directly. Someone else may have a better idea, though. Seeing as this is a question about using the libmetrics code directly in Java, I'm not sure if this is a -general question (but I could be wrong, and maybe procedure is for you to go here first). > I know there was some discussion about Java some time ago so I'm wondering > if somebody already has this code written. -- ~Mike - Just my two cents - No man is an island, and no man is unable.

