GithubHelp home page GithubHelp logo

redis-reference-architecture's Introduction

Redis Reference Architectures

The purpose of this repository is to make it easier to use the Pivotal Cloud Foundry Redis Tile Redis for PCF. The repository contains example Cloud Foundry Apps that demonstrate using Redis for PCF.

The example application is written in Java and makes use of the compatibility of Spring with Cloud Foundry bound services.

The example application takes advantage of recent updates to the Spring Java-CFEnv to automatically connect to Redis via TLS when available. In order to take advantage of this behaviour, it is necessary to disable the Java buildpack auto-reconfiguration cf set-env <APP> JBP_CONFIG_SPRING_AUTO_RECONFIGURATION '{enabled: false}' and instead explicitly use the Spring capability cf set-env <APP> SPRING_PROFILES_ACTIVE cloud.

Pros and Cons of the Example App

Redis can be used for storing a wide range of data. No reference architecture is a good fit with all possible uses of Redis. Our existing examples focus on using redis as a cache. If you require that the data in Redis be stored in a specific structure, such as a specific list or set, this is likely not possible using Spring Cache. We do not yet have a reference architecture for you.

Example App:

Redis Cache Failure Handling

This example architecture uses the Spring Cache framework with a single Redis service to cache calls to a java method.

  • Appropriate if you have a method that will benefit from caching:
    • the method is slow to run
    • the method always returns the same result for a given input (similar to a pure function, but may have idempotent side effects)
    • the method is called repeatedly with the same input
  • Appropriate if your App can handle a short period of time when the cache is unavailable
    • Redis for PCF service instances become unavailable for a few minutes during upgrades
  • Not appropriate if you require direct access and manipulation of the underlying Redis cache

redis-reference-architecture's People

Contributors

alamages avatar balakaza avatar dependabot-preview[bot] avatar dependabot-support avatar dlresende avatar edwardecook avatar jacknewberry avatar jimbo459 avatar jplebre avatar lassebe avatar mirahimage avatar mrosecrance avatar ostenbom avatar pcf-redis avatar terminatingcode avatar

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.