smpallen99/coherence

Clustered Credential Store

Open

#288 建立於 2017年10月5日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Elixir (1,259 star) (220 fork)batch import
enhancementhelp wanted

描述

Hi! Thanks for an awesome library. I just wanted to make a feature suggestion.

I think it's great that there is the in-memory CredentialStore Server and the database persistence option, but what I would really love to have is an in-memory CredentialStore Server that works across a cluster of nodes.

Right now, it looks like each node gets it's own CredentialStore.Server and the session data within each node is not shared with all the other nodes. This means that an ajax request that needs authentication will succeed or fail depending on which node it randomly hits. Database persistence solves this problem, but as you know, has tradeoffs.

I think, the gist of it is to change

GenServer.call @name, {:get_user_data, credentials}

to something like

GenServer.call {@name, node}, {:get_user_data, credentials}

where node is decided with some sort of node partitioning like consistent hashing or even just a singleton (master node) or something.

Anyway, that would be very useful to me! I'll use database persistence for now.

貢獻者指南