More playing around with TiddlyWiki on node.js: the makings of a distributed database

64 views
Skip to first unread message

Charlie Veniot

unread,
Sep 4, 2021, 4:53:52 PMSep 4
to TiddlyWiki
Say I have two sales reps, each with his/her own private TiddlyWiki on node.js.

Neither sales rep has access of any kind to the other sales rep's TiddlyWiki.

However, each sales rep does have view access to one tiddler from the other sales rep's TiddlyWiki: other sales rep's list of customers.

When a sales rep saves a new customer tiddler, the save process updates (behind the scenes and upon any new/edit/delete of a customer) that sales rep's customer list tiddler (say "Sales Rep 1 Customer List"), a view-only json data tiddler, with each index being kind of like a comma-separated-value record for a customer.

The other sales rep (say Sales Rep 2) has a file in the tiddlers folder that is a symlink to the "Sales Rep 1 Customer List."  So that sales rep has his/her own view-only "Sales Rep 2 Customer List" that gets updated (automatically and behind the scenes) upon new/edit/delete of customer tiddlers, and also has view access to "Sales Rep 2 Customer List".

So each sales rep has access to their own customer tiddlers, but also has access to his/her own customer list + the other sales rep's customer list, which can then be merged into a consolidated customer list.

Essentially, each private TiddlyWiki on node.js, hosts CSV-like json data tiddlers, and those data tiddlers are made shareable via symlinks, and all of the data tiddlers become components of a distributed database for querying/reporting/whatever.

Just throwing that out there in case anybody else geeks out on, as much as I do, this kind of architectural experimentation.

Charlie Veniot

unread,
Sep 4, 2021, 5:07:55 PMSep 4
to TiddlyWiki
Oops, errata:

The other sales rep (say Sales Rep 2) has a file in the tiddlers folder that is a symlink to the "Sales Rep 1 Customer List."  So that sales rep has his/her own view-only "Sales Rep 2 Customer List" that gets updated (automatically and behind the scenes) upon new/edit/delete of customer tiddlers, and also has view access to "Sales Rep 1 (not 2) Customer List".

TW Tones

unread,
Sep 6, 2021, 12:11:27 AMSep 6
to TiddlyWiki
Charlie,

Have you considered creating a third node Wiki "Customer List", using bob so more than one user can access it at a time?

Then both Sales Reps wikis can have this  "Customer List" in a tiddler with and an iframe to the customer list and freely drag "customer" tiddlers to and from the customer list. If you provision, "add new customers" only in the customer list, then it will always be used for new customers and remain the primary "source of truth". From which all sales reps obtain the customer details.

Regards
Tones

Charlie Veniot

unread,
Sep 6, 2021, 1:42:25 AMSep 6
to TiddlyWiki
G'day Tones,

Nah, in this scenario I've dreamed up (to really get to know TiddlyWiki on node.js), I'm sticking to a minimalist approach and not adding any plugins or extras, pushing as far as I can with just TiddlyWiki and a little bit of help via symlinks.

In this scenario, each sales rep has access to just his/her TiddlyWiki, private yet having shareable bits.  Distributed data, with clear ownership of data (of customer files).

Each sales rep deals with only one TiddlyWiki, and no futzing about with drag and drop of tiddlers from one wiki to another.

No multi-user TiddlyWikis, no sharing of tiddlers except for view-only tiddlers that have lists of customers.

Ultimately, users will have no clue they are using TiddlyWiki.  It will feel and look just like any database application.

At the moment, still looks like TiddlyWiki as I iron out the overall architecture first.  It is looking pretty cool so far.  

So far includes (short list):
  • Architecture/Framework/System TiddlyWiki
    • Including edited Tiddler "Save" and "Delete" to do extra actions upon save and delete of tiddlers tagged customer
    • Tiddler Locking mechanism to prevent editing/deletion of tiddlers from this TiddlyWiki
  • "Big DB" TiddlyWiki
    • This TiddlyWiki has nothing but symlinks to each of the customer list JSON tiddlers for each SalesRep TiddlyWiki
    • By including this TiddlyWiki, each of the Sales Rep TiddlyWikis gets the aggregated list of all customers from all sales reps
  • Individual Sales Rep TiddlyWikis
    • These include the first two TiddlyWikis
    • Every time a new customer gets added/edited/deleted or loses the "customer" tag, that sales rep's customer list JSON gets updated
Yeah, pretty cool setup for a shoe-string budget scenario.

All happily running on my Chromebook.  Gets my geek mojo going something silly.

TW Tones

unread,
Sep 6, 2021, 1:46:03 AMSep 6
to TiddlyWiki
Thanks for sharing your solution to the community.

Charlie Veniot

unread,
Sep 6, 2021, 1:58:07 AMSep 6
to TiddlyWiki
Well, throwing out the general concepts for now.  The full guacamole isn't really mine to share at the moment.
Reply all
Reply to author
Forward
0 new messages