@Danielo - TiddlyDrive, pouchdb...

274 views
Skip to first unread message

Mat

unread,
May 30, 2015, 9:21:18 AM5/30/15
to tiddl...@googlegroups.com
Danielo, you're really working on cool things. Unfortunately they're much "above my level" so I have some basic questions. I'll post them here instead of hijacking your other threads;

On a small scale, I'm hoping for a way to let visitors add metadata/comments without the use of a traditional dynamic server. Instead, I hope the data could be stored in e.g Google Drive or similar. I understand there are limitations on "running code" from within the Drive space.  

At the same time I like tiddlyspot, so it would be nice if the TW itself can be stored there. In other words, visitors go to X.tiddlyspot.com and add meta-data (e.g user created tags) that gets stored in my Drive and this metadata is also fetched from my drive so that one visitor can see anther visitors metadata.

On a community scale, I'm hoping for some kind of aggregation of meta data. E.g to make lists of plugins that show the collected reviews.


Do your projects touch on any of these things?
The Pouchdb, does it still require a common server to be used or would it work from Drive/Dropbox/...?
And TiddlyDrive, I notice you run it from your own domain. Is this required? Again, can a user put all necessary components directly in Drive?

Would Pouchdb be of use for TiddlyDrive?

Thank you. Again, sorry these are such total noob questions but I realized I don't understand what your edge-cutting stuff will do!


<:-)
TWaddle.tiddlyspot


Danielo Rodríguez

unread,
May 30, 2015, 10:02:19 AM5/30/15
to tiddl...@googlegroups.com
Hello Mat,

Unfortunatelly tiddlydrive does not work currenctly because google has changed (again) it's apps-script API. Fortunately, if you are interested in a similar configuration you can use the couchdb adaptor (note I wrote couch, not pouch). Tiddlydirve uses a backend, a google's one but a backed at the end. You can use any of the many free couchdb services to run a similar configuration. I recommend you cloudant, because it is easier to manage and has a big free quota. You can host your html file wherever you want, dropbox public folder, tiddlyspot, github-pages, even in your couch database as an attachment. Then you configure the adapter to point to the database of your choice and it will work as long as your couch service has CORS enlabed (cloudant has).

Regarding my own domain, it is a unexpected but welcome side effect. I have my main GitHub page with a CDOMAIN pointing to my own domain. Because of this, all my github projects pages are shown under the same domain. TiddlyDrive is one of those projects.

As you know, I have been working on the couchdb repo and it is easier than before to use it, anyway, if you need help setting up you own couch service, let me know if I can help you.

Danielo Rodríguez

unread,
May 30, 2015, 12:10:48 PM5/30/15
to tiddl...@googlegroups.com
Hello again Mat,

I don't know if I mentioned this, but I have plans to create a tiddlywiki flavor for micro blogging using couchdb. The idea is to have two wiki files, one without any edition capability (read only), and a normal TW file (full featured). The advantage of this is that you use the full featured TW to edit and create content, without worrying about how to save it without edition capabilities or to "publish" it. You just write your tiddlers, they are synchronized to the database and they are automatically available on the "published" edition. Couchdb allows you to define different levels of access, you don't have to worry about anybody using the "console" or any other method on your read only copy because they will need write access.

Mat

unread,
May 31, 2015, 5:57:49 PM5/31/15
to tiddl...@googlegroups.com
Danielo, thank you for your replies!

First, just a note: I appreciate your encouragement to use your these things but they are way to advanced for me. I'm basically so far trying to understand what they are and do. Now, if it would help you to have a guinea pig that e.g reports what obstacles a noob hits during installation or use etc, then I'd be glad to help you, but it would not make sense for me to try to set this up for actual personal use because I would depend on others even for the slightest of problems.

So, do I understand there are three main components to this:
  • the TW (hosted anywhere)
  • the database - as hosted by Cloudant. Why, BTW, do you propose a couchdb service rather than a pouchdb service - or maybe there are no pouchdb services?
  • an adaptor - that translates a TW file into the database file format... or is it perhaps that it translates tiddlers so they can be stored in the database... meaning then that we're really talking TW on node.js? - And it is the adaptor thing that you're working on, yes? 
(I think my "knowledge-level" should be obvious by now.)


As you know, I have been working on the couchdb repo and it is easier than before to use it, anyway, if you need help setting up you own couch service, let me know if I can help you.

Again, sorry for my basic questions, but what does "repo" (-sitory) mean in this context?

Thanks Danielo.

<:-)

Danielo Rodríguez

unread,
Jun 1, 2015, 3:31:58 AM6/1/15
to tiddl...@googlegroups.com


El domingo, 31 de mayo de 2015, 23:57:49 (UTC+2), Mat escribió:
Danielo, thank you for your replies!

Thank you for your interest. 
 

 Now, if it would help you to have a guinea pig

That would be nice :D
 
but it would not make sense for me to try to set this up for actual personal use because I would depend on others even for the slightest of problems.

Everyone depends on someone else at some point. My way to understand what the hell couchdb is and how it works was a very frustrating journey: everyone at everyplace talked about very advanced topics. Even the official site jumped from very basic explanation to in-deep topics. After feeling like it was too much for me I left the topic apart. Then my brain started his own adventure of gathering knowledge without my consent, and someday I felt like I should check the project again, and then I understood it. So, my advise is: don't worry if you don't understand something at a first try, that is the normal thing! just read it, and leave it in your mind like a wild animal, and someday you will be capable of hunt it.
 
And, for this particular "thing" you have someone who wants to help you with it. My plans are to create a special edition of tiddly-wiki with detailed instructions about how to do this. I would love to count with your creativity and your point of view for the project, which are points that I feel very valuable. I want to be clear that my goal is to create some kind of blogging tool based on tiddlywiki, and not a new way to share tiddlywikis. But once it is setup, it should not be hard to maintain or update, specially when you understand the "flow"


So, do I understand there are three main components to this:
  • the TW (hosted anywhere)
The tiddlywiki html file hosted anywhere with the couch adaptor plugin installed.
 
  • the database - as hosted by Cloudant. Why, BTW, do you propose a couchdb service rather than a pouchdb service - or maybe there are no pouchdb services?
Let's throw some light on this. CouchDB is a database, like Mongo or SQL can be (but very different). Cloudant is a service that allows you to have a database, they have databases as a service. PouchDB is a JS library that is aimed in having a couch-like database directly inside your browser, so it's not what we need for this purpose. It can also sync to a couch database, but we don't want this neither for this project. So what we need is just a single online database, and Cloudant gives you this for free.
  • an adaptor - that translates a TW file into the database file format... or is it perhaps that it translates tiddlers so they can be stored in the database... meaning then that we're really talking TW on node.js? - And it is the adaptor thing that you're working on, yes? 
The adaptor is the responsible of talking with the database. It can load tiddlers and save tiddlers from the database. The adaptor is the core of the plugin, and it works in any tiddlywiki.

TW_File --- save tiddler ---> adaptor ---> couchDB
TW_File <---loadTiddler----- adaptor <---- couchDB
 

Again, sorry for my basic questions, but what does "repo" (-sitory) mean in this context?

Ask as many questions as you want. On this context the repo means where the code of the plugin is published. The needed tools and the instructions for installing it are there.

I hope this is more clear by now. If not, don't hesitate to ask! You are able to understand whatever you want.

Regards

RichardWilliamSmith

unread,
Jun 1, 2015, 5:44:05 AM6/1/15
to tiddl...@googlegroups.com
Hi Danielo,

I hope I'm getting this right - the point of using a database to store the tiddlers is to be able to keep multiple devices/instances in sync. and you can also have different tiddlywiki 'views' onto the store - ie; one for editing and one that's a 'live' webpage, for example.

And, although you suggest cloudant, the couch db could be anywhere, right? On an AWS instance or on my own hardware.

I'd certainly be interested in helping you test it, if that would be useful.

Does it perform 'lazy loading' from the database? (I understand this to mean that it would only fetch tiddlers that it actually needs for the current view)

It seems it should be possible to publish material to different blogs, from a central database by adding tags etc. do you see that happening?

Regards,
Richard

Danielo Rodríguez

unread,
Jun 1, 2015, 9:40:37 AM6/1/15
to tiddl...@googlegroups.com
Hello Richard,


El lunes, 1 de junio de 2015, 11:44:05 (UTC+2), RichardWilliamSmith escribió:
Hi Danielo,

I hope I'm getting this right - the point of using a database to store the tiddlers is to be able to keep multiple devices/instances in sync.

That applies more to my PouchDB plugin rather than the couchdb one, but yes, that is correct.
 
and you can also have different tiddlywiki 'views' onto the store - ie; one for editing and one that's a 'live' webpage, for example.

Correct. CouchDB has different access levels that allows us to do this.
 

And, although you suggest cloudant, the couch db could be anywhere, right? On an AWS instance or on my own hardware.

Absolutely. It is an open source project.
 

I'd certainly be interested in helping you test it, if that would be useful.

Yes, it is. In which scenario are you interested the most?
 

Does it perform 'lazy loading' from the database? (I understand this to mean that it would only fetch tiddlers that it actually needs for the current view)

Exactly.
 

It seems it should be possible to publish material to different blogs, from a central database by adding tags etc. do you see that happening?

That is a bit more complex configuration if you compare with the basic one, but it is certainly easy. The best way to do this would be to have a central DB and a separate DB per "blog/page". Then we can sync to each DB from the central one those tiddlers that matches a criteria. CouchDB allows us to define filtered replication, so we can make the filter as complex or simple as we want. Don't get scared about having multiple DBs, in couchdb a DB is like a table in SQL. In fact having a DB per user in other applications is very common.

If you are interested in trying the basic setup, take a look at this repo


Let me know if you need help making it work. For those interested this is being discussed also in this thread:

Mat

unread,
Jun 1, 2015, 7:27:02 PM6/1/15
to tiddl...@googlegroups.com
@Danielo - thanks again for your kind replies! My hesitation to learn is not really about being afraid of it. It is more a matter of "picking my fights". I have a zillion TW ideas (not to mention outside of TW) and this makes me think twice before engaging in things I barely understand because it means I don't have time for the things that I do understand and hope to create. But, admittedly, I've come to a point in my life when I find myself sometimes concluding that "Ok, this is just not my area... but kick a$$ in another" and that's how it is even if our parents told us we can become anything. 

However, you create really cool stuff and if my virgin mind is of actual use to help your development then what do I do to start? I have signed up for a Cloudant account. Is the next step to [try to] follow the instructions given in your couchadaptor git repo?

 
And, for this particular "thing" you have someone who wants to help you with it. My plans are to create a special edition of tiddly-wiki with detailed instructions about how to do this. I would love to count with your creativity and your point of view for the project, which are points that I feel very valuable. I want to be clear that my goal is to create some kind of blogging tool based on tiddlywiki, and not a new way to share tiddlywikis. But once it is setup, it should not be hard to maintain or update, specially when you understand the "flow"

I like what I hear and after your explanations I understand the concept better.


Ok. Now night. Tomorrow I will present a cool new thing to everyone!


<:-)
TWaddle.tiddlyspot

Danielo Rodríguez

unread,
Jun 2, 2015, 3:07:29 AM6/2/15
to tiddl...@googlegroups.com


El martes, 2 de junio de 2015, 1:27:02 (UTC+2), Mat escribió:
@Danielo - thanks again for your kind replies! My hesitation to learn is not really about being afraid of it. It is more a matter of "picking my fights". I have a zillion TW ideas (not to mention outside of TW) and this makes me think twice before engaging in things I barely understand because it means I don't have time for the things that I do understand and hope to create.

Yes, focusing on what we know how to do is sometimes better than trying to do new things. And usually you will be more productive.
 
However, you create really cool stuff and if my virgin mind is of actual use to help your development then what do I do to start? I have signed up for a Cloudant account. Is the next step to [try to] follow the instructions given in your couchadaptor git repo?

Yes, your mind will be of great help. And yes, the next step is to follow the instructions given in the couchadaptor repo. Please, let me know if you have ANY doubt.
 

Ok. Now night. Tomorrow I will present a cool new thing to everyone!

Wow! I really want to see it! 
Reply all
Reply to author
Forward
0 new messages