Use Moneta as entity and metastore #78

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

minad commented Dec 20, 2012

This patch replaces the entire storage system with Moneta which simplifies things a lot. Soon there will be a new Moneta release. I think rack-cache should concentrate on caching and since there are many open issues I think this is the way to go.

This would also solve the issues #67 and #49.

This patch needs more cleanup, it is just a quick hack and a proof of concept. Are you interested?

Owner

rtomayko commented Jan 10, 2013

I don't want moneta as a hard dependency but would consider a meta/entity store implementation backed by moneta. I just don't want moneta to be a requirement for using rack-cache basically.

rtomayko closed this Jan 10, 2013

minad commented Jan 10, 2013

What do you think about removing the special implementations from rack-cache and only include a basic memory implementation? Then you wouldn't have the hard moneta dependency (I agree on that this would be better) and we would avoid code duplication and combine the efforts. Take a look at the code reduction (-1200 lines in rack-cache).

Btw. I already have a moneta rack-cache implementation included in moneta.

Owner

rtomayko commented Jan 10, 2013

I already have a moneta rack-cache implementation included in moneta.

Oh nice. I didn't know that. We could most certainly include documentation in the README and whatnot on using this for all of moneta's supported stores.

What do you think about removing the special implementations from rack-cache and only include a basic memory implementation?

I'd be for removing everything except memory, memcached, file, and moneta. I'm realizing I really don't want to merge the mongo store in #49 because I'm afraid I won't be able to maintain it through version upgrades and whatnot. Still, I want rack-cache to be usable in the most popular production configurations (memcached meta store, file entity store) without the moneta dependency. Those stores are also pretty easy to maintain.

minad commented Jan 10, 2013

Ok, I agree! I create a patch! We will keep memory, memcached, file and moneta. Is it okay for you to redesign it in such a way that the remaining stores match the moneta interface? This would make it simpler and cleaner.

minad commented Jan 10, 2013

Moneta wouldn't need a specific rack-cache store implementation then, you could just drop it in.

minad commented Jan 23, 2013

@rtomayko: Still interested in this?

Owner

rtomayko commented Jan 29, 2013

@minad: Yeah the general direction seems good to me.

Is it okay for you to redesign it in such a way that the remaining stores match the moneta interface? This would make it simpler and cleaner.

Ummmm that's kind of tricky. The store interface is semi important to keep compatible for a stable release since you can write your own stores and environments like Rails have indeed done this. We'd have to make a major release to change the store interface expected by the core of rack-cache.

minad commented Jan 30, 2013

So are you willing to change the cache store interface to something Moneta-like in a major release? I could then make the changes as discussed (Keep memory, memcached, file but with Moneta interface, thus allowing Moneta to be used as drop-in-replacement)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment