None of the endpoint registry implementations that we have so far work
completly for everything we need, the Hazelcast one looks to me like
its the best one so far in terms of functionality and ease of use so
I'm focusing on using and improving it. Are you just trying to get an
understanding of where things are at with it or are you suggesting
that one of the other impls may have more promise?

Some coments in line

On Tue, Jan 19, 2010 at 5:47 AM, Raymond Feng <[email protected]> wrote:
> Hi,
>
> I was trying endpoint-hazelcast. The distributed map from Hazelcast doesn't
> seem to work out of the box for our SCA domain registry which requires the
> following:
>
> 1) Each member can contribute entries to the map and they can be seen by all
> members in the group (
> 2) The entries added by a member (the Hazelcast instance where getMap () is
> called) are owned by the member
> 3) When the member leaves the group, all entries owned by the member should
> be removed.
>
> Hazelcast can support 1), but we need to do some work to get 2 & 3 working.
> As far as I see the from test case [1], Hazelcast IMap.localKeySet() is not
> the ones that are added locally by the owning member.
>

Thats not actually what the localKeySet method is for as its also
returning keys that are being backed up by the node (which happens by
default though we don't need this backup function so could switch it
off). Is there a problem with using the isLocal method on the
HazelcastEndpointRegistry?

> I could not find a built-in eviction policy from Hazelcast that suits this
> need. And it seems that Hazelcast doesn't give us the owner (the member that
> put the
> entry) of a key.
>

No it doesn't out-of-the-box (the Tribes one doesn't seem to work
properly either), I've looked at _lots_ of these clustering toolkits
and none of them look like they do quite what we'd ideally have for
this, but Hazelcast does have features we can use to implement this
ourselves. I've not started implementing it yet as it doesn't seem to
really matter if there's old endpoints left in the registry for any of
the use cases I've had. Does this cause a problem for what you need?
If so lets just fix it, the simplest way would be to have a member
listener watching for members leaving and have that remove all the
endpoints from that member.

   ...ant

Reply via email to