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

Extension points for different backends? #18

Open
IljaN opened this issue Mar 27, 2016 · 2 comments
Open

Extension points for different backends? #18

IljaN opened this issue Mar 27, 2016 · 2 comments

Comments

@IljaN
Copy link

IljaN commented Mar 27, 2016

Hi,

I would like to implement mnesia support for toniq. Do you have any preference for how to add an extension point for a different backend? As far as I see redis communication is encapsultated inside of job_persistence.ex.

My plan is to change job_persistence so that it wraps a configurable backend module.

Regards
Ilja

@joakimk
Copy link
Owner

joakimk commented Apr 17, 2016

Sorry I didn't reply earlier. I don't actively work on this project, but I do aim to incorporate all contributions.

As you've seen I've tried to keep the redis usage as isolated as possible. Besides job_persistence.ex there is also keepalive_persistence.ex. You need to consider that one as well as it also deals with jobs.

I haven't put a lot of thought into how to support different backends. The two I can think of now is either making job_persistence have a backend (as you suggested), or making it the backend, like this?

job_persistence.store_job(...)
def job_persistence, do: Application.get_env(:job_persistence)

@joakimk
Copy link
Owner

joakimk commented Apr 17, 2016

Related issue: #9

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

No branches or pull requests

2 participants