Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Add a simple note storage #11

Open
vendion opened this issue Dec 19, 2014 · 6 comments
Open

Add a simple note storage #11

vendion opened this issue Dec 19, 2014 · 6 comments

Comments

@vendion
Copy link
Member

vendion commented Dec 19, 2014

Would be nice for people to be able to leave notes via the bot, with a Ash note key:value or Ash remember key:value and a similar command to pull the note for a given key.

@keathley
Copy link
Contributor

I've thought about this as well, but for leaving messages to users who aren't logged in.

@vendion
Copy link
Member Author

vendion commented Dec 19, 2014

@keathley yeah using it for offline users would be good, but I was also making it way to store interesting one-liners for like a "best of" thing.

@acedrew acedrew changed the title Add a simple note storeage Add a simple note storage Dec 20, 2014
@vendion
Copy link
Member Author

vendion commented Dec 24, 2014

This is partly implemented now, and is a good leadway to being able to leave messages to offline users (or at least a start).

Commands added so far:
remember Stores a note in the "brain" syntax Ash remember (key): (note)
recall Returns a stored note syntax Ash recall (key)

Commands that (probably) should be added:
forget Forgets something that was perviously stored in the brain
list Lists all note keys currently being remembered.

@acedrew
Copy link
Member

acedrew commented Dec 24, 2014

It looks like the underlying store doesn't support a list of keys, however, keeping a list of keys separately seems really hacky when redis has so many nice ways of doing that... Should we try to commit a fix to HAL?

@keathley
Copy link
Contributor

The only problem there is that HAL is designed to work with any back end store (not just redis). If they expose the actual redis connection though then we could do whatever we want.  I'm not sure if they do that, if we could patch it or if we can hack it or whatever. 

Chris Keathley

On Wed, Dec 24, 2014 at 9:32 AM, Andrew Rodgers notifications@github.com
wrote:

It looks like the underlying store doesn't support a list of keys, however, keeping a list of keys separately seems really hacky when redis has so many nice ways of doing that... Should we try to commit a fix to HAL?

Reply to this email directly or view it on GitHub:
#11 (comment)

@vendion
Copy link
Member Author

vendion commented Dec 27, 2014

I'm okay with forking HAL to add any extra functionality that we need, it does not look like it currently exposes the connection to the datastore though. If we only care about Redis compatibility we could also make our own direct connection to the datastore and use that for options that HAL does not support. I would like to keep compatibility with the in-memory store if at all possible though.

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

No branches or pull requests

3 participants