Comments (9)
(obviously you'd also need to strip the comma to process "normal" format as a stream but this is simple.)
from couchdb.
until=now is the default behaviour (that is, if you don't ask for feed=continuous)
For any other value of until
there is no solution, as you cannot construct a future update sequence string externally.
from couchdb.
until=now is the default behaviour (that is, if you don't ask for feed=continuous)
Exactly, would like to have it for feed=continuous
which is much more efficient than normal.
from couchdb.
feed=continuous is as "efficient" as normal mode, it's the same code except it keeps reopening the database as it changes and sends the new updates. there is still no way for you to construct a future update sequence, and thus there's nothing you could pass as the until
parameter.
I do not understand your need.
from couchdb.
normal feeds require several thousand http requests while continuous is a single streaming request. There is a significant difference in both overhead and latency. Even with tricks like keep alive and pipelining (I'm unsure how well those are actually supported).
from couchdb.
keepalive (multiple sequential send req, read resps on the same tcp connection) is supported (and encouraged!). pipelining (sending multiple requests before reading the first response) is also supported.
I still don't see how you could know what value to pass to until
. Have you seen that the changes endpoint supports a limit
parameter? perhaps that is what you mean (`from here, return the next 10,000 updates and wait until they happen)
from couchdb.
keepalive (multiple sequential send req, read resps on the same tcp connection) is supported (and encouraged!). pipelining (sending multiple requests before reading the first response) is also supported.
That's great! However, from our tests it's still a lot slower than a continuous feed in addition to that it takes more memory (at least on client side as we need a quite large batch size for optimal perf). Especially when running in clustered mode.
Feel free to close if you still don't think it makes sense.
I still don't see how you could know what value to pass to until.
I would have a previously saved sequence or just pass now
from couchdb.
are you perhaps buffering the entire response before processing it when not using feed=continuous? the response format is different, you see. for continuous we send a series of json objects separated by newlines. for normal, it's a single json object with all the docs within that. however we do intentionally put newlines between the items to make it easier to process in a streaming manner.
normal:
curl foo:bar@localhost:25984/db1/_changes
{"results":[
{"seq":"1-g1AAAABzeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____sxIZcCrJYwGSDA1A6j9IZQZzImMuUIDdzMIiNS0lDVNXFgCFqx2b","id":"doc1","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]},
{"seq":"2-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYExlzgQLsycZJyQZmSZjKcRqRxwIkGRqA1H8Uk8wsLFLTUtIwdWUBAG6aJN4","id":"doc2","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]},
{"seq":"3-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-oSYxgk8wsLFLTUtIwdWUBAG8EJN8","id":"doc3","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
],
"last_seq":"3-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-oSYxgk8wsLFLTUtIwdWUBAG8EJN8","pending":0}
continuous
curl 'foo:bar@localhost:25984/db1/_changes?feed=continuous'
{"seq":"1-g1AAAABzeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYExlzgQLsycZJyQZmSZjKcRqRxwIkGRqA1H-QSYkMWQBNRh2D","id":"doc2","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
{"seq":"2-g1AAAABzeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-QSYkMWQBNkB2E","id":"doc3","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
{"seq":"3-g1AAAACTeJzLYWBgYMpgTmHgz8tPSTVyMDQy1zMAQsMckEQiQ1L9____szKYE5lygQLsycZJyQZmSZjKcRqRxwIkGRqA1H-oSYxgk8wsLFLTUtIwdWUBAG8EJN8","id":"doc1","changes":[{"rev":"1-967a00dff5e02add41819138abb3284d"}]}
from couchdb.
That's a good point!
from couchdb.
Related Issues (20)
- "apache.jfrog.io" no more available. Where are the .deb packages now? HOT 2
- Installing from yum repo fails repomd.xml signature could not be verified for couchdb HOT 2
- Couchdb stoped writing to the journald logs HOT 4
- How do I customize port and service name for couchdb during silent installation in Windows HOT 6
- Extent log message about conflicted shards HOT 3
- Requiring support for leading wildcard search for nouveau HOT 3
- Inherited Permissions Not Applied in CouchDB's Windows Installer HOT 8
- No documentation on mem3 options in CouchDB
- Sign out from Admin HOT 5
- Invoking update function when changing document in Fauxton HOT 3
- HTTP call inside validation function in design document? HOT 2
- CouchDB replications cannot be configured with 'heartbeat'
- Slow couchdb after many queries HOT 29
- Add "exp" to mandatory JWT claims HOT 4
- Nouveau trial run observations HOT 2
- Unexpected JWT auth response "badmatch" HOT 7
- Verify CouchDB Installation fails with create view HOT 4
- replicator session auth cannot handle multiple Set-Cookie headers in /_session request HOT 1
- Create new Fauxton release and update couch HOT 1
- Compactor case clause error
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 couchdb.