Git Product home page Git Product logo

redis-livedata's Introduction


Travis CI Status CircleCI Status built with Meteor built with Meteor


Meteor is an ultra-simple environment for building modern web applications.



πŸ“š Create your applications using modern JavaScript

Benefit from the latest technology updates to rapidly prototype and develop your applications.


✨ Integrate technologies you already use

Use popular frameworks and tools right out-of-the-box. Focus on building features instead of configuring disparate components yourself.


πŸ’» Build apps for any device

Use the same code whether you’re developing for web, iOS, Android, or desktop for a seamless update experience for your users.


πŸ”₯ Getting Started

How about trying a tutorial to get started with your favorite technology?

React
Blaze
Vue
Svelte

Next, read the documentation and get some examples.

πŸš€ Quick Start

On your platform, use this line:

> npm install -g meteor

πŸš€ To create a project:

> meteor create my-app

β˜„οΈ Run it:

cd my-app
meteor

🧱 Developer Resources

Building an application with Meteor?

Interested in helping or contributing to Meteor? These resources will help:

To uninstall Meteor:

  • If installed via npm, run:
    meteor-installer uninstall
  • If installed via curl, run:
    rm -rf ~/.meteor 
    sudo rm /usr/local/bin/meteor

To find more information about installation, read here.

redis-livedata's People

Contributors

glasser avatar html5cat avatar justinsb avatar slava avatar suruja avatar wearhere avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redis-livedata's Issues

console.log messages

By default there are a lot of Meteor._debug / console.log messages. It might be nice to turn these off by default so the terminal isn't flooded or make an easy way to turn these off.

Redis sets

Implementation of Redis sets including sadd, srem, smembers

Meteor server appears not to come back when redis restarted

After dying with the following, Meteor appears not to come back (I see it exits and waits for a file change).
Is there a good way to add some reconnect logic, or otherwise provide some fault tolerance? Note, that I was testing this scenario with keyspace notifications enabled, intending to test out the usecase of keyspace notifications surviving a restart of a persisted redis server.

Thanks for a great package that works pretty damn well out of the box - the keyspace notifications are the best!

09:03:17 web.1 |  W20141104-09:03:17.731(-6)? (STDERR)
09:03:17 web.1 |  W20141104-09:03:17.733(-6)? (STDERR) events.js:72
09:03:17 web.1 |  W20141104-09:03:17.733(-6)? (STDERR)         throw er; // Unhandled 'error' event
09:03:17 web.1 |  W20141104-09:03:17.734(-6)? (STDERR)               ^
09:03:17 web.1 |  W20141104-09:03:17.734(-6)? (STDERR) Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED
09:03:17 web.1 |  W20141104-09:03:17.735(-6)? (STDERR)     at RedisClient.on_error (/Users/dradcliffe/.meteor/packages/slava:redis-livedata/.1.0.0.3iy2q3++o…
09:03:17 web.1 |  W20141104-09:03:17.735(-6)? (STDERR)     at Socket.<anonymous> (/Users/dradcliffe/.meteor/packages/slava:redis-livedata/.1.0.0.3iy2q3++os+…
09:03:17 web.1 |  W20141104-09:03:17.735(-6)? (STDERR)     at Socket.emit (events.js:95:17)
09:03:17 web.1 |  W20141104-09:03:17.735(-6)? (STDERR)     at net.js:440:14
09:03:17 web.1 |  W20141104-09:03:17.735(-6)? (STDERR)     at process._tickCallback (node.js:419:13)
09:03:17 web.1 |  => Exited with code: 8

Collection Names / Name Space

For Redis collections, why not namespace the keys using a collection name such as:

PostStatus = new Meteor.RedisCollection("post-status");
PostStatus.set("12341234", "processing");

This key would actually be "post-status:12341234" in redis

Amazon Elasticache Compatible?

We have an app which works against a manually installed Redis, but when we point it to Elasticache in AWS we get:

20150414-16:54:25.679(-5)? (STDERR)
W20150414-16:54:25.680(-5)? (STDERR) /Users/dradcliffe/.meteor/packages/meteor-tool/.1.1.1.46baqh++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:278
W20150414-16:54:25.680(-5)? (STDERR)                        throw(ex);
W20150414-16:54:25.680(-5)? (STDERR)                              ^
W20150414-16:54:25.681(-5)? (STDERR) Error: ERR unknown command 'config'
W20150414-16:54:25.681(-5)? (STDERR)     at Object.Future.wait (/Users/dradcliffe/.meteor/packages/meteor-tool/.1.1.1.46baqh++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:395:16)
W20150414-16:54:25.681(-5)? (STDERR)     at [object Object]._.extend.get (packages/slava:redis-livedata/sync_map.js:45:1)
W20150414-16:54:25.681(-5)? (STDERR)     at new Meteor.RedisCollection (packages/slava:redis-livedata/redis_collection.js:23:1)

Any insight to what this error means ? Has this package been tested against elasticache ?

Reproduction steps:

  • Provision Elasticache in AWS
  • Start a meteor app using this package, but with REDIS_URL pointing to the Elasticache instance above.

serverside matching and observer

I just can't figure out what is wrong here :(

I plan to implement a TaskManager that listens to mongodb with observe changes. If s.th. is added to a Mongo Collection, the TaskManager would add a task to the Redis Collection. Another process/worker would listen to redis and process the task. All on the server only!

// my RedisCollection
@Redis  = new Meteor.RedisCollection('redis')

// adding to Redis e.g.: jobqueue:Order:odmbRek9wCTjbboRj
Redis.set "jobqueue:#{type}:#{key}", key

// console output:
Redis keyspace event: jobqueue:Order:odmbRek9wCTjbboRj: set

Another meteor process, also connected to the redis db then listens to the jobqueue:

Redis.matching("jobqueue:*").observe({
  added: (doc) ->
    console.log 'something added'
})

My problem is, that the console log of the added callback never shows up. Instead I only get this log:

Redis (__keyspace@*) notification: __keyspace@0__:jobqueue:Order:odmbRek9wCTjbboRj: set
Redis keyspace event: jobqueue:Order:odmbRek9wCTjbboRj: set

Is there any known issue on using this server side only? Or do I something wrong, from what I posted here?

Any help would be highly appreciated :)

Thanks
Manuel

Some supported commands not working?

Currently I'm playing around with this package. But I encounter some problems, for example the following commands work perfectly:

Redis.set();
Redis.get();
Redis.del();
Redis.append()

However, when I want to use some other commands like:

Redis.randomkey()
Redis.type(key);
Redis.exists(key)

If returns an error.

An example of how I would call this command is:

Redis.type('users::12346:')

It return one of the following errors:

TypeError: Object [object Object] has no method 'type' // on server
Exception in template helper: TypeError: undefined is not a function // on client

Am I just being a big noob here, or is this a known issue?

Javascript Object storage and retrieval

I understand that storing/retrieving Javascript objects of the form { key1: val1, key2: val2} can be tricky. And Redis' HSET, HGET does a decent enough job. But is there a way we can store/retrieve objects natively from this lib?

Is there any plans to support expire notification from redis?

I use expiring keys in my setup. Think like sessions: they are alive for some time and then they're gone.

For now, I get exception like this when it happens:

"Error in oplog callback Error: XXX UNHANDLED NOTIFICATION TYPE: expire"

Can it be supported in redis-livedata?

Usecase

I'm curious about the redis-livedata package and would be glad if you would post some usecases/examples. I also would be delightet, if you could point out in which cases I should use redis-livedata and when mongodb-livedata.

use without keyspace notification

Hi,
we have 2.6 redis and people reluctant to upgrade to 2.8 here. Is there a way to use this library without enabling keyspace notification. i guess we have collection and blaze ready. can we use some other notification?

Thanks

Keyspace notifications are not guaranteed to be delivered

As described in http://stackoverflow.com/questions/23675394/redis-publish-subscribe-is-redis-guaranteed-to-deliver-the-message-even-under-m and seen in #14. I haven't looked to see if this library attempts to guarantee delivery but I would guess not given the aforementioned issue. Not guaranteeing delivery would mean that applications could miss changes to the keyspace. For our use case that would be ok–I just wanted to confirm that guaranteed delivery is not within the scope of this project.

Strange hash behavior

When using hgetall/hget/hset/e.t.c on hash, i getting this error: "Operation against a key holding the wrong kind of value", but if i delete and then create a hash with same name method works as excepted.

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.