Global Feed Post Login
Replying to Avatar Keyhan Alizadeh

jellyfish uses immortal as it's software.

we have 2 layer of protection for this issue which help us to stop double processing of an event, stop rewriting of deleted and vanished events.

1. a redis bloom filter which keep track of all events seen by relay. so if someone send an already processed event, we will reject immediately. so, a deleted event is a event that were processed in past!

2. we don't delete a record on mongo db, we update it and remove all fields of it except its id. so it's basically just a nonsense hash. when someone try to write it again, (if we lost redis data for any reason.) we don't write duplicate ids on database and write operation will fail.

you can take a look at code:

https://github.com/dezh-tech/immortal

Avatar
Keyhan Alizadeh 10mo ago

overall it's not too complicated.

Reply to this note

Please Login to reply.

Discussion

No replies yet.