You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'd recommend swapping out jQuery.ajax for browser-request first and then JSONStream after. @daleharvey what pouch features do you think could benefit from streaming json? large remote json GETs during replication maybe
I dont think we get much from JSONStream, we cant pipe anything straight back into the target during replication so we would just be building an identical json from a streaming parser, I would rather let http do the error checking / validation,
for the changes feed we can just use streaming protocols (eventsource and in future websockets)
I just commented in #82 about this also but discussion probably belongs here... what about porting the http adapter to browserify so that it works in node as well?
Whats the total size of the http-browserify package? I am a bit concerned with the size and complexity as it would seem to need packaging event emitter and doing a bunch of preprocessing for require etc
browserify looks saner, and even if we were going to use that I would be looking to get rid of the xmlhttprequest dependancy, all the browser we do and likely ever will work on have pretty good xhr implementations (even modern ie)
I would like to make a suggestion... how about https://github.com/natevw/fermata ? I am using it in a project from node.js to couchdb. It's simple to handle any RESTful API, and it works for browsers and node.js, in theory. And No Jquery dependencies ;)
I think Fermata would be a great fit, but I'm probably biased :-)
Another benefit is that you'd be able to clean up some URL building code with it as well, since it has a handy shortcuts for extending paths and JSON stringifying queries: fermata.json(hostDB)('_all_docs', {$key:docId, include_docs:true})
Would love to get feedback on anything that would make Fermata easier or more appealing for integration here, feel free to open a discussion in its Issues.
Activity
ryanramage commentedon Jun 22, 2012
With removing jquery, we can look to integrate @maxogden JSONStream for streaming parsing ajax requests. I have an amd module that should make it super easy to use. See https://github.com/ryanramage/JSONStream
max-mapper commentedon Jun 22, 2012
i'd recommend swapping out jQuery.ajax for browser-request first and then JSONStream after. @daleharvey what pouch features do you think could benefit from streaming json? large remote json GETs during replication maybe
daleharvey commentedon Jun 22, 2012
I dont think we get much from JSONStream, we cant pipe anything straight back into the target during replication so we would just be building an identical json from a streaming parser, I would rather let http do the error checking / validation,
for the changes feed we can just use streaming protocols (eventsource and in future websockets)
tilgovi commentedon Jun 23, 2012
I just commented in #82 about this also but discussion probably belongs here... what about porting the http adapter to browserify so that it works in node as well?
max-mapper commentedon Jun 23, 2012
im investigating the likelihood of using http-browserify... will report back soon
daleharvey commentedon Jun 23, 2012
Whats the total size of the http-browserify package? I am a bit concerned with the size and complexity as it would seem to need packaging event emitter and doing a bunch of preprocessing for require etc
browserify looks saner, and even if we were going to use that I would be looking to get rid of the xmlhttprequest dependancy, all the browser we do and likely ever will work on have pretty good xhr implementations (even modern ie)
fernandogmar commentedon Jul 27, 2012
Hi,
sorry, I am not sure the state of this issue...
I would like to make a suggestion... how about https://github.com/natevw/fermata ? I am using it in a project from node.js to couchdb. It's simple to handle any RESTful API, and it works for browsers and node.js, in theory. And No Jquery dependencies ;)
What do you think?
natevw commentedon Dec 24, 2012
I think Fermata would be a great fit, but I'm probably biased :-)
Another benefit is that you'd be able to clean up some URL building code with it as well, since it has a handy shortcuts for extending paths and JSON stringifying queries:
fermata.json(hostDB)('_all_docs', {$key:docId, include_docs:true})Would love to get feedback on anything that would make Fermata easier or more appealing for integration here, feel free to open a discussion in its Issues.
natevw commentedon Dec 24, 2012
Or should say: I'd be happy to provide a patch if you're seriously interested!
calvinmetcalf commentedon Jan 5, 2013
In the short run we could replace the jquery dependency with zepto, minified with just core and ajax it's 18k.
update: it also needs event it looks like so thats 23k, still a lot better then the 90k that jquery is
chore(deps): bump cozy-client and cozy-pouch-link to 60.30.1
chore(deps): vendor upstream perf fixes via patch-package
chore(deps): bump cozy-client and cozy-pouch-link to 60.30.1