hammer
hammer copied to clipboard
More Backends
We should have more backends, because this project aims to be maximally useful in a variety of architectures. Perhaps:
- Mnesia
- Postgres (or a generic SQL backend? Probably Ecto)
- MongoDB
- ???
I can help with ecto
backend.
Could you please create a repo for me?
@sobolevn, done (https://github.com/ExHammer/hammer-backend-ecto) and thanks :)
Just a brain-wave, a Riak backend would also be cool.
One that uses distributed Erlang with no external dependency would be useful :)
There is ets
backend. https://github.com/ExHammer/hammer/blob/master/lib/hammer/backend/ets.ex
But it's hard coded to be registered locally rather than globally, so it cannot be used in this way in a straightforward manner.
Good point, I’ll look into making it distribu-able this week
Thank you
I'm also wondering if maybe an Mnesia backend would be appropriate for the same use-case. Will investigate also.
Mnesia has some flaws, such as struggling with network partitions. What would we gain by using Mnesia over plain old ETS?
Update: I've had a hard time finding energy and time to work on this, but it's still very much on my radar. Will try to get distributable-ets done over the december holidays. Pull-requests always welcome of course, but I'm hoping to get some traction on this soon. :)
Cool, thank you :)
We're using Redis in production at the moment and it's working really well so please don't feel any urgency from us
@lpil , that's great to hear :) I'm glad it's working well in production.
Mnesia backend started here: https://github.com/ExHammer/hammer-backend-mnesia
Any interest in a Nebulex adapter?
@jared-mackey seems like an interesting idea. what backend are currently supported with Nebulex?
It would be nice to have atomics backend (like https://github.com/farhadi/rate_limiter does it) with crdt distribution.
@florius0 see https://github.com/ExHammer/hammer/pull/72 . Seems. @ruslandoga was looking at that but not sure if he made any progress on cutting his MR smaller