-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shared 'observe relation' store at CoAP client side. #36
Comments
We could start discussing this issue. I have a proposal such as: To have a single observation listener for all subscriptions such as:
And observation store interface, that could be implemented as database:
|
It's hard to me to see how this will be used as I didn't know java-coap so well for now. But I can try to provide some feedback. (keep in mind that I maybe don't really get what you have in mind)
|
Good point, it should be
Well, that will be called by server when handling new subscription (GET with obs header). What kind of user data are you thinking of? Would it be possible to retrieve such meta data by implementation class of
Yes, all those info will be available. |
I will probably create a kind of adapter which will implement When But I need the That's why I would like to add the registration id to the coap request when I translate the LWM2M request to CoAP request, so I can find it back on I hope I'm almost clear 😁 |
Adding registration-id (or any other meta data) is possible through TransportContext so I don't see issue there. Yes, that was very clear. |
Minor updates to interfaces: public interface ObservationRelationsStore {
void add(CoapRequest obsReq); // contains: Uri-path, Token, IP address, and TransportContext
void remove(SeparateResponse obs); // contains: Token, IP address and TransportContext
Optional<String> resolveUriPath(SeparateResponse obs); // contains: Token, IP address and TransportContext public interface ObservationListener {
/**
* Handles incoming observation
* @return if false then server will terminate observation by sending RESET
*/
boolean onObservation(String resourceUriPath, SeparateResponse observation); |
- added ObservationListener - added ObservationRelationsStore - CoapServer with outboundObservations service; - InboundSubscriptionManager - moved ObservableResourceService to test scope
- added ObservationListener and ObservationRelationsStore - CoapServer with outboundObservations service; - InboundSubscriptionManager - moved ObservableResourceService to test scope
- added ObservationListener and ObservationRelationsStore - CoapServer with outboundObservations service; - InboundSubscriptionManager - moved ObservableResourceService to test scope
- added ObservationListener and ObservationRelationsStore - CoapServer with outboundObservations service; - InboundSubscriptionManager - moved ObservableResourceService to test scope
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
- added NotificationsReceiver and ObservationsStore - CoapServer with outboundObservations service; - ObserversManager - moved ObservableResourceService to test scope - support observe with FETCH
Following #27, I created this issue.
Short Summary :
Being able to store observe relation at CoAP client side in a shared store.
The idea is to not lost observation relation on reboot but also being able to share observe relation in a cluster.
Long story :
A LWM2M server in production often need to persist observe relation or to shared when deployed in a cluster.
Note that from an CoAP observe perspective, a LWM2M server act as a CoAP client.
About persistency :
When you create a LWM2M server based on Leshan and you manage lot of clients in production with lot of Observe Relation. When you reboot your server, this will be an issue to resend all observe requests.
About cluster :
Most of people who use Leshan in a production server want to be able to launch it in a cluster and so observation relation must be shared between all instance of the cluster. Currently in Californium this is achieve with a ObservationStore interface.
This issue aims to discuss about :
Some challenge we need to have in mind are probably described in leshan wiki.
Some design questions :
The text was updated successfully, but these errors were encountered: