Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A design of persistent IV filter #224

Open
mzz2017 opened this issue Feb 12, 2021 · 3 comments
Open

A design of persistent IV filter #224

mzz2017 opened this issue Feb 12, 2021 · 3 comments

Comments

@mzz2017
Copy link
Contributor

mzz2017 commented Feb 12, 2021

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

@mzz2017
Copy link
Contributor Author

mzz2017 commented Jul 3, 2021

@nadoo
Copy link
Owner

nadoo commented Jul 6, 2021

Hi @mzz2017 , thanks for your help. I move the code of ss lib here just because I need to use the buffer pool, it would be great if there's a ss lib matching both our goals, then I can use it as 3rd party lib :)

@mzz2017
Copy link
Contributor Author

mzz2017 commented Jul 6, 2021

@nadoo Thanks. I just list them here. And it is absolutely your right to bring it to glider or not. I love the project and I have no plan to influence your decision. I will fork it and add them if I need them on a personal level. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants