I was thinking that ldap may be handy for the registry, but hopefully
Chris will join the discussion at this point...   Though camel does
not support ldap (yet).

So your snippet would actually solve the heartbeat problem.  But I'm
not sure we can send the whole data at each heartbeat.  I guess it
depends how bit this data is, but if we have lots of services in the
OSGi registry, it may not be very scalable.  So we would have to
default to send only updates or find another mechanism to send the
data (the heartbeat could just contain the url of our container, and
the data would be retrieved by another mechanism).

On 10/11/07, James Strachan <[EMAIL PROTECTED]> wrote:
> Interesting discussion :)
>
> On 11/10/2007, James Strachan <[EMAIL PROTECTED]> wrote:
> > On 11/10/2007, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
> > > Bringing this thread to dev list
> > >
> > > On 10/11/07, James Strachan <[EMAIL PROTECTED]> wrote:
> > > > > We need to find a way to discover other ServiceMix instances (through
> > > > > ActiveMQ ? any other idea ?)
>
> [big snip]
>
> > > > From a low level I was wondering about a Camel factory bean in spring
> > > >
> > > > <camel:heartbeat bean="someBeanRef" property="myStatusEventObject"
> > > > millis="2000" uri="http://someServer.com/cheese"/>
> > > >
> > > > This would call someBeanRef.getMyStatusEventObject() every 2 seconds
> > > > and send the POJO to the endpoint URI. We could maybe wrap up this
> > > > using some route? e.g. if the bean endpoint allowed for polling we
> > > > could maybe do
> > > >
> > > > from("bean:someBeanRef?method=getMyStatusEventObject&period=2000").to("http://someServer.com/cheese";)
> > > >
> > > > though maybe a factory bean (XML element) is a bit easier - it does
> > > > have better smart completion at least :)
> > > >
> > >
> > > I like the idea of using camel to configure the discovery mechanism.
> > > This would be very flexible.
> >
> > Yeah; am thinking we could do content based routing or message
> > translator stuff to format the POJO of the heartbeat data into
> > different formats, sending it to different locations etc
>
> As an experiment in implementing a POJO based heartbeat mechanism
> thats protocol and data format independent (and can support the easy
> integration of EIP) I thought I'd try write a little test case in
> Camel.
>
> It turned out to be surprisingly easy :)
>
> from("bean:myService?methodName=status").to("mock:result");
>
> where the status() method is invoked periodically on the myService
> bean and then sent to the registry endpoint (a mock in this case as
> its a test case, but this could be activemq:topic:foo.bar etc)
>
> Here's the test case if you're interested...
> https://svn.apache.org/repos/asf/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanMethodHeartbeatTest.java
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source SOA
> http://open.iona.com
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Reply via email to