metroplex icon indicating copy to clipboard operation
metroplex copied to clipboard

Refactor

Open parrish opened this issue 10 years ago • 2 comments

Hi,

I'm not sure if metroplex was previously working as intended or not. When I tried it, all of the keys in Redis were deleted after the interval had expired except for the server:alive keys.

I started trying to fix it and ended up writing a large-ish refactor of how it uses Redis. I've also setup a spark TTL heartbeat using the client ping transmissions and expanded the tests a bit.

Feedback, questions, and suggestions are definitely welcome.

parrish avatar Sep 04 '14 19:09 parrish

Mother of all pull requests. I'll review it in the morning, thanks for taking the effort!

3rd-Eden avatar Sep 04 '14 19:09 3rd-Eden

@parrish after ~8 months I've finally taken a look at this pr, sorry about that. I've added some comments, but overall this LGTM.

The biggest difference lies in how the sparks are stored in Redis. Right now they are stored in a hash to optimize the memory. With this patch instead, each spark has its own key, making it possible to add an individual timeout to each one of these.

I let @3rd-Eden decide what to do with this pr.

lpinca avatar May 25 '15 07:05 lpinca