Closed tobibeer closed 7 years ago
Hi @tobibeer
I'd suggest trying it out - create a new space, and include the space "tw5tiddlyweb", then visit yourspace.tiddlyspace.com/tw5
. Interesting to open the network tab in developer tools and watch the traffic too.
You'll see that:
The TW5 HTML file is loaded without any tiddlers embedded within it. At startup we read a skinny version of all tiddlers, and then use lazy loading to load the bodies as required
Ok, why is that? So long as we can't leverage server search in TW5, fully loading tiddlers seems the appropriate thing to do.
That means that plugins can't be loaded from TiddlySpace, they need to be embedded in the TW HTML file
That's a major restriction.
At the moment the adaptor just writes new tiddlers to the private bag, but reads all tiddlers from the recipe in the expected way.
Another major restriction, so content is always inaccessible to the public.
Is that because TiddlyWiki cannot yet handle the proper request... and a lot of TWc specific TiddlyWeb plugins need porting?
I'd suggest trying it out - create a new space, and include the space "tw5tiddlyweb", then visit yourspace.tiddlyspace.com/tw5. Interesting to open the network tab in developer tools and watch the traffic too.
Will take a look.
Ok, why is that? So long as we can't leverage server search in TW5, fully loading tiddlers seems the appropriate thing to do.
Because TiddlySpace itself would need to be updated to accommodate the build of TW5. It's not a big job, but it's not something that can be done outside Osmosoft.
That's a major restriction.
From a security point of view it may well be the right architecture :smile:
For now, it means that sometimes you'll need to bake a custom blank TW5 for a space.
Another major restriction, so content is always inaccessible to the public.
It's quite easy to fix it to default to public.
Is that because TiddlyWiki cannot yet handle the proper request... and a lot of TWc specific TiddlyWeb plugins need porting?
That's the big question. I think that many TiddlySpace admin functions would be best staying as SPAs, and not ported into TW.
I've decided to reply here rather than the [tiddlyspace] thread because I'd like to see the remains of Osmosoft reply there, especialy since they are the only ones who have any insight into their plans.
From a technical standpoint, given the architecture of both TWC and TW5, it is far better to either lazy or dynamically load. Time to first byte and first active DOM is lowered and impact on the server is spread out (which is good on modern multi-core systems).
Tank has implemented this kind of loading for both versions of TW. For classic all tiddlers are loaded shortly after loading an empty tiddlywiki. Plugins are handled in an interesting way: https://github.com/cdent/tank/commit/061eecbc1397e01d1e144fef036ce79a14709f47#diff-804ba29210c7dac21e551ef2a756b25d
As I say in that commit, the same model might work for TW5, but for the time being it is not implemented.
tw5 has sufficient smarts and flexibility and tools to take really good advantage of tiddlyweb (especially when tiddlywebplugins.cors is available. So it is really just a matter of someone doing it.
Unfortunately there are forces working against any of the usual suspects doing the work:
Thanks @cdent
There's a tw5 feature freeze at the moment (a good idea I reckon, is it still happening?).
Yup, I'm currently planning to maintain the moratorium until the end of January.
By the way, @osmosoft replied to @tobibeer's questions via Twitter:
Openness gone then? /me sighs.
Anyway, I wanted to add on to this that @azrael808 has been doing some explorations of plain tiddlyweb + tiddlywiki5 so might want to be involved in this thread.
Some of the things we've discovered or covered while talking in the tiddlyweb IRC channel are:
/status
). It uses this information to figure out the recipe it will use in subsequent web requests. For someone with a plain tiddlyweb, and a freshly built tw5 (with the tiddlyweb edition), there needs to be some way to set the recipe.Longer term it seems the main issues will be:
Anyway, I wanted to add on to this that @azrael808 has been doing some explorations of plain tiddlyweb + tiddlywiki5 so might want to be involved in this thread.
Excellent, I know @azrael808.
How to deal with loading plugins effectively.
I'm thinking that the boot kernel of TW5 could optionally read some tiddlers asynchronously before unpacking plugins. So we'd need a way to read the plugin tiddlers as fat JSON, which presumably we can do via filters?
How to manage policies on and creation of bags and recipes.
I'm thinking that bag and recipe maintenance would be best done in SPAs, at least for the moment. Hopefully TW5 itself should just respect the recipes it's told to use, and otherwise be pretty agnostic.
I have been searching for the past few days for a way to put TW5 onto a Raspberry Pi and this thread seems to be the fulcrum. I was looking for a simple TW5 'save to server' but that is handled through TiddlyWeb which leads to this thread discussion. I have checked out TANK and I really like what Chris has done. I will follow this rabbit hole over to @azrael808 to see how that is going.
I understand why this is more complicated than just a simple 'save to web' feature. If anyone has an easy way to set up TW5 on a RasPi to serve the TW5.HTML content and save the data back to the RasPi Server please let me know.
Thanks everyone.
Hi @RichShumaker
If anyone has an easy way to set up TW5 on a RasPi to serve the TW5.HTML content and save the data back to the RasPi Server please let me know.
If you want to save the entire standalone TW HTML file then it may be worth looking at the PHP backend:
http://tiddlywiki.com/#Saving%20on%20a%20PHP%20Server
It's quite old code, dating back to TiddlyWiki Classic, and it's not at all secure, but with those caveats it should get you up and running quickly.
I will follow this rabbit hole over to @azrael808 to see how that is going.
Apologies, @azrael808 I'm very overdue to respond to your ticket, I'm afraid it got caught in my Christmas backlog.
Found an old thread from April 2014 on the TW Google Groups in regards to BidiX PHP script mentioned above. It didn't work at that point and I have posted there to see if anyone has gotten it to work. I have switched Gears for now and I am up and running with Node.js on the Raspberry Pi with TW. It seems that simple server side saves of HTML files will require some code I can not create at this time. I was hoping that BidiX php script would work as that gets someone up and running in under 20 minutes. I spent 3 hours today getting Node.js on the RasPi. Mostly waiting time but still that is a huge time difference. I also don't see a huge gain in Node.js yet. I think I will soon as I found RasPi Camera Node.js stuff that I might be able to integrate and then we would have TW with RasPi camera's. I am still hopeful to get TiddlyWeb on the RasPi once it can work with TW5 files.
@RichShumaker, when writing this not too long ago (as I just started in december)...
http://tb5.tiddlyspot.com/#Your%20own%20TiddlySpot-like%20upload%20server
...I tested it and it worked for me. Maybe you need to set some access rights for store.php so that it is allowed to perform the save operation (to subfolders)?
It works!!! I set the permissions for the folder to 777 even though that is probably overkill and everything saved just right. I am adding a note to the other thread I read so the next person who finds that thread will know.
Image didn't come through as I forgot I was on an email response. Here is an image of the page for set up in case anyone has a question about the details needed. The part that confused me early on was the backups autofill in with TiddlySpot. Should that be a github issue?
So at this point I can never hang out with Tobias as I own him a keg of beer(if he drinks beer) for all his help. Thanks again Tobias.
Rich Shumaker
On Thu, Jan 8, 2015 at 12:55 AM, Tobias Beer notifications@github.com wrote:
@RichShumaker https://github.com/RichShumaker, when writing this not too long ago (as I just started in december)...
http://tb5.tiddlyspot.com/#Your%20own%20TiddlySpot-like%20upload%20server
...I tested it and it worked for me. Maybe you need to set some access rights for store.php so that it is allowed to perform the save operation (to subfolders)?
— Reply to this email directly or view it on GitHub https://github.com/Jermolene/TiddlyWiki5/issues/1194#issuecomment-69151897 .
Daniel Baird confirmed in the groups that 744
would probably be an ok setting for that script.
Added info here...
http://tb5.tiddlyspot.com/#Your%20own%20TiddlySpot-like%20upload%20server
It works!!! I set the permissions for the folder to 777 even though that is probably overkill and everything saved just right.
Please do not suggest to set unix permissions for PHP scripts to 777 ... its extremely dangerous!
I have set them to 744 and it all works fine. I won't suggest 3 7's anymore I promise Mario, and I understand the danger. Part of this will be used by kids and I am interested in the 'issues' or 'hacks' that can occur. Currently I have the store.php one level higher than I have the TiddlyWiki's and I need to remember how to set that as the starting point for the browser to obscure it more(not necessary now as it is me on a home network). So has anyone hacked this set up and what are the vulnerabilities with Tiddly/Web and store.php?
Thanks again everyone for your help and warning.
Rich Shumaker
Hello there. Now that TiddlySpace is going to be discontinued by the end of 2016. Will there be a new showcase or hosted and usable implementation of "TiddlyWiki 5 in the Sky for TiddlyWeb"? Thanks a lot in advance for answering this question from a "casual user"...
TS is gone. may be can be closed?
unfortunately so, I guess the answer is: yes
Even though tiddlyspace is dead, tiddlyweb is not and it would still be useful to clean up how tw5 and tiddlyweb interact. Not sure if this is the right issue for it, but wanted to be clear that tiddlyweb lives on.
(How) does that work right now, exactly, in terms of...