Skip to content

UpdatableStore#119

Open
avibryant wants to merge 3 commits intotwitter:developfrom
avibryant:updatable-store
Open

UpdatableStore#119
avibryant wants to merge 3 commits intotwitter:developfrom
avibryant:updatable-store

Conversation

@avibryant
Copy link
Copy Markdown

Sketching out an UpdatableStore trait as described in #113. Extends JMapStore and ConcurrentHashMapStore to be UpdateableStores, and adds a new RedisUpdatableStore that uses the TransactionalClient.

Totally untested so far.

Todo:

  • add tests
  • memcache support
  • mysql support
  • combinator to retry on failed updates
  • ConvertedUpdatableStore
  • ShardedUpdatableStore
  • EnrichedUpdatableStore
  • combinator to turn any UpdatableStore + a monoid into a MergeableStore

@softprops
Copy link
Copy Markdown
Contributor

neat!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it too restrictive to return Future[Option[V]] which is the original input to the function? This way, the caller knows the value that was actually set into the store.

This does make buffering a pain, and I'm speculating on use cases, so ....

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly just going by analogy with put, which also returns Future[Unit].

Buffering being a pain is a good point, and for me right now that outweighs any hypothetical benefit of returning it (I know that we'd want buffering with this, I'm not sure what we'd use the return value for).

@sritchie
Copy link
Copy Markdown

The TODOs are so awesome! Hadn't seen that before.

@sritchie
Copy link
Copy Markdown

@avibryant, are you still interested in getting this bad dawg in? I think we can get it into the next release if so.

@avibryant
Copy link
Copy Markdown
Author

I'm still interested but don't actively need it right now, so I'm in no rush. What do you think is the minimal TODO to make it worth merging?

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 18, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

5 participants