Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Leshan Subscription/Notification

This is probably not an exhaustive limitation list but there is :
    - no API to cancel observation
    - no API to add securityInfo in redisSecurityStore (this means no easy way to add "expected DTLS credential")

Le 10/01/2017 à 11:20, Santos Das a écrit :
Hi Simon,

Thank you. Looking at your other response to Ramakrishnan on a different thread. It seems it has all the things what I have been looking 

As you said, these are the cluster release and this has not been tested well. But, apart from this. Do you think any other limitation for an Application User not to use the same?

Thanks, Santos

On Tue, Jan 10, 2017 at 3:12 PM, Simon Bernard <contact@xxxxxxxxxxxxxxx> wrote:

1. You're right.

2. Demo is a just a demo. This is clearly recommended to implement your own REST server. For now Leshan provides libraries which help people to develop their own Lightweight M2M server and client.

3. I have no particular recommendation, it depends of your use case.


Le 10/01/2017 à 10:03, Santos Das a écrit :
Hi,

I went through the previous messages, most importantly the following, now I have few questions -

1. The Leshan Server does not have any REST interface. The REST Interface is provided by the Leshan Demo Server. At least this is what it seems to be from the code. Is this correct?

2. If the above assumption is correct, then how scalable is the Demo REST Server. Is it recommended to develop the own REST Server in production environment or the Leshan Demo Server is fine? I am bit confused as the name itself makes it Demo.

3. What is the recommendation to  implement the Subscription/Notifcation? Is it through Broker like what is mentioned here https://github.com/eclipse/leshan/wiki/Cluster?


[On Wed, Mar 9, 2016 at 3:24 PM, Simon Bernard <contact@xxxxxxxxxxxxxxx> wrote:
The Leshan Java API expose a listener on ClientRegistry (as I explained before), so if you need PUSH notification you can implement it easily.
The examples[1] that I gave in my previous email, use this listener to push new registration/update/deregistration as a "Server-sent events"[2]. (This API is used by our demo UI [3])
Up to you to implement it with the technology adapted to your use case. (e.g. AMQP ..)

-Santos

On Mon, Jan 9, 2017 at 7:22 PM, Santos Das <santos.das@xxxxxxxxx> wrote:
Hi Simon,

Thank you for your reply.

I looked at it earlier too. But, these are a part of the demo server. I have a REST Server (running without LESHAN) on a Virtual Machine and I want to pull the information or get notified from the LESHAN Server.

Any help on how this can/should be done?

Thanks, Santos


On Mon, Jan 9, 2017 at 5:01 PM, Simon Bernard <contact@xxxxxxxxxxxxxxx> wrote:

You can look at the demo code to see how to use API.

About listening observation and registration, here is some code sample

For the last master version :

server.getRegistrationService().addListener(registrationListener);
server.getObservationService().addListener(observationListener);

For the last milestones release (0.1.11-M14) :

server.getClientRegistry().addListener(clientRegistryListener);
server.getObservationRegistry().addListener(observationRegistryListener);

Le 09/01/2017 à 10:59, Santos Das a écrit :
Hi,

I am looking for some examples for subscription and Notification. 

For example, my application wants to subscribe to the Leshan Sever to get a notification when the device gets connected.

Could you please point me to some examples.

Thanks, Santos


_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________ leshan-dev mailing list leshan-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________ leshan-dev mailing list leshan-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev

Back to the top