greptilian logo

IRC log for #rest, 2018-06-04

https://trygvis.io/rest-wiki/

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
06:10 Haudegen joined #rest
07:07 interop_madness joined #rest
07:07 interop_madness joined #rest
07:57 zinox joined #rest
09:20 interop_madness joined #rest
09:20 interop_madness joined #rest
10:15 riddle joined #rest
10:15 `0660_ joined #rest
10:17 everbrew_ joined #rest
11:42 Haudegen joined #rest
12:05 donofrio joined #rest
15:28 realnot joined #rest
16:02 wsieroci joined #rest
16:41 Guest71929 joined #rest
20:52 ModusPwnens joined #rest
20:54 ModusPwnens I've run into an interesting situation where there are multiple different data stores for the same type of resource (e.g. short lived objects that need to be stored in one of two different redis clusters). In REST, how can I ensure that I know which resource IDs correspond with which redis cluster? I really don't like the idea of storing a mapping somewhere.
20:56 Haudegen joined #rest
21:56 whartung ModusPwnens: You have to either be able to look it up by the resource ID, or calculate it from the resource ID, there’s not alot of other options.
21:56 whartung there’s nothing that say the resources you publish match the ones on your backend.
21:56 whartung so you can always make somethin gup
21:59 ModusPwnens i've been doing some more digging
21:59 ModusPwnens i think i can just hash the resource ID and then do a modulo N peration, where N is the number of our redis clusters
22:00 ModusPwnens alternatively, I can hash a POJO into a resource ID. POJO could be something like {clusterId: <clusterId>, redisKey: <redisKey>} and I could base64 it into a string and use that as the ID
22:01 whartung sure, taht can always work — as long as the resources don’t move.
22:05 ModusPwnens yeah, for us the resources don't move
22:05 ModusPwnens if they did, we'd have to use more of a consistent hashing ring concept
22:06 whartung then just tack the redis id on the end of the resource id and call it good.
22:07 whartung 123456_1
22:07 whartung hashing doesn’t help, as you can’t “unhash”
22:07 whartung just make a composite ID

| Channels | #rest index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

https://trygvis.io/rest-wiki/