Code Monkey home page Code Monkey logo

redibuf's Introduction

redibuf - A mashup of Redis and Protobufs, for event sourcing POC

Summary

MathMessage {
  base: int64,
  factorial: int64,
  doubled: int64,
  tripled: int64
}

The object starts with just a base number, then is sent to Redis as a shallow object with nil/undefined values for the related data.

The requester that initially inserted the object sends a Redis PUBLISH request of the Redis LIST key.

Each service is listening on the calcs-needed CHANNEL and makes a copy of the left-most object in the immutable object list on Redis (LRANGE/LPUSH).

As a service computes the value/performs the work, it prepends the new (more filled out) object onto the left side.

When all services are done, the reassembler takes the N shallow copies to build one fully hydrated copy. This is then served to the requester.

model

CLI

Build with cat build.sh | sh in the project root.

Then you can use a simple make start to see it in action.

Initiate a request with curl http://localhost:5001/6

License

GPLv3

redibuf's People

Contributors

ahungry avatar

Watchers

Dan Lamb 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.