Giter Site home page Giter Site logo

redis-agent's Introduction

redis-agent

I really find Redis convenient, but have run into some annoyances I'd like to abstract away. I'm not trying to replace existing libraries, such as carmine, but rather build on top of them.

Type is largely ignored when putting information in, and it creates complications when I try to pull it back out. If I have a number reflecting persistent state, every time I pull it out of redis I have to use read-string to turn it back into the type I put in. So a primary goal of this project is that any data that goes in looks the same as when it comes out.

When I think about redis, it's more as a giant map than a key/value store. I wish I could use the really nice facilities that exist to interact with maps and other data structures, rather than be stuck writing redis commands directly. Obviously there's a wrinkle in this plan, though, which is most interactions are going to result in side effects.

Side effects bring in the need for concurrency management, and we all know Clojure has these in spades. Refs and atoms are inappropriate for this type of issue, as they will both retry and write to Redis multiple times. That leaves us with agents, so this library will allow you to interact with redis as if it's a map agent.

Usage

Once I get this up on clojars, I'll update how to include the library here.

I don't want to write a quickstart that can get out of date with the actual code, so I've put it in a test file.

License

Copyright © 2018 Colin Williams

Distributed under the GPLv3.

redis-agent's People

Contributors

lackita avatar

Watchers

James Cloos avatar  avatar  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.