Fix cache adapter name bug & help to try to fix boss_cache pool problem #15

Merged
merged 1 commit into from May 28, 2012

Conversation

Projects
None yet
2 participants
Contributor

jgordor commented May 28, 2012

Hi Evan,

This patchs solves the adapter name bug in boss_cache not working from boss_db repo movement.

Boss_cache still does not work, the pollboy integration has problems:

boss_cache_controller (called from poolboy in boss_cache_sup:init/1) expects:

  • {ok, Conn} = Adapter:init(Options),
    But erlmc returns only ok (not the PID)

I changed this in erlmc:start/1 but I think that this is no ok: if erlmc has its own pool management, we are duplicating?

I need some help here about the design.

Thanks Evan!

Contributor

evanmiller commented May 28, 2012

Ah, dang. I forgot about erlmc's server-balancing layer when doing the poolboy refactor.

The best solution for now might be to rip out poolboy from boss_cache and just let erlmc work its magic.

The best solution long-term would be to move the server-balancing logic from erlmc into boss_cache so that you could use other caching servers without affecting the cache architecture. Then the memcached_bin adapter would use erlmc_conn instead of erlmc. But since there is only one cache adapter this is probably more trouble than it is worth at the moment.

@evanmiller evanmiller added a commit that referenced this pull request May 28, 2012

@evanmiller evanmiller Merge pull request #15 from jgordor/master
Fix cache adapter name bug & help to try to fix boss_cache pool problem
c3f3639

@evanmiller evanmiller merged commit c3f3639 into ErlyORM:master May 28, 2012

Contributor

evanmiller commented May 28, 2012

Actually, I spoke too soon; I think the problem was just me confusing start and init. Try these:

e5aa7db

f79fe31

Contributor

jgordor commented May 28, 2012

Hi Evan,

Now works, thanks!

I will be testing the cache for sessions and db heavily for a soon to be public project.

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