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

API for new ddo and ddf data stores #50

Open
kaneplusplus opened this issue Dec 9, 2014 · 2 comments
Open

API for new ddo and ddf data stores #50

kaneplusplus opened this issue Dec 9, 2014 · 2 comments

Comments

@kaneplusplus
Copy link

I'm thinking about adding a Redis connection for storing ddf and ddo data. However, I'm having a little bit of trouble understanding. Is there a list of functions that need to be implemented to do this? Will I only need to implement a new connection? Is implementing a constructor, addData, removeData, print, loadAttrs and saveAttrs sufficient?

@hafen
Copy link
Contributor

hafen commented Dec 12, 2014

That would be very cool! Yes, how to add a new back end is not documented - something I've been meaning to do. I can give a few pointers here but now that I know of a potential use case I can put more immediate effort into documenting the api.

The main things that need to be implemented are

  1. A data connection to initialize either an existing data store on the back end or a pointer to where data will be put on the back end
  2. ddo / ddf - specific methods for this back end (mostly how to get/set attributes and how to extract values by key)
  3. A map/reduce implementation that bridges R to the back end

Once you have those three, everything else will work.

For (1), you would create a file conn_redis.R and look at the other conn_* files for inspiration. For (2), you would create a file ddo_ddf_redis.R. For (3), you would create a file mapreduce_redis.R. These all require more depth of explanation - I'll work on that soon.

@kaneplusplus
Copy link
Author

That would be great but there's not a big hurry. I probably won't get to this until January.

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

No branches or pull requests

2 participants