celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject Re: svn commit: r1627454 - in /celix/trunk/remote_services/discovery_etcd/private: include/etcd.h src/etcd.c src/etcd_watcher.c
Date Tue, 07 Oct 2014 18:23:08 GMT
Hi,

@Isaac: TTL is indeed Time To Live. Etcd uses this to remove a value from
its tree after the TTL. If for example a host goes down, ie crashes, or
network problems, the entry would not be removed from the tree, and other
users could still try to connect to it.
A host has to update its own values within this TTL. Basically this update
means refreshing the TTL, so it start at the max again.

@Bjoern
I did some more digging, and I guess the problem is with how Celix watches
for changes. After calling the "etcd_watch" "etcdWatcher_addOwnFramework"
is called, which basically re-adds the values for that discovery (I guess
to refresh the TTL). But this triggers an update of the value, which in
turn triggers the watch of the other side with a new set. This result in a
remove/add of the discovery endpoint.
This results in the remove/add juggling. The interval is about 10 seconds,
I am not sure where this one comes from.

The Amdatu implementation does not yet support TTL. But is this behaviour
as expected? I don't think a TTL update should trigger a "set" on the other
ends..

What do you think?


2014-10-07 19:11 GMT+02:00 Alexander Broekhuis <a.broekhuis@gmail.com>:

> Hi,
>
> 2014-10-07 19:05 GMT+02:00 Bjoern Petri <bjoern.petri@sundevil.de>:
>>
>>
>> the ttl specifies the specified time to live for the key in seconds. The
>> discovery_etcd announces itself with a ttl of 30 seconds. If the etcd-watch
>> of the amdatu discovery etcd-implementation (not the
>> endpoint_discovery_poller) takes more time than this, the described
>> behavior occurs. Because the etcd-watch is nothing else than a long poll,
>> the timeout values has to be set accordingly. The celix discovery-etcd
>> implementation currently uses 10 seconds for that.
>>
>
> Can we align this to work out of the box with Amdatu? I think there is
> great value in having a working implementation with as little setup as
> possible. If there is a specific reason for the 10 seconds in Celix, we
> need to document this somewhere.
>
> Thanks for the explanation!
>
> --
> Met vriendelijke groet,
>
> Alexander Broekhuis
>



-- 
Met vriendelijke groet,

Alexander Broekhuis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message