GithubHelp home page GithubHelp logo

Automatic discovery of nodes about cachex HOT 9 CLOSED

whitfin avatar whitfin commented on July 2, 2024
Automatic discovery of nodes

from cachex.

Comments (9)

whitfin avatar whitfin commented on July 2, 2024

@tlvenn distribution has actually been removed in the 2.x branch because it was causing issues with the introduction of new features. Can Phoenix Presence be using without depending on the entire Phoenix framework?

from cachex.

tlvenn avatar tlvenn commented on July 2, 2024

Yes, only need Phoenix.PubSub project: https://github.com/phoenixframework/phoenix_pubsub and it is rock solid.

from cachex.

whitfin avatar whitfin commented on July 2, 2024

@tlvenn even so, distribution has been removed from core Cachex. The intent is to fork out a new project which provides distribution but with some features removed (e.g. the LRU caching introduced in v2.x cannot be supported on distributed tables).

I will leave this open for now, but with the disclaimer that it very likely won't live inside this repo (unless I solve the consistency issues with LRU across nodes).

from cachex.

tlvenn avatar tlvenn commented on July 2, 2024

Ha oky, I wasnt aware of that..

from cachex.

tlvenn avatar tlvenn commented on July 2, 2024

Could the distribution be added just using hooks with some kind of plugin system so that we could add cachex.distributed package to provide the feature without forking the whole project ?

from cachex.

whitfin avatar whitfin commented on July 2, 2024

@tlvenn it only happened recently, see discussion inside #49.

And per your suggestion, that is something I've tried to figure out. My intent for a while was to have interchangeable backends for a cache, so it could be ETS, could be Mnesia, could be Redis, etc.

This would work, but the big catch is that there are some features which simply do not work in a distributed state. It could be that this repo lives on as a distributed cache implementation and I fork out the non-distributed version into a new repo (which actually makes a fair bit of sense now I think about it).

How familiar are you with Presence? Do you know if it's possible to have a "master" node? This is the only thing I need to keep distribution - if there's a master node it's trivial to implement things that are currently local-only (i.e. LRW caches) because all the cleanup processes would happen on the master and just replicate out - as it stands there's no way to determine this and so it becomes near impossible to implement correctly.

from cachex.

whitfin avatar whitfin commented on July 2, 2024

@tlvenn FWIW I'm looking into Presence - doesn't seem like a good fit just because the sync interval is so high (default is recommended to be 1500ms).

It also appears that it doesn't actually do discovery - you have to instruct it as to which nodes to work with.

from cachex.

whitfin avatar whitfin commented on July 2, 2024

@tlvenn I'm going to close this because of the distribution being stripped out. I'm planning on building up a new project aimed at being a distributed implementation in future so I'll drop a link here when that's up.

Cachex being distributed really doesn't make much sense due to the consistency issues as well as trying to be fast. My intent is to build something which is distributed at its core to improve the resiliency there.

If you have any other suggestions please feel free to let me know, but for now it looks like distribution is dying in the v1.x branch.

from cachex.

tlvenn avatar tlvenn commented on July 2, 2024

No problem @zackehh, thanks for the discussion.

from cachex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.