Hi Teemu, The API for discovery is defined by the OSGi Remote Services Admin specification (chapter 122 in [1]). The API basically goes through the EndpointListener. In the CXF-DOSGi project this is implemented and backed by Zookeeper as you say. There is a demo for this here: http://cxf.apache.org/dosgi-discovery-demo-page.html
The nice thing about the Remote Service Admin spec is that you can mix-and-match the components. So if you can find another implementation of Discovery, you can quite easily replace the Zookeeper based one in CXF with your alternative if you prefer to do that. Or you could even use them side-by-side. On the configuration of zookeeper itself. I'm not 100% familiar with how to configure it for a clustering setup. In CXF-DOSGi the zookeeper configuration does use an IP address, which is fed to the system trought Configuration Admin. As Configuration Admin is dynamic you can actually change the zookeeper server IP at runtime. But Zookeeper itself might support more advance cluster configuration - it would be worth asking the zookeeper project about that. Hope this helps, David [1] http://www.osgi.org/Download/Release4V42 On 30 September 2010 09:05, teemu kanstren <[email protected]> wrote: > Hello everyone, > > I need to have some services communicate in a distributed and dynamic > manner and I was looking at distributed OSGI (DOSGI) and the Apache CFX > implementation. The DOSGI spec seems to leave discovery open and I am > looking for some means to do dynamic discovery over the network (like SSDP > from UPnP does) to find the services and use them together. However, as I > see from the documentation, the CFX DOSGI uses Zookeeper and it seems to me > that Zookeeper needs to be statically configured with pre-set IP's. > Otherwise it would seem to do very nicely what I am looking for.. > > So, the question is, is there some way to do dynamic discovery with the CFX > DOSGI? If not directly with Zookeeper, can I perhaps combine it with the > OSGI UPnP service and use that to initially discover the Zookeeper IP? It > also seems to me that I need to define the Zookeeper IP on startup, which > could be an issue if I need to reconfigure it myself during runtime. > > So, any ideas, help, example code :) would be apprechiated..? > > Thanks, > Teemu >
