tiddlyweb and couchdb

15 views
Skip to first unread message

Peter Neumark

unread,
Nov 11, 2011, 8:01:31 AM11/11/11
to tiddlyweb
Hi,

I've heard a lot about couchdb, but I haven't really played around with it too much.
The similarity in goals (especially when it comes to CouchApps) between couchdb and tiddlyweb is striking:

Do everything you can in the browser on the client side, and you can reduce the server to an intelligent datastore.

That said, there are a few key differences between the projects. For example, Tiddlyspace has a social component which is totally missing from a standard couchdb implementation, whilecouchdb has awesome replication that makes deployment across couchdb instances really simple.

So my question is: has anybody had experience with both tiddlyweb and couchdb?
What were the major advantages of one over the other for single-page js applications?

Would it make sense to try to create JS code in a way that could use either tiddlyweb or couchdb, or is this inrealistic in practice?

Peter 

FND

unread,
Nov 11, 2011, 8:39:10 AM11/11/11
to tidd...@googlegroups.com
> The similarity in goals (especially when it comes to CouchApps) between
> couchdb and tiddlyweb is striking

Indeed - though in practice, there are quite a few significant
differences: CouchDB is (mostly) a pure/dumb data store, while TiddlyWeb
operates at a different level, with more structure and stricter
expectations (think bags, recipes, filters, serializations etc.).

> So my question is: has anybody had experience with both tiddlyweb and
> couchdb?

A few of us played with CouchDB and CouchApps a while back:
https://github.com/saqimtiaz/TiddlyCouch
https://github.com/UnclePhil/TiddlyCouch
https://gist.github.com/310251

(Personally, I struggle with the pre-defined views, so I'm more
interested in MongoDB lately.)

> What were the major advantages of one over the other for single-page js
> applications?

Well, it comes down to the usual: If you buy into the tiddler model and
philosophy and that model is a good fit for your use case, TiddlyWeb is
awesome. But the tiddler model is not (meant to be) universal, so some
scenarios have requirements which make CouchDB (or some other solution)
the better choice.

> Would it make sense to try to create JS code in a way that could use
> either tiddlyweb or couchdb, or is this inrealistic in practice?

Emulating TiddlyWeb's HTTP API was one of the goals of TiddlyCouch, but
that turned out to be quite tricky due to the constraints of CouchDB's
design (e.g. I don't recall the details, but I think URI structure was
one issue).


-- F.

Peter Neumark

unread,
Nov 11, 2011, 9:02:36 AM11/11/11
to tidd...@googlegroups.com
Thanks for the quick and thorough response, FND.
I think couchdb recently gained a pretty advanced URL rewriting module (but I could be mistaken).

Peter



-- F.

--
You received this message because you are subscribed to the Google Groups "TiddlyWeb" group.
To post to this group, send email to tidd...@googlegroups.com.
To unsubscribe from this group, send email to tiddlyweb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tiddlyweb?hl=en.


PMario

unread,
Nov 11, 2011, 11:16:56 AM11/11/11
to TiddlyWeb
Bauwe seems to work thgether with uncle phil and created, some intro
stuff. Which may be interesting too.
http://bijl.iriscouch.com/bijl-ctw/_design/tiddlycouch/_list/tiddlywiki/tiddlers#Welcome

On Nov 11, 3:02 pm, Peter Neumark <neumark.pe...@gmail.com> wrote:
> Thanks for the quick and thorough response, FND.
> I think couchdb recently gained a pretty advanced URL rewriting module (but
> I could be mistaken).
Jup. The URL rewrite mechanism was introduced after the first
TiddlyCouch versions.

-m

Måns

unread,
Nov 11, 2011, 3:51:45 PM11/11/11
to TiddlyWeb
Hi

> Bauwe seems to work thgether with uncle phil and created, some intro
> stuff. Which may be interesting too.http://bijl.iriscouch.com/bijl-ctw/_design/tiddlycouch/_list/tiddlywi...

GREAT!! Thanks for the link.
I instantly made three databases and now I have my own versions of
Bauwe's and Phil's wikis hosted on iriscouch.com.
It was easy and uncomplicated - following Bauwe's simple instructions.

Great job!!!

My danish instance: http://mama.iriscouch.com/uptw/_design/tiddlycouch/_list/tiddlywiki/tiddlers

Seems to work very well indeed :-)

Cheers Måns Mårtensson

UnclePhil

unread,
Nov 12, 2011, 4:08:50 PM11/12/11
to TiddlyWeb
> Seems to work very well indeed :-)
>
Hi Mans, welcome in the couch world.

Be careful with te tiddlycouch, you need to be sure that your couch
instance is well protected because the security in couch is very
basic. Be sure to have the last version of the twcouch

we have lso some problem due to the "simplification" of the code that
we made during the daptation.
Some functionalities are not implemented

Ph. Koenig
aka Uclephil

Måns

unread,
Nov 13, 2011, 3:43:21 AM11/13/11
to TiddlyWeb
Hi UnclePhil

> Hi Mans, welcome in the couch world.

Thanks - :-)

> Be careful with te tiddlycouch, you need to be sure that your couch
> instance is well protected because the security in couch is very
> basic. Be sure to have the last version of the twcouch

I followed Bauwe's instructions on how to end the "AdminParty":
"In Futon > http://YOUR_ACCOUNT.iriscouch.com/_utils/ > right-bottom >
look for:
"Welcome to Admin Party! Everyone is admin. Fix this""

I setup an admin user - Hope that's all there is to it...?

> we have lso some problem due to the "simplification" of the code that we made during the daptation. Some functionalities are not implemented

Ok.
I guess you are referring to not beeing able to import tiddlers from
the backstage?

You've made a great job setting TW up with CouchDB!

Thank you very much for sharing it with us!!

Cheers Måns Mårtensson

Bauwe Bijl

unread,
Nov 13, 2011, 7:52:35 AM11/13/11
to TiddlyWeb
Hi Måns

> It was easy and uncomplicated - following Bauwe's simple instructions.

:-)
Replication is a nice distribution method don't you think...!?

> I followed Bauwe's instructions on how to end the "AdminParty":
> "In Futon >http://YOUR_ACCOUNT.iriscouch.com/_utils/> right-bottom >
> look for:
> "Welcome to Admin Party! Everyone is admin. Fix this""
>
> I setup an admin user - Hope that's all there is to it...?

Yes...the replicated versions from my tw's are the latest TiddlyCouch
versions.

The empty "replicate-able" TiddlyCouches are rigged up with tw version
2.6.2 so the SystemSettings can be used.
I developed the atom-feed for TiddlyCouch and also implemented this in
the empty's.

The empty-phil-ctw is a very clean website theme. I cleaned-up the
theme so the one-color setting in the ColorPalette can be used. Fet
functionality is in there (you know what to do with that).

The MineralTheme-empty-ctw is implemented in such way that other tw
themes can be used (no Fet functions...more basic)

The vanilla tw is the most basic of the three. (it's the base for
versions above)

Some more advanced patterns with replication you can think of is the
"continuous" replication. This way the changes from the couch you
replicate from are automatically "replicated" inside your own.
For a "small"group this can be interesting:
B>continuous-replicate A
C>continuous-replicate B
D>continuous-replicate C
A>continuous-replicate D
(all members work on their own account...and the "ring" makes it one
project)

I'm also looking for "import" solutions...and although I found some
workarounds...this is still not solved so it can be used easily.
Together with login-out, import and (atom)feed the basic functions of
TiddlyCouch are done...which means it is tw alike similar as local.

Some future ideas might be to look how to handle a single tiddler like
this:
http://bijl.iriscouch.com/bijl-ctw/c5cae55cec09f222af6e9ab4af030ee8
Perhaps someone (FND-Chris) can make some cheese of that so it can be
used elsewhere (in space).

Bauwe


chris...@gmail.com

unread,
Nov 13, 2011, 8:01:16 AM11/13/11
to TiddlyWeb
On Sun, 13 Nov 2011, Bauwe Bijl wrote:

> Some more advanced patterns with replication you can think of is the
> "continuous" replication. This way the changes from the couch you
> replicate from are automatically "replicated" inside your own.
> For a "small"group this can be interesting:
> B>continuous-replicate A
> C>continuous-replicate B
> D>continuous-replicate C
> A>continuous-replicate D

This sounds very interesting.

> Some future ideas might be to look how to handle a single tiddler like
> this:
> http://bijl.iriscouch.com/bijl-ctw/c5cae55cec09f222af6e9ab4af030ee8
> Perhaps someone (FND-Chris) can make some cheese of that so it can be
> used elsewhere (in space).

Oh noes! FND and I are merging into the same person. I don't think the
world is quite ready of a whitespace obsessed, recovering sysadmin,
you're doing everything completely wrong, curmudgeon.

I'll have to leave this question to FND. One of my
it's-a-good-problem-to-have regrets with TiddlySpace has meant that
its success has narrowed my focus and attention to such an extent that
I'm not exploring around the boundaries as much as I would like.

--
Chris Dent http://burningchrome.com/
[...]

Bauwe Bijl

unread,
Nov 13, 2011, 8:47:10 AM11/13/11
to TiddlyWeb

> Oh noes! FND and I are merging into the same person.
I suppose I should have written "or"... B-)
...didn't know a "-" tickles...
Bauwe

FND

unread,
Nov 13, 2011, 12:48:17 PM11/13/11
to tidd...@googlegroups.com
>> Some more advanced patterns with replication you can think of is the
>> "continuous" replication. This way the changes from the couch you
>> replicate from are automatically "replicated" inside your own. [...]
>
> This sounds very interesting.

Indeed!

>> Some future ideas might be to look how to handle a single tiddler [...]


>
> I'll have to leave this question to FND.

Unfortunately, I'm not quite sure what the question really is. This
might well be due to my current state of mind - but I'd appreciate an
explicit description or some ideas.

> Oh noes! FND and I are merging into the same person. I don't think the
> world is quite ready of a whitespace obsessed, recovering sysadmin,
> you're doing everything completely wrong, curmudgeon.

You're missing a hyphen there.


-- F.

Måns

unread,
Nov 13, 2011, 1:21:56 PM11/13/11
to TiddlyWeb
Hi Bauwe

> Replication is a nice distribution method don't you think...!?

Yep - It's pretty straightforward, and it doesn't seem to get affected
by any crossdomain problems at all...

> I developed the atom-feed for TiddlyCouch and also implemented this in the empty's.

What's the URL and how do you set it up?

> The MineralTheme-empty-ctw is implemented in such way that other tw
> themes can be used (no Fet functions...more basic)

Will it use the vanilla-theme in read-unly mode?
- or can I set it up to use a vanilla theme for logged in mode and
MineralTheme for logged out - in the jquery-couch tiddler maybe?

> Some more advanced patterns with replication you can think of is the
> "continuous" replication. This way the changes from the couch you
> replicate from are automatically "replicated" inside your own.
> For a "small"group this can be interesting:
> B>continuous-replicate A
> C>continuous-replicate B
> D>continuous-replicate C
> A>continuous-replicate D
> (all members work on their own account...and the "ring" makes it one
> project)

Great idea!! - Should be tested in reallife!
Isn't it the same thing as sharing the same tiddlyCouchDB database -
just using different admin usernames (and having 4 copies of
everything)??
(If user A makes changes to tiddler #1 made by user C (which user A
got from user D) - User C experiences that his tiddler #1 is updated
with user A's changes - however he got it (replicated) from user B -
so maybe it will have some database stamp/metadata which tells where
it came from - of course the modifier field will pass unaffected ---
anyway - isn't it just four copies of the same TW?....

Cheers Måns Mårtensson

UnclePhil

unread,
Nov 13, 2011, 2:46:40 PM11/13/11
to TiddlyWeb
hi all,

the replication model can be done, but we need to manage both tw and
couch to do that.
and this can be tricky.

we can setup a filtered replication from A to B butin the same time we
need to have a mechanism to solve the conflict that we can have during
replication

Bauwe, for the import , the solution can be simple, just add the
standard routine of tiddlywikiinto the basic code, but we need to
disable it for the first load of the file.For the moment i'm working
on it because i'm locked in my bed with a flu;-( but my brain is still
working

BTW mans, i'm not the creator of this version, Saq have done this one
faster than me,but i think that everything start from a discussion
between FND and me

From my bed
Ph Koenig
aka Unclephil

Bauwe Bijl

unread,
Nov 13, 2011, 3:39:36 PM11/13/11
to TiddlyWeb
Hi Måns


> > I developed the atom-feed for TiddlyCouch and also implemented this in the empty's.
>
> What's the URL and how do you set it up?
No need to set up...it's just there:
http://bijl.iriscouch.com/bijl-ctw/_design/tiddlycouch/_list/tiddlywiki/tiddlers#TiddlyCouchAtomFeed

> > The MineralTheme-empty-ctw is implemented in such way that other tw
> > themes can be used (no Fet functions...more basic)
> Will it use the vanilla-theme in read-unly mode?

... it is set up so it will be the theme for both edit and view mode,
but this can be adjusted in the config:
http://bijl.iriscouch.com/mineral-empty-ctw/_design/tiddlycouch/_list/tiddlywiki/tiddlers#zzConfig

> isn't it just four copies of the same TW?....
yes...replication is like copy/clone....somewhat like a snapshot
continuous replication causes the changes to be updated instantly
among all couches

Lets have a test...create a new db and replicate "continuous" with:
http://bijl.iriscouch.com/conrep01
....we need a third person that replicates yours (also continuous)...
and that db needs to be replicated with mine again.
Volunteers?
Let me know...

Bauwe

Bauwe Bijl

unread,
Nov 13, 2011, 4:16:21 PM11/13/11
to TiddlyWeb
Hi Phil

> the replication model can be done, but we need to manage both tw and
> couch to do that.
> and this can be tricky.

If the group is large this might be necessary yes.

> Bauwe, for the import , the solution can be simple, just add the
> standard routine of tiddlywikiinto the basic code, but we need to
> disable it for the first load of the file.For the moment i'm working
> on it because i'm locked in my bed with a flu;-( but my brain is still
> working
Would be great to have that solved yes.
Stay in bed (...because of the flu)!! (beterschap ;)

Bauwe


Måns

unread,
Nov 13, 2011, 7:11:03 PM11/13/11
to TiddlyWeb
Hi Bauwe and Phil

> Lets have a test...create a new db and replicate "continuous" with:http://bijl.iriscouch.com/conrep01
> ....we need a third person that replicates yours (also continuous)...
> and that db needs to be replicated with mine again.
> Volunteers?
> Let me know...

Maybe I brok a possible logic, however I have setup a database called
conrepmm which continously replicates http://bijl.iriscouch.com/conrep01

If someone makes a continous replication of my url: http://mama.iriscouch.com/conrepmm
into a database and posts his/her url here - Bauwe can have his
circle :-)
( - And we can test the thing...)

Cheers Måns Mårtensson

Måns

unread,
Nov 13, 2011, 7:15:43 PM11/13/11
to TiddlyWeb
Hi again

I have made a new database: conrep02

It can be replicated from this address:http://mama.iriscouch.com/
conrep02

Don't use url:http://mama.iriscouch.com/conrepmm !

Cheers Måns Mårtensson

> Maybe I broke a possible logic, however I have setup a database called
> conrepmm which continously replicateshttp://bijl.iriscouch.com/conrep01

Måns

unread,
Nov 14, 2011, 8:04:04 AM11/14/11
to TiddlyWeb
Hi Bauwe and Phil

I moved this to the TiddlyWiki group:
http://groups.google.com/group/tiddlywiki/t/980382b33e82647e?hl=en

Cheers Måns Mårtensson
Reply all
Reply to author
Forward
0 new messages