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

Feature for storage abstraction in erldns #26

Merged
merged 5 commits into from
Feb 5, 2015
Merged

Conversation

kyle-neal
Copy link
Contributor

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).

@aeden
Copy link
Member

aeden commented Jan 27, 2015

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:

  1. Introduce the storage abstraction
  2. Replace propslist:get_value() with keyfind() as a performance enhancement

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?

@aeden
Copy link
Member

aeden commented Feb 5, 2015

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.

@aeden aeden merged commit e65b8a4 into dnsimple:master Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants