Skip to content

A design of persistent IV filter #224

@mzz2017

Description

@mzz2017

Persistence of IV filter should be corresponding to port, password and IV triples, and never be removed until glider was uninstalled.

We can refer to the implementation of AOF of Redis:

  1. Set up a writing buffer and write records into it.
  2. Flush and append buffer to the AOF file when buffer is full and at the end of a event loop.
  3. Force to sync file buffer (related with file system and operating system) after flushing in step 2 or every second, or just leave the decision to the operating system.
  4. Perform AOF rewriting occasionally to shrink the size of AOF file.

In our design, the record to write is right the IV value (and the corresponding triple mentioned above), and AOF rewriting is to write the values of bloom filters.

Anyway, if the implementation does not consider unexpected blackout, persistence can be designed simper, but it is not recommended.

Related issue #223

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions