[erlang-questions] Packets deduplication

Danil Zagoskin z@REDACTED
Thu Feb 18 14:20:09 CET 2016


Hi!

If ID grows monotinically and you have no plans of recovering after packet
reordering, then you can just keep the previous ID.
  - If CurID > PrevID, CurID is unique;
  - If CurID == PrevID, it is not unique;
  - If CurID < PrevID, it is a bug or reordering, let it crash.


On Thu, Feb 18, 2016 at 3:01 PM, Alexander Petrovsky <askjuise@REDACTED>
wrote:

> Hi!
>
> I have the stream of packets with ID (int), and I need to check is the
> packet is uniq (by ID) or not?
>
> Incoming rate is about 20k pps and ID is monotonically grows. What's the
> best way and data structure fit for this problem?
>
> --
> Петровский Александр / Alexander Petrovsky,
>
> Skype: askjuise
> Phone: +7 914 8 820 815
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>


-- 
Danil Zagoskin | z@REDACTED
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160218/6ab75cd4/attachment.htm>


More information about the erlang-questions mailing list