fjoniyz / ganges

A project for the module (Advanced) Distributed Systems Prototyping at the Technical University of Berlin.
MIT License
3 stars 2 forks source link

Redis key is now incremental #87

Closed fjoniyz closed 1 year ago

fjoniyz commented 1 year ago

Problem: Until now the way that the entries were added to the Redis persistence, was using random keys. This led to a change of order of messages inside the cache as the keys are in an ascending order.

Solution: get all keys, cast them to ints, order them and then get the value for each of them by casting them back to strings

nomorehumor commented 1 year ago

This has to be updated to conform to newest type of our data in redis (hashes). Apart from that it looks good, after updating we can merge it.