PubSub with Derby/Redis

117 views
Skip to first unread message

FSxico

unread,
Aug 13, 2012, 5:40:02 AM8/13/12
to der...@googlegroups.com
Is it already possible, and if it is, it there documentation somewhere about how to use it? Or is it the same as using MongoDB for subscriptions, paths and such?

greelgorke

unread,
Aug 13, 2012, 6:35:54 AM8/13/12
to der...@googlegroups.com
yes, and yes. read http://derbyjs.com/#subscription

FSxico

unread,
Aug 13, 2012, 7:04:39 AM8/13/12
to der...@googlegroups.com
Redis is not referenced in that documentation :\ I don't even know how to configure the Redis server IP. Can it only be used locally? 
I really gotta get into those stores and models. I'm kind of confused about scoped models and how to specify which store each model uses.

greelgorke

unread,
Aug 13, 2012, 7:30:09 AM8/13/12
to der...@googlegroups.com
when i quick-inspect the sources of racer, i see some requires related to redis. may be racer use it already under the hood, but i'm not sure about it. but see here http://derbyjs.com/#persistence . there is a racer-mongo adapter out there, dunno about redis.

you not specify which model use which store. you create a model from the store, so the model is bound to the store where it comes from.

scoped models are just models with reduced path-scope. so when you define a path "collection.obj1.property1", you can get a scoped model with model.get "collection.obj1" and query paths like scoped.get "property1". thats it the paths will be not resolved globally, but by prefixing the path to the scoped model.

you should really read the docs and try a bit with simple apps

:)

FSxico

unread,
Aug 13, 2012, 7:53:58 AM8/13/12
to der...@googlegroups.com
Thank you for your brief explanaition. I'm gonna take the afternoon to give them another read.

TZ

unread,
Aug 13, 2012, 7:59:16 AM8/13/12
to der...@googlegroups.com
this don't mean we can modify mongodb data outside derby then got refresh at derby, do it?

在 2012年8月13日星期一UTC+8下午7时30分09秒,greelgorke写道:

Carl-Johan Blomqvist

unread,
Aug 13, 2012, 10:13:28 AM8/13/12
to der...@googlegroups.com
TZ: I don't think data modified outside of Derby will be refreshed in Derby. That would most likely require a looping query which would most likely be a problem resource-wise and it's probably not such a good idea.
Reply all
Reply to author
Forward
0 new messages