Comments (5)
Yes, I considered it for a while and then decided to keep it simple until a someone complained.
It can make sense both ways: Follow
to use nano
to simplify CouchDB
access code, and nano
using Follow
to provide efficient changes feed support.
If you feel strongly about this and think you can do a good job at keeping the impact to a minimum send in a pull request.
Side note: You might be interested in this project from @dominictarr - I know I was :)
https://github.com/dominictarr/couch-stream
from nano.
for what it's worth, follow is a dependency for replicate and it's working quite well so far.
-Mikeal
On Sep 20, 2011, at September 20, 20118:51 AM, Jason Smith wrote:
Hi, Nuno.
Is it appropriate to integrate any Follow functionality into Nano?
On the one hand, Follow also strives for simplicity and tries to mirror the
request
API. The other major advantage IMO is the inactivity timeout which is the only way to detect some kinds of error.On the other hand, I am not sure if it is "feature bloat" or "mission creep" for Nano.
Do you have any thoughts about this?
Reply to this email directly or view it on GitHub:
#21
from nano.
Yeah Follow is extremely robust, but unfortunately not demonstrably so because it has zero test coverage.
For months I just ran a follow stream on my laptop and workstation while WiFi would crash, DSL would crash, I put my laptop to sleep, joined public WiFi networks, used Bluetooth and USB tethering over EDGE from 9,000 miles away, etc. If I ever found a crash I would figure out why and improve the code.
Unfortunately those sorts of situations are hard to write unit tests for, e.g. you timeout and reconnect but DNS resolution is also down. Not that that is an excuse. But I in that context succumbed to the temptation to shirk the unit tests.
from nano.
Anyway, I am thinking of adding Nano support in Follow rather than the other way. Instead of giving it a string URL, you could give it a Nano DB object. From there it would pull out the info it needs. So you could write:
// given: db is a Nano DB
var follow = require("follow");
follow(db, function(er, change) {
if(er) throw er;
console.dir(change);
})
If that works well, maybe we can talk later about bundling follow into Nano:
db.follow(function(er, change) {
if(er) throw er;
console.dir(change);
})
from nano.
Looks like a great plan for me. :)
from nano.
Related Issues (20)
- Does nano support purge? HOT 2
- db.attachment.get file- 'could not be opened because it is empty'
- Can not get correct userctx HOT 2
- Couch DB 2 compatibilty HOT 3
- bulk() with _deleted:true causes error HOT 3
- db.multipart.get does not work with Cloudant Local 1.0.0.5 HOT 1
- Enable permanent replication by writing to "_replicator" database instead of "_replicate" database. HOT 3
- Support temp view
- Doubt on db access of live app HOT 2
- What is the keys in view function based on? Is it the key you emit in the views/map function? HOT 1
- How do you update _rev to update a document?
- uploaded files displaying base64 data in the browser (attachments not viewable)
- Problem with OR -clauses? HOT 1
- Error: badarg every few hours
- Error: {error,emfile} HOT 1
- Example Lazy Creation of View
- Query string encoded when using array of keys
- Database permissions
- db.fetch array of id error
- Attempting to return simple list of documents, small issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nano.