Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Shared Redis instance

Hi,

>   Which version of Leshan are you using ?

I'm using leshan-server-cf version 2.0.0-M6.

> A short term workaround could be to provide your own implementation of
> RegistrationStore. You can copy/paste the RedisRegistrationStore from
> Leshan and just modify it.

I guess I will do that then because I need a quick solution for now. I'll have a look at the alternatives afterwards.

> About the PR, note that if this is about the 1.x branch this is OK but
> if this is about 2.x this is not the right timing because lot of break
> will happens with https://github.com/eclipse/leshan/issues/1222.

Then I will not propose a PR for now.


Thanks for your help.

Best regards
Eva


On 24.03.22 11:52, Simon Bernard wrote:
Hi,

  Which version of Leshan are you using ?

Now I was wondering, how I could achieve that. For example, is it possible to add a prefix to the Redis keys? E.g. FIRST_APP:REG:EP, OTHER_APP:REG:EP.
AFAIK, there is nothing which allow to do that for now.
A short term workaround could be to provide your own implementation of RegistrationStore. You can copy/paste the RedisRegistrationStore from Leshan and just modify it. For a more mid/long term solution, we could consider to add this "prefix feature" to RedisRegistrationStore, it sounds not so impacting. If you consider continue to use Redis (I saw discussion that will maybe change your mind), could you propose a PR about it ?

About the PR, note that if this is about the 1.x branch this is OK but if this is about 2.x this is not the right timing because lot of break will happens with https://github.com/eclipse/leshan/issues/1222.

HTH

Simon


Le 23/03/2022 à 21:53, Eva Rott a écrit :
Hi,

I have a question concerning the use of Redis. I have multiple Leshan servers with few clients registered on each and I'd like to use only one Redis instance for all of them.

Now I was wondering, how I could achieve that. For example, is it possible to add a prefix to the Redis keys? E.g. FIRST_APP:REG:EP, OTHER_APP:REG:EP.

The only other thing I've found so far is the database int value that can be specified when creating the JedisPool. This would be my fallback solution but I'd definitely prefer not having to keep track of the database IDs.

I've also thought about overriding/modifying the Redis key prefixes in the RedisRegistrationStore but since they are private I'm not really considering going toward that direction.


Any help will be very much appreciated.

Thanks in advance.

Best regards
Eva
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/leshan-dev
_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/leshan-dev


Back to the top