Question on NoteSelf for TWederation

97 views
Skip to first unread message

Mat

unread,
Aug 23, 2016, 6:05:39 AM8/23/16
to TiddlyWiki, Jed Carty, Danielo Rodríguez, Jeremy Ruston
@Danielo (...obviously)  - I don't want to hijack your other threads so posting separately;


I'm thinking about possibilities to comment other peoples TWs, and wondering if this idea based on NoteSelf would be possible;

Because the data is stored in MY own local browser... what is it about the TW that I surf TO that has to be set up in a special way? Is there some way to have the "NoteSelf mechanism" apply only on my side, without that other TW having to be set up in a special way? So that I visit a tw and add a tiddler there and this is (a) stored in my local browser and (b) if I click save, it is uploaded to my cloud couch? Maybe the "(a)" is possible but not the "(b)" because the save button is what has to be special to upload things?

...but then what if all TWs did have a default couch uploadmechanism, just like they already do for an arbitrary tiddlyspot, But for an arbitrary couch storage that I as a visitor can specify.

If they did, like your NoteSelf demo, I'm thinking that the following workflow for commenting should be possible:

I visit a TW, e.g yours, and want to comment on a tiddler that I see. I add a new tiddler on your tw... and (somehow) upload this to my own cloud. ...Hm, is that uploading of the tiiddler or the whole tw or something else? It would be ideal if it is only the tiddler and it somehow is merged into some specific TW of mine in the cloud.

Then IF you are "following" me, you can fetch tiddlers from my could based TW (like is already possible in TWederation)


Thoughts?


<:-)

Danielo Rodríguez

unread,
Aug 24, 2016, 7:14:07 PM8/24/16
to TiddlyWiki, inmy...@gmail.com, rdan...@gmail.com, jeremy...@gmail.com
Mat,

I would love to try to help you with this.
I have read your post, and I mostly understood it, but I'm too tired to provide an eloquent answer. I'll try it out tomorrow.

Meanwhile, could you please clarify the only part that stills a bit unclear to me?

Because the data is stored in MY own local browser... what is it about the TW that I surf TO that has to be set up in a special way? Is there some way to have the "NoteSelf mechanism" apply only on my side, without that other TW having to be set up in a special way? So that I visit a tw and add a tiddler there and this is (a) stored in my local browser and (b) if I click save, it is uploaded to my cloud couch? Maybe the "(a)" is possible but not the "(b)" because the save button is what has to be special to upload things?

I feel that this sentence starts with some background or context that I don't have. Where are you surfing TO? From where? What you are describing sounds like an RSS stream to me. Could you please expand a bit?

Regards

Mark S.

unread,
Aug 24, 2016, 9:58:28 PM8/24/16
to TiddlyWiki, inmy...@gmail.com, rdan...@gmail.com, jeremy...@gmail.com
Hi Mat,

I don't think the current technique of "fetching" content from stand-alone Wikis will work. This is because the Wikis using PouchDb are "hollow" -- they have no content. The content is in a separate database, either in a browser (which isn't accessible to the outside world) or in a CouchDb database. So the only way to post content would be to export/save the tiddlers outside of the Couched TW and then import them into a standalone Twederation TW. This would be a lot of hassle.

However, looking at Cloudant's documentation, they seem to be saying that it's possible to give world-readable rights to the database. This leaves open the possibility that a different pull mechanism, that pulled directly from a Couch database might be possible. I think it would require writing a plugin that combined features from both Jed's Twederation plugin and from Danielo's PouchDb plugin. I suppose that there would also be a new TwCard type that indicated what kind of TW was being fetched from and the address information for the database.

Mark

Mat

unread,
Aug 25, 2016, 3:44:57 AM8/25/16
to TiddlyWiki, inmy...@gmail.com, rdan...@gmail.com, jeremy...@gmail.com
Danielo, thanks for reply! Here is a rephrase of the question.

Part1 (the NoteSelf/couch part)
Is this possible:
You (Danielo) has a TW that is set up like NoteSelfs demo.
I visit your TW and I create a new tiddler there (in MY browser but in your TW).
I also add some info about my cloudant db.
This new tiddler is now synched up to my cloudant. 

Is this possible?

Part 2 (the TWederation part - whcih assumes part1 is possible)
Now you (Danielo) wants to see if I have commented on your tiddlers.
It so happens that your TW and mine (i.e Mat's cloudant TW) both have instealled the TWederation plugin...
...and you know the url of my (Mat's) cloudant TW.
You use "TWederation technology" to fetch the comments from my TW. 
Briefly (FYI) the TWederation mechanism works like so: 
When you fetch tiddlers, in reality your TW creates a temporary iframe that loads my whole(!) TW. 
Your TW then sends, into this iframe, a js postMessage with a filter about which tiddlers you're interested in.
The iframed TW bundles these tiddlers and sends them to your TW. 
The bundling can be made to modify the bundled tiddlers, e.g remove script tags or add some field to all bundled tiddlers etc.
The user (you) sees the bundle and get to manually confirm to unbundle the tiddlers...
...so you see the comment I made previously.

So the first question is if part1 + part2 would work?


Part 3 - might even this work in theory?
Fellow Mark S is using a regular TW (that also has the TWederation plugins)
Danielo visits this TW and creates a new tiddler/comment... but/and Danielos browser has something so this new tiddler is stored in Danielos own browser OR directly uploaded/synched with Danielos cloudant TW.

Part4
...same as Part2. Mark fetches Danielos comment.

So what I'm wondering in Part3+Part4 is why Marks TW must contain the special couch mechanism when it is in Danielos browser, or rather; Daniels browsers local database, that the new comment is stored (...and then uploaded/synched).

<:-)

Mat

unread,
Aug 25, 2016, 3:57:29 AM8/25/16
to TiddlyWiki
Mark,

Yes, as detailed in my reply to Danielo, I am referring to fetching stuff from someone elses cloud-hosted Couch DB. 

However, looking at Cloudant's documentation, they seem to be saying that it's possible to give world-readable rights to the database.

The thing is; if you can visit e.g Danielos cloudant TW... then you can just as well load it into an iframe in your own TW, right?

Or is everything lazy loaded /skinny when fetching from a cloudant TW? But it can't be because e.g the regular TW core plugins must have their content or the whole thing will of course not work. Which means one should be able to specify in the postmssage that "at least tiddlers A and B should also be loaded as fat". This would be superior; loading the whole TW into the iframe but with only the necessary and requested tiddlers being fat, the rest skinny.

<:-)
Reply all
Reply to author
Forward
0 new messages