Using couch with LD

22 views
Skip to first unread message

Melvin Carvalho

unread,
Oct 11, 2012, 2:26:03 AM10/11/12
to unhosted
An awesome initiative here ... jam packed with best practices.

https://github.com/mhausenblas/ld-in-couch

Is unhosted still interested in couch as a back end?

Michiel de Jong

unread,
Oct 11, 2012, 3:03:01 AM10/11/12
to unho...@googlegroups.com
On Thu, Oct 11, 2012 at 8:26 AM, Melvin Carvalho
<melvinc...@gmail.com> wrote:
> An awesome initiative here ... jam packed with best practices.
>
> https://github.com/mhausenblas/ld-in-couch
>
> Is unhosted

that's not a parseable sentence :) we're no longer one project with a
central master plan, we're a decentralized effort now.

so i will read your question as:
[Are any developers of unhosted web apps]
> still interested in couch as a back end?

and then answer 'yes!' :) mainly there are four approaches i think:

- pouchdb, meaning you put couch /inside/ the browser and then use its
replication to sync from there to the backend
- garden20.com aka couchapps, meaning you copy a trusted app onto your
actual couch, so that it gets your full same-origin access with your
couch cookie
- hoodie, something Gregor is working on; it's a sort of open source
BaaS iiuc, and based somehow on couchdb i think. it will launch in the
near future, i heard
- you can of course use couchdb+nodejs as the database for your remotestorage.


ciao,
Michiel

Melvin Carvalho

unread,
Oct 11, 2012, 3:06:46 AM10/11/12
to unho...@googlegroups.com
On 11 October 2012 09:03, Michiel de Jong <mic...@unhosted.org> wrote:
On Thu, Oct 11, 2012 at 8:26 AM, Melvin Carvalho
<melvinc...@gmail.com> wrote:
> An awesome initiative here ... jam packed with best practices.
>
> https://github.com/mhausenblas/ld-in-couch
>
> Is unhosted

that's not a parseable sentence :) we're no longer one project with a
central master plan, we're a decentralized effort now.

Thanks, still getting used to this :)
 

so i will read your question as:
[Are any developers of unhosted web apps]
> still interested in couch as a back end?

and then answer 'yes!' :) mainly there are four approaches i think:

- pouchdb, meaning you put couch /inside/ the browser and then use its
replication to sync from there to the backend
- garden20.com aka couchapps, meaning you copy a trusted app onto your
actual couch, so that it gets your full same-origin access with your
couch cookie
- hoodie, something Gregor is working on; it's a sort of open source
BaaS iiuc, and based somehow on couchdb i think. it will launch in the
near future, i heard
- you can of course use couchdb+nodejs as the database for your remotestorage.

Cool

I was pointed to the show functions of couch too, which look very interesting

http://guide.couchdb.org/editions/1/en/show.html
 


ciao,
Michiel

--




Michiel de Jong

unread,
Oct 11, 2012, 3:18:53 AM10/11/12
to unho...@googlegroups.com
yeah, that's basically how garden20 (couchapps) do it i think.

Nick Jennings

unread,
Oct 11, 2012, 8:31:22 AM10/11/12
to unho...@googlegroups.com
I really like the idea of PouchDB - though I haven't taken a look at
it, just from what I gather from the "blurb", it seems like the best
of both worlds:

1. you have immediate local database access, not just your
localStorage cache (which as I've learned has some pretty severe
limits on size by default). I think it's paramount we treat offline
functionality as a first-class citizen, so this takes care of that.
2. you still have all your syncing and redundancy bonuses

However, doesn't this side-step the whole remoteStorage.js REST spec?
> --
>
>
>

Melvin Carvalho

unread,
Oct 11, 2012, 10:01:31 AM10/11/12
to unho...@googlegroups.com
On 11 October 2012 14:31, Nick Jennings <ni...@silverbucket.net> wrote:
I really like the idea of PouchDB - though I haven't taken a look at
it, just from what I gather from the "blurb", it seems like the best
of both worlds:

1. you have immediate local database access, not just your
localStorage cache (which as I've learned has some pretty severe
limits on size by default). I think it's paramount we treat offline
functionality as a first-class citizen, so this takes care of that.
2. you still have all your syncing and redundancy bonuses

However, doesn't this side-step the whole remoteStorage.js REST spec?

If I'm not mistaken they do slightly different things.

- Pouch just replicates your database to your storage, without necessarily needing a user.

- RemoteStorage adds a user flow using webfinger and oauth

At least that's what I interpreted from the docs.  Though It might be possible that a pouch client could replicate to a remotestorage data server, im not 100% sure.
 


On Thu, Oct 11, 2012 at 9:18 AM, Michiel de Jong <mic...@unhosted.org> wrote:
> On Thu, Oct 11, 2012 at 9:06 AM, Melvin Carvalho
> <melvinc...@gmail.com> wrote:
>> Cool
>>
>> I was pointed to the show functions of couch too, which look very
>> interesting
>>
>> http://guide.couchdb.org/editions/1/en/show.html
>
> yeah, that's basically how garden20 (couchapps) do it i think.
>
> --
>
>
>

--




Thad Guidry

unread,
Oct 11, 2012, 10:18:22 AM10/11/12
to unho...@googlegroups.com
Just stay away from the WebSQL part of PouchDB (the never again! non-standard that is flawed significantly)

and instead embrace HTML5 Indexed Database.

--
-Thad
http://www.freebase.com/view/en/thad_guidry

Niklas Cathor

unread,
Oct 11, 2012, 11:59:44 AM10/11/12
to unho...@googlegroups.com
You can, but it feels a bit weird, as either you need to store latest
revisions of documents somewhere or do a preflight GET before each PUT
between nodejs and couchdb to prevent couchdb from rejecting updates
due to missing _rev parameter. RemotestorageJS 0.6 used to take care
of that for you on the client side, but 0.7 doesn't implement multiple
protocols anymore.
This could be solved, once the remotestorage spec adds some kind of
concurrency control as well.

>
>
> ciao,
> Michiel
>
> --
>
>
>

Melvin Carvalho

unread,
Oct 11, 2012, 12:18:42 PM10/11/12
to unho...@googlegroups.com

Yeah the preflight thing is a real pain.  Most services that claim to be RESTful are not 100% RESTful so you sometimes need a workaround ...
 

>
>
> ciao,
> Michiel
>
> --
>
>
>

--




Reply all
Reply to author
Forward
0 new messages