Code Monkey home page Code Monkey logo

node-noredis's Introduction

noredis

This is extremely experimental stuff

This is a simple "shared storage" for nodejs cluster without redis-like daemon.

Features

  • set/get/del/exists/incr/decr/incrby/decrby/keys
  • hset/hget/hdel/hexists/hincrby/hlen/hkeys/hvals/hgetall
  • echo/flushall/flushdb
  • TODO: ....
  • see also redis command reference for supported commands

Install

npm install noredis

or

npm install [email protected]:iolo/node-noredis.git

How to Use(with cluster)

  1. do require('noredis') before fork the first worker.
  2. use noredis in workers.
  3. that's all folks.
var cluster = require('cluster'),
    noredis = require('noredis'); // NOTE: before the first fork!

if (cluster.isMaster()) {
  ...
  cluster.fork();
  ...
} else {
  ...
  noredis.set('foo', 123);
  noredis.get('foo', function(err, reply) {
    console.log('foo is ' + reply);
  });
}

How to Use(without cluster)

  1. simply require('noredis') and use it.
  2. that's all ;)
var noredis = require('noredis');

...
noredis.set('foo', 123);
noredis.get('foo', function(err, reply) {
console.log('foo is ' + reply);
});

node-noredis's People

Contributors

iolo avatar

Stargazers

Daniel Waardal avatar YoungTaek avatar Sunguk Lee avatar

Watchers

 avatar James Cloos avatar  avatar

node-noredis's Issues

Curious

Hello !

I'm curious, what is the aim of noredis ?
Do you plan to implement the redis-protocol ? It could allow node-noredis to leverage already implemented client libraries (node_redis, jredis etc...).

Full disclosure: I'm the founder of https://redsmin.com a GUI for Redis

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.