GithubHelp home page GithubHelp logo

Comments (6)

ruichuan avatar ruichuan commented on June 11, 2024

created a new branch "feature/datalayer_lease" for this feature.

from knix.

manuelstein avatar manuelstein commented on June 11, 2024

It's not a lease, because that would imply the local data layer [cache] has a temporal ownership of the global data, which it doesn't - any other local data layer can write the same identifier to the global backend, which renders the local cache content invalid. It's an expiration timer typically labelled TTL.

from knix.

iakkus avatar iakkus commented on June 11, 2024

As an alternative to the above solution, one could utilize Redis as a caching layer in front of Riak. See https://riak.com/products/riak-kv/redis-integration/index.html.

In this alternative, the DataLayerService would become a translation layer for storage operations:

  1. If the operation is a KV operation, then the DataLayerService will redirect it to Redis (which has its own synchronization with Riak).
  2. If the operation is a CRDT operation, then the DataLayerService will redirect it to Riak.
  3. Other operations related to other features (e.g., triggerable tables) need to be figured out, but will most likely use a combination of Redis and Riak.

As a result of these modifications, the DataLayerService will not cache anything; thus, offloading cache-related problems like invalidation to Redis. Furthermore, its logic will be simplified, so that it can become part of each sandbox. As an implementation optimization regarding JVMs, it can be merged with the queue service.

@ruichuan, @paarijaat: Did I miss anything?

from knix.

iakkus avatar iakkus commented on June 11, 2024

As far as I can tell, the data layer service is only used by sandboxes (including management) and the storage frontend, which is going to be removed (see #28). After that, the data layer service will be the only remaining component in the bare metal setup that requires the fluentbit server to send the logs to elasticsearch (in fact, the fluentbit server is not utilized in the knative setup anyway).

If the data layer service moves inside the sandbox, we can also get rid of the extra fluentbit server in bare metal, because the sandbox logs are already sent to elasticsearch. That move would affect the way the management service is bootstrapped, though.

from knix.

ruichuan avatar ruichuan commented on June 11, 2024

@iakkus thanks, it captures our discussion well. The data layer service (DLS) is a bit more than a simple translation layer of redirecting requests to riak/redis for processing. DLS needs to use respective client libraries to organize operations in certain ways for correct processing. I agree that the new `riak_redis' approach can simplify DLS.

Regarding where to put DLS (either standalone or inside a sandbox), we can decide later. It anyways is a simple move.

from knix.

ruichuan avatar ruichuan commented on June 11, 2024

switched this work to "feature/redis_caching" branch

from knix.

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.