TiddlyWeb latest experience

23 views
Skip to first unread message

Eduard Wagner

unread,
Jan 19, 2009, 2:09:59 PM1/19/09
to Chris Dent, fn...@gmx.net, Tiddl...@googlegroups.com
Hi Chris, see notes below
 
Three things to look into:

* I've just released a 0.9.6 which adds support for logging. By default it
 just logs requests to tiddlyweb.log in the directory from which you start
 the server. But if you set 'debug_level': 'DEBUG' in the config dict in
 tiddlywebconfig.py it will record more stuff. What you might do is try the
 things described above and see what the log reports. If it makes no sense,
 you can send it to me and I can see if I can interpret what is going on.

* Also, have you seen Fred's response in the tiddlyweb installation thread.
 This message may be related to what's going on:

 http://groups.google.com/group/TiddlyWiki/msg/c531f43f67497e14

OK i've read his comments and i will follow this advise for future issues
 

* Precondition Failed is an error that will be reported when one of two things
 happens: the tiddler being saved has already been edited by someone or
 something else and the version on the server is new than the one you have in
 your TiddlyWiki, OR the client (TiddlyWiki) has generated an incorrectly formatted
 Etag for the tiddler it is trying to save to the server. It is this latter
 that is likely going on and the logs may be able to tell us if that is
 the case. If not I can give you some additional code which will do even more
 logging.

Let me know how things go.

OK, we updated to version 0.9.6 and now we don't have the mentioned
problems with saving any more!!!!!!!!!!!!YEAH!!!!!!!!!!!!!!!!!!

I installed the TiddlyWebAutoSavePlugin and it just works without any problems,
if we change the values in one of our listboxes the tiddler is immediately saved back to server
we don't get the error message 'Error saving ...Precondition Failed' any more. 
We just updated the server and didn't change the installed plugins.

But i have an idea what the problem could be: try this

If you name a tiddler and the tiddlername includes characters like "/" or "." you can save the tiddler once,
but if you make some changes to this tiddler you get the message 'Error saving ...Precondition Failed'

It's not a problem naming tiddlers in local files like this, but if you do it on tiddlyweb or try to sync this tiddler back to tiddlyweb you get the above error message, maybe there is something unclean with special character handling.

Thanks for help, I'am glad to get this support.

I will post our next step exterience with intense using tiddlyweb

for now it's this:

config it:
- creating different bags and recipes for team an project views
(system, plugins, help, teambag, projectbag)
- creating users with readonly rights (don't touch it chief ;)
- assigning write policies to the working bag of the team and readonly for the rest
- one admin user can change all contents in the bags

using it:
- creating, deleting, renaming(and deleting), copying a tiddler is working fine
- creating new tiddlers from wizards with hacked store.saveTiddler is working
- changing values in tiddlerfields within foreachtiddler listings is working (oh i love it)
- only use tiddler names without special characters is working (team did you notice this!!!)

that's all for now, see whats coming next

bye edi




FND

unread,
Jan 20, 2009, 7:10:17 AM1/20/09
to Tiddl...@googlegroups.com
> OK, we updated to version 0.9.6 and now we don't have the mentioned
> problems with saving any more

Happy to hear that!

> I installed the TiddlyWebAutoSavePlugin

Actually, the TiddlyWebAutoSavePlugin should be obsolete by now,
replaced by the ServerSideSavingPlugin (and, to some extent,
TiddlyWebConfig).

> If you name a tiddler and the tiddlername includes characters like "/"
> or "." you can save the tiddler once,
> but if you make some changes to this tiddler you get the message 'Error
> saving ...Precondition Failed'

I can confirm this. I thought we had addressed this issue, but it seems
it's not resolved entirely.
Anyway, good catch - we'll investigate.


-- F.

FND

unread,
Jan 20, 2009, 12:49:09 PM1/20/09
to Tiddl...@googlegroups.com
> I can confirm this. I thought we had addressed this issue, but it seems
> it's not resolved entirely.

There was a small bug in TiddlyWeb's ETag handling.
Chris has fixed this and released v0.9.7:
http://tiddlyweb.peermore.com/dist/CHANGES


-- F.

ccahua

unread,
Jan 20, 2009, 3:00:36 PM1/20/09
to TiddlyWiki
From FND Mon, 12 Jan 2009 17:48:44 +0000
>However, we've recently changed the understanding of workspace so you
>don't have to worry about the TiddlyWeb-specific server.bag anymore.
>So instead of that, you should use the following now:
"server.workspace": "bags/myBag"

Thank you all, Chris, FND, Eduard.. one more question:

Do I add this custom line (server.workspace": "bags/myBag") in
TiddlyWebConfig/config.defaultCustomFields
for every new bag? or do I add new set of config.defaultCustomFields
witht the custom line?

Basically, what do I change in order to save in more than 1 bag, ie
common, bag1, bag2, bag3?


>Does that help?

yes, but, a wee hiccup (FYI)....

For 1 new bag, I'm able to save to existing tiddlers and save new
tiddlers to an imported bag, hooray!

but the first time I tried to save didn't work. Subsequent saves now
work which is wonderful.
(I love the automatic creation of the tiddlyweb.log btw.)

Here's what i did:

I installed 097 and was successful in saving to existing tiddlers in a
new bag (not common) but not saving new tiddlers.

1 made new instance
2 made new bag, w3c
3 imported this test tiddlywiki: http://osmosoft.com/~psd/TiddlyWikiDeviceAccess/
4 made new recipe, 'test' = system + w3c
5 Test saving to existing tiddler - started the server and
successfully saved to existing tiddler to the common bag but not a new
tiddler.

6 Test saving to new tiddler: Then I tried changing the
"server.workspace": "bags/common" to "server.workspace": "bags/w3c"

as follows:

go into recipe as tiddlers.wiki
http://127.0.0.1:8080/recipes/test/tiddlers.wiki

go to the backstage, TiddlyWebConfig
change the field to "server.workspace": "bags/w3c"

you should get a saved dialog, something like "TiddlyWebConfig saved
successfully"

I make a new tiddler and get a successful save dialog. looks good
right?

But when i go back into the 'common' bag, all the new saved tiddlers
are there even after changing the server.workspace to bags/w3c as
shown in the log:

Looking at the tiddlyweb.log shows a PUT to the TiddlyWebConfig
(changing the server.workspace to bags/w3c instead of bags/common,
creating revision 2 in TiddlyWebConfig):

2009-01-20 09:20:07,028 INFO 127.0.0.1 - GUEST [20/Jan/
2009:09:20:07 ] "PUT /bags/system/tiddlers/TiddlyWebConfig?no
cache=0.4641619112542664 HTTP/1.1" 204 - "http://127.0.0.1:8080/
recipes/test/tiddlers.wiki" "Mozilla/5.0 (Windows; U; Wi
ndows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Ubiquity/0.1.5"

This entry shows a PUT of the new tiddler to common bag (not w3c) even
though I made a new revision 2 above?!

2009-01-20 09:23:09,466 INFO 127.0.0.1 - GUEST [20/Jan/
2009:09:23:09 ] "PUT /bags/common/tiddlers/test%20saving%20to
%20the%20test%20recipe?nocache=0.7691834834896291 HTTP/1.1" 204 -
"http://127.0.0.1:8080/recipes/test/tiddlers.wiki" "Mo
zilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/
2008120122 Firefox/3.0.5 Ubiquity/0.1.5"

A bit later, Tiddlyweb is saving fine to the w3c bag:

2009-01-20 11:21:09,502 INFO 127.0.0.1 - GUEST [20/Jan/
2009:11:21:09 ] "PUT /bags/w3c/tiddlers/SavingTest?nocache=0.
1053583499357923 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/test/
tiddlers.wiki" "Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 Ubiquity/
0.1.5"
2009-01-20 11:24:43,573 INFO 127.0.0.1 - GUEST [20/Jan/
2009:11:24:43 ] "PUT /bags/w3c/tiddlers/AnotherSavingTest?noc
ache=0.4253931028008009 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/
test/tiddlers.wiki" "Mozilla/5.0 (Windows; U; Win
dows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Ubiquity/0.1.5"

Journal tiddlers work too:
2009-01-20 11:26:04,825 INFO 127.0.0.1 - GUEST [20/Jan/
2009:11:26:04 ] "PUT /bags/w3c/tiddlers/20%20January%202009?n
ocache=0.4119574336488333 HTTP/1.1" 204 - "http://127.0.0.1:8080/
recipes/test/tiddlers.wiki" "Mozilla/5.0 (Windows; U; W
indows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Ubiquity/0.1.5"

Now i just have to find out how to set the TiddlyWebConfig/
config.defaultCustomFields so I can save in more than one bag

Best,
tony

ccahua

unread,
Jan 20, 2009, 3:58:33 PM1/20/09
to TiddlyWiki
On Jan 20, 12:00 pm, ccahua <cca...@gmail.com> wrote:
> On Jan 20, 9:49 am, FND <F...@gmx.net> wrote:

>
> Do I add this custom line (server.workspace": "bags/myBag") in
> TiddlyWebConfig/config.defaultCustomFields
> for every new bag? or do I add new set of config.defaultCustomFields
> witht the custom line?
>
> Basically, what do I change in order to save in more than 1 bag, ie
> common, bag1, bag2, bag3?
...
>
> Now i just have to find out how to set the TiddlyWebConfig/
> config.defaultCustomFields so I can save in more than one bag

A bit more checking...

I tested again with another bag and I think the server needs a restart
in order to save after the TiddlyWebConfig save.

For some reason twanager is picking up the old server.workspace custom
config in revision 1. Only after a restart of the server, does the
custom config in TiddlyWebConfig/revision 2 work and tiddlers are
saved to the new bag.

This was apparent when I tried to save to a new journal tiddler and
found that the tiddler saved to bag2/tiddlers/20 January 2009
was instead saved to bag1/tiddlers/20 January 2009 even though
server.workspace": "bags/bag2"

After I restarted the server, twanager correctly PUTS to the new bag.

For multiple workspaces...

Ha! I thought I could get away with just adding more workspaces to
TiddlyWebConfig:

config.defaultCustomFields = {
"server.type": "tiddlyweb",
"server.host": store.getTiddler("TiddlyWebConfig").fields
["server.host"],
"server.workspace": "bags/bag1"
"server.workspace": "bags/bag2"
};

Got a good save to bag1, but then I got a PluginManager error when I
tried to open bag2. Oh well.
I guess I don't understand how TiddlyWeb separates the custom
configs. :-\

Perhaps there is an issue if there are identical named tiddlers in
different bags but the TiddlyWebConfig in the System bag is the source
of all recipes?

Best,
tony

EduardWagner

unread,
Jan 20, 2009, 5:43:17 PM1/20/09
to TiddlyWiki
> Perhaps there is an issue if there are identical named tiddlers in
> different bags but the TiddlyWebConfig in the System bag is the source
> of all recipes?

Hi, we do have a lot of recipes now
and each of them has it's own workspace bag, where we put the
corresponding TiddlyWebConfig entry "server.workspace": "bags/
workspace"
We don't have a TiddlyWebConfig in the system bag any more and so only
one is loaded with the recipes bags.
I don't now if there is a feature for multiple workspaces right now,
there is a tiddlersourceplugin, but i don't now if it's obsolete now.

@developers
The key question from myself is: what was the reason for the bag-
concept in filesystems?
From a "real real green green" user opinion the concept with extented
tiddler fields and tags would have been more
of a meta description (groupings of tiddlers in "virtual" bags with
policies and things like that).
What was the need of filesystem, was it due to performance of the wiki-
generation or deployment needs, or ...
Would be just interesting why the developers decided to go this way;)

nevertheless it's working fine and fast for us now and i'm very glad
you developed that tiddlyweb server.

bye edi

EduardWagner

unread,
Jan 20, 2009, 6:00:44 PM1/20/09
to TiddlyWiki
> Actually, the TiddlyWebAutoSavePlugin should be obsolete by now,
> replaced by the ServerSideSavingPlugin (and, to some extent,
> TiddlyWebConfig).

Hi,
we actually use the listboxplugin from tiddlytools and after changing
a listboxvalue the tiddlers are only saved
immediately when the TiddlyWebAutoSavePlugin is loaded, maybe there
are some notifications used which are not recognized by
ServerSideSavingPlugin?

and we just have a little issue left with CheckboxToggleTag script
from tiddlytools:
if you toggle a tag the relevant tiddler tagvalue is changed, but the
tiddler is not saved immediately
back to server and you naturally get no done message. If you press the
saveDocument button the recent changed tiddler gets saved back with a
final done message.

But i don't know if we have to modify the script and plugins from
tiddlytools in order to throw the right notifications, or if its on
the side of tiddlyweb.

Maybe some hints?
thanks edi

ccahua

unread,
Jan 20, 2009, 9:02:03 PM1/20/09
to TiddlyWiki
On Jan 20, 2:43 pm, EduardWagner <ugligats...@googlemail.com> wrote:
> Hi, we do have a lot of recipes now
> and each of them has it's own workspace bag, where we put the
> corresponding TiddlyWebConfig entry "server.workspace": "bags/
> workspace"
> We don't have a TiddlyWebConfig in the system bag any more and so only
> one is loaded with the recipes bags.
> I don't now if there is a feature for multiple workspaces right now,
> there is a tiddlersourceplugin, but i don't now if it's obsolete now.

Whew, I think I finally figured out a workaround to save to different
workspaces thanks to Eduard and FND's advice of either having a new
tiddler macro set to the target bag or adding a custom config in the
local bag: above and
http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/94cdb9613200687c#

with a slight hiccup of having to restart twanager server with the
first save still going to the common bag.

Basically I chose the latter as suggested: there needs to be a local
config in the new bag (not system, not common) that will override the
TiddlyWebConfig in the system bag.

I copied the TiddlyWebConfig from the system bag into 2 test bags: foo
and bar

Then I changed config.defaultCustomField, "server.workspace": "bags/
common" to "bags/foo" and "bags/bar" respectively.

so
$ less store/bags/foo/tiddlers/TiddlyWebConfig/1 should have
"server.workspace": "bags/foo"
and
$ less store/bags/bar/tiddlers/TiddlyWebConfig/1 should have
"server.workspace": "bags/bar"

more importantly in the system bag
$ less store/bags/system/tiddlers/TiddlyWebConfig/1 will be
"server.workspace": "bags/common"

and if I'm reading correctly saving default to 'default' bag! -http://
www.tiddlywiki.org/index.php?title=Dev_talk:TiddlyWeb&action=edit&section=2

I made the usual recipe of foo recipe = system + foo bag with imported
empty.html and bar recipe = system + bar bag with imwiki empty.html

I then started the server and created a foo tiddler from the foo
recipe and saved

Unfortunately when I checked the foo bag (not foo recipe) I didn't see
my foo tiddler. It got saved to the common bag even though I went on
the command line and edited it to bag/foo:

2009-01-20 16:23:06,707 INFO 127.0.0.1 - GUEST [20/Jan/
2009:16:23:06 ] "PUT /bags/common/tiddlers/FooTiddler?nocache
=0.07761599014055898 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/
foo/tiddlers.wiki"

2009-01-20 17:17:27,651 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:17:27 ] "PUT /bags/common/tiddlers/FooTiddler?nocache
=0.34582476555036457 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/
foo/tiddlers.wiki"

So I restarted the server and tried creating a bar tiddler in bar
recipe

bingo it worked as shown PUT to bags/bar

2009-01-20 17:18:06,104 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:18:06 ] "PUT /bags/bar/tiddlers/BarTiddler?nocache=0.
5101406414486139 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/bar/
tiddlers.wiki" NT

Then I tried foo again, bingo that worked with PUT to bags/foo:

2009-01-20 17:20:16,963 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:20:16 ] "PUT /bags/foo/tiddlers/FooTiddler?nocache=0.
9306065403541731 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/foo/
tiddlers.wiki" NT

another bar tiddler just in case, I'm not going crazy:

2009-01-20 17:22:01,646 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:22:01 ] "PUT /bags/bar/tiddlers/BarTiddler2?nocache=0
.7775235943857574 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/bar/
tiddlers.wiki" NT

Maybe change the title to Bar (testing save to existing tiddler):

2009-01-20 17:22:08,396 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:22:08 ] "PUT /bags/bar/tiddlers/SiteTitle?nocache=0.4
650678830220858 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/bar/
tiddlers.wiki" NT 5


And another foo tiddler 2
2009-01-20 17:23:13,663 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:23:13 ] "PUT /bags/foo/tiddlers/FooTiddler2?nocache=0
.1970655670193442 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/foo/
tiddlers.wiki" NT

And lastly title change:
2009-01-20 17:23:19,600 INFO 127.0.0.1 - GUEST [20/Jan/
2009:17:23:19 ] "PUT /bags/foo/tiddlers/SiteTitle?nocache=0.0
2641447881101089 HTTP/1.1" 204 - "http://127.0.0.1:8080/recipes/foo/
tiddlers.wiki" NT


So it works but is a bit of a kludge as the user has to go on the
command line and edit the TiddlyWebConfig manually ie save was set to
common bag.

The only hiccup is that the initial save for some reason saves to the
common bag. I'll keep testing.

Sorry for all the long posts, but it helps to refer back when i need
to test again on the next iteration, hopefully beta!
I would have thrown these notes to the wiki, but i don't think it is
useful as tiddlyweb is still evolving.

Thanks again for all the input, it was a good learning experience

Best,
tony



EduardWagner

unread,
Jan 21, 2009, 3:53:36 AM1/21/09
to TiddlyWiki

> There was a small bug in TiddlyWeb's ETag handling.
> Chris has fixed this and released v0.9.7:
>      http://tiddlyweb.peermore.com/dist/CHANGES
Hi,
updated to version 0.9.7 now and the problem is solved, but
we have some tiddlers including brackets within tiddlernames "(...)"
and there
we get futher the message "Error Saving <tiddler.title> Precondition
Failed"
please let me know if there are some restrictions for using special
characters in tiddlernames
thanks edi

chris...@gmail.com

unread,
Jan 21, 2009, 8:29:06 AM1/21/09
to TiddlyWiki


On Jan 21, 8:53 am, EduardWagner <ugligats...@googlemail.com> wrote:

> we have some tiddlers including brackets within tiddlernames "(...)"
> and there
> we get futher the message "Error Saving <tiddler.title> Precondition
> Failed"
> please let me know if there are some restrictions for using special
> characters in tiddlernames

Can you give me an example of a specific title that is not working
correctly? I'll try to fix it from there. I suspect it is a similar
problem to the '/' fixed for 0.9.7.

chris...@gmail.com

unread,
Jan 21, 2009, 8:54:05 AM1/21/09
to TiddlyWiki

There's a lot to comment on in this thread, and I hope to when I have
a gap, but wanted to hit some high points in here. See within:

On Jan 21, 2:02 am, ccahua <cca...@gmail.com> wrote:
> I copied the TiddlyWebConfig from the system bag into 2 test bags: foo
> and bar
>
> Then I changed config.defaultCustomField,  "server.workspace": "bags/
> common" to "bags/foo" and "bags/bar" respectively.

Yes. That's pretty much the way to do it. Anytime you create a wiki
from a recipe the TiddlyWebConfig that comes from the last bag listed
in the recipe is the one that will end up being in the TiddlyWiki and
being active. This gets at a bit of the point of having recipes: you
can keep some common content in one bag, use that bag in multiple
recipes, and then use other bags to customize the TiddlyWiki that is
generated.

> I made the usual recipe of foo recipe = system + foo bag with imported
> empty.html and bar recipe = system + bar bag with imwiki empty.html

There's no need to imwiki empty.html. empty.html is included in
TiddlyWeb. The only reason to import a wiki with imwiki is if the wiki
you are importing has content that you needed to get into a bag
quickly. For example yesterday I imported the basic teamtasks wiki
into a bag in TiddlyWeb to see if teamtasks works in TiddlyWeb (and it
does, I'll be making an announcement about it soon).

> I then started the server and created a foo tiddler from the foo
> recipe and saved
>
> Unfortunately when I checked the foo bag (not foo recipe) I didn't see
> my foo tiddler. It got saved to the common bag even though I went on
> the command line and edited it to bag/foo:

It is highly likely that you are encountering some caching problems.
TiddlyWeb, since it is trying very hard to be a good team player on
the web, is very strict about caching. So a few things to think about:

* After you change a configuration tiddler you most likely need to
make sure you reload the wiki from the server.
* It looks like you may sometimes be editing Tiddlers in place from
the command line, directly on the filesystem. If this is the case, you
need to make sure that you save a new revision of the file and
increment the modified field on the tiddler, otherwise headers used
for managing the browser cache when producing output will not be
updated, and your browser will not get new content. The other option
is to make your browser do a forced reload and/or flush the browser
cache. Since it seems like editing tiddlers from the command line is
becoming quite popular, a twanager plugin that does it would be handy.
If someone wants to write this I can give some guidance, or will do it
myself eventually.
* You've mentioned needing to restart the server after editing a
config tiddler. This is a red herring: the server will send whatever
data it is asked for and doesn't use the config tiddlers for itself.
Restarting is probably just getting you around some caching issues.

> So it works but is a bit of a kludge as the user has to go on the
> command line and edit the TiddlyWebConfig manually ie save was set to
> common bag.

One thing to keep in mind is that TiddlyWebConfig is only used for
newly created tiddlers that have been created by the new tiddler or
new journal button. If you edit an existing tiddler or create a new
tiddler by following a link from an existing tiddler those tiddlers
will use the fields of the existing tiddler and save according to the
rules in there.

This means that if you have an existing TiddlyWebConfig already in bag
common, when you edit it, by default it will be written back to bag
common. To get it to go somewhere else its server.workspace needs to
changed to something else. I think FND has a plugin that can do this.

> Sorry for all the long posts, but it helps to refer back when i need
> to test again on the next iteration, hopefully beta!
> I would have thrown these notes to the wiki, but i don't think it is
> useful astiddlywebis still evolving.

Putting stuff on the wiki is great if you feel like doing that: It can
evolve too.

FND

unread,
Jan 21, 2009, 8:54:05 AM1/21/09
to Tiddl...@googlegroups.com
There seems to be some confusion WRT workspaces/bags/recipes, so I'll
try to clear that up (I hope I'm not missing the point here though... ):

The basic unit is the tiddler.
Each individual tiddler has a workspace (in TiddlyWeb terms, that
translates to a certain bag or recipe) associated with it.
That means there isn't really some secret setting that defines the
current workspace for all tiddlers in the current document.
Thus a TiddlyWiki document might contain tiddlers from multiple workspaces.

For TiddlyWeb that means a single save/sync operation can trigger a save
to multiple bags, depending on how the respective tiddlers identify
themselves.

Tiddlers normally obtain that workspace association when they are first
created. This might happen via a NewTiddler button (as described in a
previous post), for example - only if no such information is given,
defaultCustomFields (usually defined in TiddlyWebConfig) are used.

Does this help at all?

> what was the reason for the bag-concept in filesystems?

I don't feel confident I can articulate this properly, so I'll leave
that task to Chris...

> I would have thrown these notes to the wiki, but i don't think it is
> useful as tiddlyweb is still evolving.

Oh, I think it would be useful - at the very least on a discussion page.

I hope I didn't miss any outstanding issues...


-- F.

FND

unread,
Jan 21, 2009, 9:13:16 AM1/21/09
to Tiddl...@googlegroups.com
> To get it to go somewhere else its server.workspace needs to
> changed to something else. I think FND has a plugin that can do this.

There's the TiddlyWebTiddlerSourcePlugin:
http://tinyurl.com/7d7l53
(http://svn.tiddlywiki.org/Trunk//association/serversides/tiddlyweb/client/plugins/TiddlyWebTiddlerSourcePlugin.js)

However, I don't think that's actually operational these days. It was an
early exploratory effort, which now seems outdated both technically and
conceptually.

Essentially, changing a workspace is the same as renaming, so I'll have
to implement that first.


-- F.

chris...@gmail.com

unread,
Jan 21, 2009, 10:06:29 AM1/21/09
to TiddlyWiki
On Jan 20, 10:43 pm, EduardWagner <ugligats...@googlemail.com> wrote:
> The key question from myself is: what was the reason for the bag-
> concept in filesystems?
> From a "real real green green" user opinion the concept with extented
> tiddler fields and tags would have been more
> of a meta description (groupings of tiddlers in "virtual" bags with
> policies and things like that).
> What was the need of filesystem, was it due to performance of the wiki-
> generation or deployment needs, or ...
> Would be just interesting why the developers decided to go this way;)

When Jeremy and I were having the conversations that led to TiddlyWeb,
the original goal with bags was to have an independent concept that
would act as a container for tiddlers. That container would have
permissions about who could manipulate the stuff in the bag.

By having a separate concept for these needs it was believed (and I
think this have proven to be true) some complicated notions (selecting
and protecting tiddlers) could be wrapped up in a more simple notion.
The bag is a place that tiddlers are in, it is a finite space and
sometimes you can only get some stuff in and out.

To ensure that the bag concept was maintained as a separate beast in
the code, the library API and the HTTP API we chose to make it a first
class real thing. There are bag objects in the code, bag URIs in the
HTTP API and bags in the storage system.

It is certainly the case that the bag concept could have been achieved
with additional fields or attributes on tiddlers, but I think that
would have made things more complicated. It is also the case that when
tiddlers were being written to disk they could have been stored with a
bag attribute and would not need to be in a separate directories, but
I simply found it easier to understand and implement the first text
store as things are set up. In the google data store (which likely
does not work with newer versions of TiddlyWeb) the tiddlers have a
bag attribute instead of physically being in a bag.

I never particularly imagined the original text store to remain as the
default, but for the time being that's the way it is going. The design
is certainly not the result of striving for performance: I'm of the
first make it right and easy to understand, then make it fast school
of development.

On a related note: In the early days there was another similar
discussion. Martin and I asked why there needs to be recipes: can't a
recipe just be a bag of bags? Technically this is certainly possible
and to some extent it is what is going on, but by making the concept
separate throughout the system its easier to understand what's going
on. Unfortunately we've not really done a good enough job (yet) of
exploring the power of recipes to really demonstrate why there should
be a separate concept, but I suspect that is to come.

Thanks again to everybody for participating in the TiddlyWeb creation
process.

chris...@gmail.com

unread,
Jan 21, 2009, 10:22:05 AM1/21/09
to TiddlyWiki
On Jan 21, 2:13 pm, FND <F...@gmx.net> wrote:
> Essentially, changing a workspace is the same as renaming, so I'll have
> to implement that first.

I disagree with this assessment. I suppose maybe we should take this
conversation to the dev group, but since we are getting long and
interesting in this thread and we've been exploring a fair number of
concepts it may be worthwhile to keep it here, so I will.

In the specific case of where you have TiddlyWeb set up to do
automatic saving of tiddlers after you click done or otherwise making
a chance, there's good reason for "changing a workspace" to be the
same thing as "rename". It's likely (but not always true) that what
you are saying when you say "I want this in workspace B" is also "I
don't want this in workspace A".

However, when you're not automatically saving changes, but are instead
using sync, it's quite likely you have no need to rename, you just
want to say things like:

* I don't want this tiddler to be saved to this place, I want to be
saved to this other place.
* I'd like to duplicate this tiddler to another place.

etc.

So there are two separate pieces of functionality which are desired,
which are orthogonal (hi Martin!):

* Moving the serverside canonical location of a tiddler, with history,
from one bag.name/tiddler.title pair to another. This is rename, on
the server, activated by client code.
* Changing the target for any existing tiddler so it goes somewhere
else. This is a server.field editor of some sort and doesn't make any
interactions with the server in and of itself. The changes in the
fields only matter when the tiddler is saved.

Make sense?

FND

unread,
Jan 21, 2009, 12:55:08 PM1/21/09
to Tiddl...@googlegroups.com
> So there are two separate pieces of functionality which are desired,
> which are orthogonal

Oh, I absolutely agree.
Since we haven't really experimented with the unplugged experience much
yet, I figured in this case the renaming thing was what's relevant.


-- F.

Oveek Mallik

unread,
Feb 2, 2009, 5:27:07 AM2/2/09
to TiddlyWiki
I've been experimenting with tiddlyweb, and found this thread really
useful to get me going.

I won't comment too much on what's been said, but I really like the
concept of tiddlyweb, and so far I think the implementation is very
nice. I do like the decision of making "concrete" bags/folders where
tiddlers are stored as individual files, while recipes are used as the
more abstract list of ingredients/bags that can be combined to make up
a wiki. I sense a lot of potential here. I'd like to comment more on
this and other things later, but I have a specific question for the
time being.

Is there a way to disable revisions?

For now I've done it by using a simple hack in the tiddler_put()
method of the Store class in /tiddlyweb/core/tiddlyweb/stores/text.py.
I just replaced the line incrementing the revision variable with,
revision = 1. This causes tiddler updates to always be written to a
file named '1' instead of a new file each time.

The reason I want this is to avoid out of control proliferation of
these revision files. I plan on using MonkeyGTD with tiddlyweb, and
there will be a lot of toggling of status flags (triggering autosave)
and other minor edits that don't really require a revision history.
Also I tend to be a little obsessive, and edit and save in many little
increments as i'm entering information so that would also cause me to
end up with a whole bunch of extra files.

I do like having revisions in other situations, and like the
straightforward idea used in tiddlyweb, but a config option to disable
revisions would also be excellent (I'm assuming it doesn't already
exist).

For the record I'm running this out of svn under both Linux and
Windows using Python 2.6, and things seem to be working smoothly in
both cases. I'm still kicking the tires though.

I had also encountered that BeautifulSoup parser problem, and my
workaround was to save a tiddlywiki's store area as an html file and
import that using the 'twanager imwiki' command, but the latest svn
update allows me to simply import an entire tiddlywiki. I know you
addressed this in the Dev group.

Great work so far, and hope to give more feedback later.

Reenen Laurie

unread,
Feb 2, 2009, 5:54:39 AM2/2/09
to Tiddl...@googlegroups.com
I think the best is to write a "cleansing" script.  Which just removes the older revisions.  (What happens in the python if there is only a file named 6, but no 1, 2, 3, 4, or 5?... Also what's the next revision's name?)

Also, the way I understand the design choice was, that hard drive space is not much of a premium, and text can go mb's and mb's without really affecting anything.

My current instance of TiddlyWeb is 900kb in size, spanning 424 files over 94 directories...

Thus the 94 directories is probably about 85 tiddlers (the rest being store's, bags, recipes etc.) so that's about 400 files across 85 tiddlers...

So an average of 4.7 revisions per tiddler, and 20kb per tiddler (total) or 4.25kb per revision.

It does take a bit more space on disk, because the minimum size of a file is 4kb, so the 900kb totals more than 2.1mb on disk.

But loading time is not affected by this size... so I think a script or so would do the trick for you.

Regards,
-Reenen
--
o__
,_.>/ _
(_)_\(_)_______
...speed is good
_______________
I believe five out of four people have a problem with fractions.

chris...@gmail.com

unread,
Feb 3, 2009, 12:37:08 PM2/3/09
to TiddlyWiki


On Feb 2, 10:27 am, Oveek Mallik <mov...@gmail.com> wrote:
> I won't comment too much on what's been said, but I really like the
> concept oftiddlyweb, and so far I think the implementation is very
> nice. I do like the decision of making "concrete" bags/folders where
> tiddlers are stored as individual files, while recipes are used as the
> more abstract list of ingredients/bags that can be combined to make up
> a wiki. I sense a lot of potential here. I'd like to comment more on
> this and other things later, but I have a specific question for the
> time being.

Feel free to post here or the dev list as you think of things.

(As an aside is it getting to the point where we should have a
tiddlyweb google group?)

> Is there a way to disable revisions?

Not officially, yet, but I've made a ticket: http://trac.tiddlywiki.org/ticket/901

> For now I've done it by using a simple hack in the tiddler_put()
> method of the Store class in /tiddlyweb/core/tiddlyweb/stores/text.py.
> I just replaced the line incrementing the revision variable with,
> revision = 1. This causes tiddler updates to always be written to a
> file named '1' instead of a new file each time.

What you've done is basically the thing to do for the time being. What
you could do is subclass the text store and remove revisions from it.
An example of something that does that (for different reasons) can be
seen at: http://svn.tiddlywiki.org/Trunk/contributors/ChrisDent/experimental/tiddlyweb-plugins/simpletext/

> The reason I want this is to avoid out of control proliferation of
> these revision files. I plan on using MonkeyGTD withtiddlyweb, and
> there will be a lot of toggling of status flags (triggering autosave)
> and other minor edits that don't really require a revision history.
> Also I tend to be a little obsessive, and edit and save in many little
> increments as i'm entering information so that would also cause me to
> end up with a whole bunch of extra files.

One thing you might consider is a store that saves N revisions, and
truncates on the fly when N is hit.

> For the record I'm running this out of svn under both Linux and
> Windows using Python 2.6, and things seem to be working smoothly in
> both cases. I'm still kicking the tires though.

Excellent. One of these days I hope to make the trip into Python 3.

> Great work so far, and hope to give more feedback later.

Looking forward to it.

chris...@gmail.com

unread,
Feb 3, 2009, 12:40:04 PM2/3/09
to TiddlyWiki

On Feb 2, 10:54 am, Reenen Laurie <rlau...@gmail.com> wrote:
> I think the best is to write a "cleansing" script.  Which just removes the
> older revisions.  (What happens in the python if there is only a file named
> 6, but no 1, 2, 3, 4, or 5?... Also what's the next revision's name?)

If there's only file named 6, the next revision will be 7. The list is
sorted and the max number taken and 1 added.

So a cleansing script would work with the current text store.

> Also, the way I understand the design choice was, that hard drive space is
> not much of a premium, and text can go mb's and mb's without really
> affecting anything.

That's right. I'm sure there are many situations where this wouldn't
true, thus the flexibility of the store system: to allow people to do
other things that work better.

Oveek Mallik

unread,
Feb 5, 2009, 4:07:43 AM2/5/09
to TiddlyWiki
Your points about revisions, and size not being a major factor, are
well taken.

> I think the best is to write a "cleansing" script.  Which just removes the
> older revisions.  (What happens in the python if there is only a file named
> 6, but no 1, 2, 3, 4, or 5?... Also what's the next revision's name?)

I didn't encounter this issue because I disabled revisions from the
very beginning (before doing any saves). But you raise a good point.
What I did wouldn't work in the case where tiddler revisions have been
saved for a while and then "switched off" using my simple hack.

As far as size goes, I can't argue with your logic. I guess for me
it's more the idea that bothers me. If I have a long tiddler, like
maybe a 1,000 words or more, and I fix a typo, the idea that all 1,000
words are saved again for the sake of one correction bugs me a bit. So
my hang up is with making many small changes to large tiddlers.

I'll consider the cleansing script idea too, that might be the better
way.

Oveek Mallik

unread,
Feb 5, 2009, 4:38:47 AM2/5/09
to TiddlyWiki
On Feb 4, 1:37 am, "cd...@peermore.com" <chris.d...@gmail.com> wrote:

>
> (As an aside is it getting to the point where we should have atiddlywebgoogle group?)

I think the only downside to that is lower TiddlyWeb exposure to the
general TiddlyWiki user population that browses this group. I
personally had been aware of TiddlyWeb for sometime and was watching
with great interest, but it was really this thread, and the other one
called "tiddlyweb installation," that made me sit up and take notice.
I hadn't realized how much progress had been made since its inception.

On the other hand, it would be a plus to have all of these great
discussions collected in one place as a reference. At the moment it's
a bit of a challenge keeping tabs on the topics in this group and the
TiddlyWiki Dev group.

Maybe there's a good way to answer both issues.

> > Is there a way to disable revisions?
>
> Not officially, yet, but I've made a ticket:http://trac.tiddlywiki.org/ticket/901

> One thing you might consider is a store that saves N revisions, and
> truncates on the fly when N is hit.

Thanks. I appreciate that this isn't as simple as it appears on the
surface, and I don't feel it's that much of a high priority feature.
I'm satisfied with the temporary fix, and will worry about a cleaner
solution after sorting out some other issues...will be posting about
those soon.

FND

unread,
Feb 5, 2009, 6:33:04 AM2/5/09
to Tiddl...@googlegroups.com
> it's more the idea that bothers me. If I have a long tiddler, like
> maybe a 1,000 words or more, and I fix a typo, the idea that all 1,000
> words are saved again for the sake of one correction bugs me a bit. So
> my hang up is with making many small changes to large tiddlers.

I can relate.
However, it would be possible to only store deltas - it's just a matter
of someone coming alone and writing that TiddlyWeb store...


-- F.

Reply all
Reply to author
Forward
0 new messages