Giter VIP home page Giter VIP logo

mu-cache's Introduction

mu-cache

The mu-cache provides a distributed caching proxy for JSONAPI like resources. The service can be placed in front of any microservice which understand the cache’s primitives.

Motivation

Within the mu.semte.ch framework, all state is stored in the triplestore. This construction provides much flexibility and allows microservices to cooperate nicely. In some cases, we can expect the triplestore to get overloaded. In this case, caching of requests may help.

Detecting when to clear the cache on a URL-basis is near-impossible, given that the set of possible calls in a JSONAPI endpoint is non-exhaustive. In some configurations, the set of URLs which yield a particular resource may be infinite. Primitives for managing such a cache are needed.

Managing the cache within a specific microservice is probably not wanted as the microservice would need to communicate with its peers to indicate which items are in the cache. Eg: if we have two mu-cl-resources containers using the same image, we could load-balance between these instances. When one of these detects an update to the model, the other would need to clear its cache also. A microservice which tackles caching is a primitive which could be of great help in this idiomatic situation.

Installation

To add mu-cache to your application stack, add the following snippet to your docker-compose.yml

services:
  cache:
    image: semtech/mu-cache:2.0.2
    links:
    - myservice:backend

Supported services

Services that currently support mu-cache:

These services may need to be configured in order to enable mu-cache support. Check their README for details.

Debugging

Debugging of cache keys is helped by following environment variables:

  • LOG_CACHE_KEYS: Logs received cache key to a response
  • LOG_CLEAR_KEYS: Logs received clear keys either as a response, or explicitly received through ./mu/delta.

mu-cache's People

Contributors

cecemel avatar erikap avatar lagartoverde avatar madnificent avatar nvdk avatar rahien avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mu-cache's Issues

Feature: add a "bypass" environment variable

Sometimes when debugging/developing around the cache, it can be handy to disable it without messing up the dispatcher configuration. A sort of "bypass" environment variable which would cause the cache to "always miss" would be a nice-to-have.

default port

Hi,

is the default port 5000 as the README says? In the Dockerfile only port 80 is public, not 5000.

kr,
Bert

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.