Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
New upgrade method for TiddlyWiki: proof of concept
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Saq Imtiaz  
View profile  
 More options Feb 15 2008, 6:36 pm
From: "Saq Imtiaz" <lew...@gmail.com>
Date: Sat, 16 Feb 2008 00:36:48 +0100
Local: Fri, Feb 15 2008 6:36 pm
Subject: New upgrade method for TiddlyWiki: proof of concept

Now that the TiddlyWiki core supports importing content, the recommended
upgrade method has been changed to take advantage of it. The current
recommended method is to download a new empty TiddlyWiki and import your
content in to it. The disadvantage is that it is a very counter-intuitive
way of upgrading.

*I've spent some time today putting together a proof of concept for a new
upgrade process that takes advantage of the import mechanism but still
offers a much simpler and almost 'one click' upgrade process.*

This should prove useful in context of the following item on the roadmap for
TiddlyWiki 2.3.1: 'New presentation of import tiddlers macro, optimized for
upgrading TiddlyWikis? (2.3.1)'
(http://trac.tiddlywiki.org/milestone/2.3.1)

It is not much code either ~ 2kb. I've tested on FF2 and IE7 with no
problems, on Windows Vista and Ubuntu.

Please keep in mind that I only spent about 2 hours on this and have not
focused on the user interface for now. I just wanted a working demo so we
could discuss this further. I would love to create a nice informative user
interface that is updated during the upgrade process.*

Demo
*Download the attached file to your computer. It is the latest version of
TiddlyWiki.com with my upgrade code added. The version number has been
displayed in the SiteTitle using the version macro. Please note the
'upgrade' button in the HelloThere tiddler.  (I've attached both the
TiddlyWiki and a zip file with the TiddlyWiki in case the group decides to
gobble the html attachments.)

For the purpose of this demo I have put together a mock newer TiddlyWiki to
upgrade to. It is a mock TiddlyWiki 5.0, but the file itself is just the
latest empty.html from TiddlyWiki.com with my upgrade code added and the
version number changed to 5.0 in an text editor. This file has been placed
on my server as the equivalent of the empty file at TiddlyWiki.com
/empty.html

In the file you downloaded, click upgrade and follow the onscreen
instructions. Please pay note to both the alerts and the messageArea
messages.

Once the upgrade has completed, please note that the version number of the
file is 5.0, but you have your original content.

*Concept*
We want to automatically fetch the latest empty.html from TiddlyWiki.com and
running that file import the content from the older file into it, all
without manual interaction.
This is done by means of the following concept:

   1. Prompt user to save their work
   2. Backup the file to a special file name
   3. Download the new TiddlyWiki empty file using an XmlHttpRequest
   4. Overwrite the current file with the new file
   5. Reload the file with a startup parameter called upgrade, passing to
   it the path to the backup file created in step 2
   6. On reload, the newer TiddlyWiki is loaded and automatically imports
   all content from the older file. Currently the behaviour is to not overwrite
   tiddler existing in the new empty file (so as to not overwrite newer
   versions of plugins included by default) Here we could add any extra plugin
   compatibility handling.
   7. We inform the user and then do a save, to create the appropriate
   MarkupBlocks
   8. We do one last reload to initialize the imported plugins.

*Possible issues*

   - I haven't focused much on error handling for now and we could
   improve in that area
   - In step 2 above, we could just create a regular backup
   - I use the locateStoreArea function to verify that the downloaded
   file is complete and a valid TiddlyWiki. It might be nice to provide an
   alternative verification source. Eg: a small file sitting at
   tiddlywiki.com/latest.js with information like, latest version number,
   file size, sha-1 hash. This could also be used to write a quick and simple
   plugin that notifies the user when a newer version of TiddlyWiki is
   available.
   Also currently the TiddlyWiki can update itself even if there is not a
   newer core version available. A check should be added for this.
   - We might want to more processing of plugins, ie check for
   compatibility etc before importing. It should be trivial to do so
   - We need a nice informative UI

A part of me is wondering if there is some fatal flaw in this that I am not
seeing as it was too easy to implement..... I'd love to hear from you guys
as to what you think. If it seems promising, we can figure out the best UI
for it and perhaps get a patch ready for the core.

Cheers,
Saq

--
Tiddly Learning ( http://lewcid.org ) : TiddlyWiki news, plugins, themes and
educational usage

  tw-com.html
547K Download

  tw-com.zip
144K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Ruston  
View profile  
 More options Feb 16 2008, 9:59 am
From: "Jeremy Ruston" <jeremy.rus...@gmail.com>
Date: Sat, 16 Feb 2008 14:59:55 +0000
Local: Sat, Feb 16 2008 9:59 am
Subject: Re: [twdev] New upgrade method for TiddlyWiki: proof of concept
Great stuff, Saq, I think that's just what we need.

> On reload, the newer TiddlyWiki is loaded and automatically imports all
> content from the older file. Currently the behaviour is to not overwrite
> tiddler existing in the new empty file (so as to not overwrite newer
> I use the locateStoreArea function to verify that the downloaded file is
> complete and a valid TiddlyWiki. It might be nice to provide an alternative
> verification source. Eg: a small file sitting at tiddlywiki.com/latest.js
> with information like, latest version number, file size, sha-1 hash. This
> could also be used to write a quick and simple plugin that notifies the user
> when a newer version of TiddlyWiki is available.

That's a good idea. Ideally, generating that file would be part of the
tw.com production process (it's a bit manual at the moment).

>  Also currently the TiddlyWiki can update itself even if there is not a
> newer core version available. A check should be added for this.

Although perhaps it would be useful to be able to do that to bring in
plugin updates.

> A part of me is wondering if there is some fatal flaw in this that I am not
> seeing as it was too easy to implement.....

Hehe, I don't think so; it's virtuoso hacking.

Cheers

Jeremy

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FND  
View profile  
 More options Feb 16 2008, 10:30 am
From: FND <F...@gmx.net>
Date: Sat, 16 Feb 2008 16:30:29 +0100
Local: Sat, Feb 16 2008 10:30 am
Subject: Re: [twdev] Re: New upgrade method for TiddlyWiki: proof of concept

> Great stuff, Saq, I think that's just what we need.

I can only second that - very impressive indeed! (And all that in only
two hours... !?)

> verification source. Eg: a small file sitting at tiddlywiki.com/latest.js
> with information like, latest version number, file size, sha-1 hash.

Sounds good.

> This could also be used to write a quick and simple plugin that notifies the
> user when a newer version of TiddlyWiki is available.

That'd be very cool.

> Ideally, generating that file would be part of the
> tw.com production process (it's a bit manual at the moment).

 From my limited knowledge, I think this could easily be incorporated
into Cook (as an optional argument, of course).

>> currently the TiddlyWiki can update itself even if there is not a
>> newer core version available. A check should be added for this.

> Although perhaps it would be useful to be able to do that to bring in
> plugin updates.

I'm not sure whether the default distro's plugins should be updated
using the core-upgrade mechanism - sync'ing them just like regular
plugins might be less confusing.
Also see this thread:
     [twdev] official plugin repository
     http://tinyurl.com/29o95a
(http://groups.google.com/group/TiddlyWikiDev/browse_thread/thread/53c...)

-- F.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Paco Rivière  
View profile  
 More options Feb 16 2008, 4:34 pm
From: "Paco Rivière" <pacorivi...@gmail.com>
Date: Sat, 16 Feb 2008 13:34:57 -0800 (PST)
Local: Sat, Feb 16 2008 4:34 pm
Subject: Re: New upgrade method for TiddlyWiki: proof of concept
Pls. go on. I look forward to use it!

On Feb 16, 4:30 pm, FND <F...@gmx.net> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
FND  
View profile  
 More options Feb 19 2008, 8:05 am
From: FND <F...@gmx.net>
Date: Tue, 19 Feb 2008 14:05:08 +0100
Local: Tues, Feb 19 2008 8:05 am
Subject: Re: [twdev] Re: New upgrade method for TiddlyWiki: proof of concept

> I'm not sure whether the default distro's plugins should be updated
> using the core-upgrade mechanism - sync'ing them just like regular
> plugins might be less confusing.

Maybe this core-upgrade mechanism could prompt the user to sync outdated
plugins - that would be very helpful.

-- F.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saq Imtiaz  
View profile  
 More options Mar 17 2008, 8:06 am
From: "Saq Imtiaz" <lew...@gmail.com>
Date: Mon, 17 Mar 2008 13:06:15 +0100
Local: Mon, Mar 17 2008 8:06 am
Subject: Re: [twdev] Re: New upgrade method for TiddlyWiki: proof of concept

I'm quite happy to work on this some more if we can get some consensus and
momentum going.
Some things that we need to decide:
1) What kind of a GUI do we want? For the very first iteration do we even
want anything more than an upgrade button and notification using alerts?
2) Verification. Do we use filesize? SHA1 hash? do we leave hooks for the
verification and implement it at a later time?
3) What kind of handling/checking do we want when importing content into the
new file? Compatibility check for plugins? Or do we implement this at a
later date too?

Saq


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Budden  
View profile  
 More options Mar 17 2008, 1:24 pm
From: "Martin Budden" <mjbud...@gmail.com>
Date: Mon, 17 Mar 2008 17:24:31 +0000
Local: Mon, Mar 17 2008 1:24 pm
Subject: Re: [twdev] Re: New upgrade method for TiddlyWiki: proof of concept
Saq,

some thoughts about your questions:
1) for the first implementation this is probably enough
2) I think we should do some kind of verification. For reference the
tiddlywiki implementation of SHA1 has does about 30K a second, so
verifying a tiddlywiki file will take a few seconds (acceptable, but
not ideal)
3) won't we get the compatibility checking for the plugins 'for free',
when they are reloaded after the upgrade?

Martin

On 17/03/2008, Saq Imtiaz <lew...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saq Imtiaz  
View profile  
 More options Mar 17 2008, 1:34 pm
From: "Saq Imtiaz" <lew...@gmail.com>
Date: Mon, 17 Mar 2008 18:34:54 +0100
Local: Mon, Mar 17 2008 1:34 pm
Subject: Re: [twdev] Re: New upgrade method for TiddlyWiki: proof of concept

On Mon, Mar 17, 2008 at 6:24 PM, Martin Budden <mjbud...@gmail.com> wrote:

> Saq,

> some thoughts about your questions:
> 1) for the first implementation this is probably enough

Agreed

> 2) I think we should do some kind of verification. For reference the
> tiddlywiki implementation of SHA1 has does about 30K a second, so
> verifying a tiddlywiki file will take a few seconds (acceptable, but
> not ideal)

My other concern with SHA1 verification is that the relevant code is now
shipped in the CryptoPlugin and we cant safely assume that every TiddlyWiki
will have it. Filesize verification is probably a good start, but not really
sufficient.... ideas? We also need to make sure Cook can generate the
relevant verification file to live on the serverside. As I mentioned in the
corresponding thread, Cook is unaware of the version number of the
TiddlyWiki it is cooking. Since this information must be included in the
verification file, we need to decide how to handle this. Should Cook grep
this from the version.js file?

> 3) won't we get the compatibility checking for the plugins 'for free',
> when they are reloaded after the upgrade?

Well, it might be nicer to check for compatibility when importing and offer
to either skip the import of incompatible plugins or fetch upgrades from
Source slice in the plugin. But this could be part of the PluginManager
functionality instead.

Tomorrow I have a packed schedule, but I'll try and submit a patch for this
on Wednesday.

Saq

--
Tiddly Learning ( http://lewcid.org ) : TiddlyWiki news, plugins, themes and
educational usage

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Saq Imtiaz  
View profile  
 More options Mar 17 2008, 1:40 pm
From: "Saq Imtiaz" <lew...@gmail.com>
Date: Mon, 17 Mar 2008 18:40:52 +0100
Local: Mon, Mar 17 2008 1:40 pm
Subject: Re: [twdev] Re: New upgrade method for TiddlyWiki: proof of concept

Actually on second thought, I believe it might be far more appropriate for
one of the core developers to polish this into shape and submit a patch.

Saq

--
Tiddly Learning ( http://lewcid.org ) : TiddlyWiki news, plugins, themes and
educational usage

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »