juliensobrier / Net-Google-SafeBrowsing4

Net::Google::SafeBrowsing4 - Perl library for Google Safebrowsing v4
Apache License 2.0
2 stars 4 forks source link

DB storage example? #22

Closed ldidry closed 5 years ago

ldidry commented 5 years ago

Hello,

Net::Google::Safebrowsing3 had DB storage. Would it be possible to have an example on how to create such DB storage for Net::Google::SafeBrowsing4? At least, clues on how to do that (like "put that object in such table, this one in another table, here's the relations between tables…, or a structure documentation to figure out how we could use DB instead of files).

Thank you.

juliensobrier commented 5 years ago

For GSB v4, using a database as a storage is not ideal like it was with v3. Net::Google::SafeBrowsing4::Storage is the interface to implement for any storage back-end, database or other. I don't plan on adding an interface for a database.

geever commented 5 years ago

I thought the reasons for not adding the DB interface originally were: a) Not required for initial implementation so the module was released sooner. And b) Not to add extra dependency that is not needed for everyone.

Due to the second I agree not to add more Storage modules to the base distribution.

However! a DB storage backend is definitely possible, I'm even aware of an existing implementation - though I cannot share it (unfortunately it's not open-source).

@ldidry I can try to find some time to put together a basic DB interface during the holidays as a separate distribution. (no guarantees)