Closed kyle-neal closed 9 years ago
Thank you for this. I'm going to review it today and run it through some tests.
To clarify, there are two primary changes here:
Regarding the storage engine, are there use cases for alternate storage engines for the packet cache and throttle? I can think of one right now, which is distribution of the packet cache and throttle data across multiple name servers so they are all aware of the cache data, thus allowing them to avoid certain lookups. Are there other use cases?
I've made some small changes to fix a few things here: https://github.com/aetrion/erl-dns/tree/kyle-neal-master
I am letting this run in production for a bit and then I will complete the merge in aetrion/erl-dns master.
This is the storage abstraction for erl-dns referenced by issue #25. This allows any type of storage to be used simply by adding a new file erldns_storage_STORAGETYPE.erl. You need to set a config variable for using this. Ex: {erldns,[ %% DB Config {storage, [{type, erldns_storage_mnesia}, %% erldns_storage_json | erldns_storage_mnesia {dir, "db"}, {dbname, undefined}, %% name of the db {user, undefined}, %% for future db types {pass, undefined}, %% for future db types {host, undefined}, %% for future db types {port, undefined} %% for future db types ]}, ]}
Otherwise, default is used (erldns_storage_json).