Tw server: multi user and files updates

I am running tw as a nod server. In my setup, I’d like to have one window/tab with the code and an other with the data (user point of view if you want).

My problem is that there is no update from the one to the other or not every time. Mostly, the only way to know that something has changed is to look on the filesystem and reload stuff from here. But I have been told this was rot an automatic feature, and this may explain why sometimes it does and sometimes it doesn’t. What is sure is that’s it’s not a friendly way of doing. This loads to much oddities!

Any hope to get a proper mechanism?

Try the bob implementation which I have used when knowingly opening the same wiki in multiple tabs or browsers. Bob.exe is very easy to install and use.

The current node.js tw server lets the clients “poll” for updates, but the polling-period is 1 minute (https://tiddlywiki.com/#Hidden%20Setting%3A%20Sync%20Polling%20Interval). You could set that very low (5 seconds or so), and then reset it when you are done… leaving it low would burn lots of resources as you would be sendging an http request every 5 seconds, and most of the responses would be empty.

See my new thread on realtime multi-user multi-wiki syncing for an, admitted, teaser. But this functionality is coming soon. :slight_smile:

1 Like

In the meantime I begun experimenting with bob. first bobexe linux, which did the required things but my goal is for a pure node version. I’ve been able to make this work too, but not on docker yet. That I would see tomorrow but that’s essentially a docker problem.

What I found out is that import or saving of tiddlers is very slow with bob. I can see the difference with regular server on my old machine! For single tiddlers, it’s not a great nuisance, and for big buckets of tiddlers, it’s only once or infrequent. But why is that so slow?

@joshuafontany I tested polling with regular tw server v5.1.23

as I, the tiddler is never updated

If I set $:/config/SyncPollingInterval to 3000, there is still never any (automatic) update.

what’s wrong?

Bob is pure node, it is just a plugin. bobexe is just Tiddlywiki wrapped packaged by nexe so people don’t have to worry about installing node.

It is slow because I switched to using the core implementation of the syncer and the two don’t play well together when Bob wants to send messages quickly. For the past year or so my day job has been taking up all my time so I haven’t had a chance to fix the problems.

@inmysocks thank you for your answer. And happy to see you posting here!