Bob - Anti-conflict, Data NOT Lost

119 views
Skip to first unread message

Kevin Kleinfelter

unread,
Sep 18, 2019, 7:57:04 AM9/18/19
to TiddlyWiki
I'm seeing weird behavior with Bob on a corporate network.  I don't think Bob is at fault. I'd sure appreciate any suggestions based on knowledge of how Bob works.

  • From my laptop on the corporate network (which uses a proxy server and the proxy is aggressive about preventing access to 'dangerous' sites), I add a tiddler named 'deleteme'.
  • From my server, I see 'deleteme' get created in the data directory in less than a second.  (Hooray!)
  • On the company laptop, 'deleteme' does not show up in the 'Recent' list of Tiddlers.  If I do a page refresh, it appears that data has been lost.
  • I wait 5 minutes.  Still 'deleteme' is not listed.  Page refresh does not reveal 'deleteme'.
  • From another laptop, which is not on the company network, I do a Bob 'reconnect'.
  • Instantly, 'deleteme' spontaneously appears on  the company laptop.
This happens only for the first tiddler of the day.  After that, new tiddlers show up immediately after they are added.  I can close the browser and restart the browser and I still have immediate tiddler availability.

I suspect the corporate proxy is involved because I don't observe this behavior from laptops outside the WAN.  The puzzler is "How does connecting from a browser *outside* the WAN clear up the session of a browser *inside* the WAN?"  

Jed Carty

unread,
Sep 18, 2019, 8:55:51 AM9/18/19
to TiddlyWiki
I suspect that differences with how inbound vs outbound connections are made may be responsible. I have run into similar things with other projects where there are seemingly random restrictions on which direction connections can be made in.

In my experience NAT, particularly in corporate networks, is always a huge pain. It may be the browser inside the NAT isn't allowed to make the connection to outside the network by itself, but when the external server tries to update it has a connection in both directions and can punch a hole in the NAT.

I am not sure that actually works, but it is my suspicion.

I should see about adding a feature to the server that if it doesn't hear an incoming web socket connection from a connection that has made a GET request after a second or two it will try to initiate the web socket connection on the server side.

Kevin Kleinfelter

unread,
Sep 19, 2019, 9:14:12 AM9/19/19
to tiddl...@googlegroups.com
Hmmm... Curiouser and curiouser.  Today's behavior is:
  • Loaded TW in Firefox (behind the corp proxy).
  • Created 'deleteme' tiddler.
  • Loaded TW in Chrome (behind the corp proxy).
  • 'deleteme' showed up in both browsers
It *appears* that the second attempt to load, which clears the issue on the first browser, can be from either inside or outside the firewall.

Testing this is going to be very slow, because I only get one test per day before the behavior goes away.

You spoke of adding a feature to have the server launch a connection.   If you're going to add a feature, the #1 feature I'd like to see is an indicator as to whether there are un-saved changes in the queue.  I can live with weirdness in getting to *see* my new content.  If I have to open a second browser once in the morning, I can do that.

The number 1 thing I can't abide is not saving data accurately.  It appears like Bob saves the data, but the fact that the 'Recent' tab doesn't show the new tiddler scares the daylights out of me and it makes it hard for me to be confident that the data really was saved.  An indicator that all data is confirmed saved would increase my confidence.  The Dynalist user interface is a good example of this.  They have a 'Synced' indicator in the upper-right corner which almost always says 'Synced'.  It *briefly* says something else for about 0.5 seconds after I update a line.  (It is so brief that I haven't actually read it.)

In general, Bob works better over the proxy-constrained access than plain TW.  The whole reconnected-here-are-conflicts is good.  It might be nice to offer an option to show the conflicts tiddler only if there are conflicts.  If I click the red offline button and the red button goes away, that shows I'm reconnected.  I only care about conflicts when there *are* conflicts.   I see that red button several times a day because of my slow proxy.  

Or maybe just offer an option to silently reconnect, and have Bob re-try every few minutes?  Again, using Dynalist as an example, I don't actually have to think about reconnecting and syncing.  It all happens pretty much on its own.  I just glance up at the Synced indicator.  It might show 'Offline' if I'm between WiFi hotspots, but once I reconnect, it just syncs and changes the indicator to 'Synced' unless there was a conflict.  I don't even think about connectivity with regards to Dynalist any more.

Kevin Kleinfelter

unread,
Sep 26, 2019, 8:17:05 AM9/26/19
to TiddlyWiki
This fails to save the tiddler:
  • Load TW from inside the corp firewall.
  • Add tiddler
  • Wait 5 minutes
  • Close the tab
This saves the tiddler and displays it in all browser tabs immediately:
  • Load TW from inside the corp firewall
  • Add tiddler
  • Load TW from outside the corp firewall
This too saves the tiddler and displays it in all browser tabs immediately:
  • Load TW from outside the corp firewall
  • Load TW from inside the corp firewall
  • Add tiddler
This too saves the tiddler and displays it in all browser tabs immediately:
  • Load TW from inside the corp firewall
  • Load TW from inside the corp firewall in a different browser
  • Add tiddler

For whatever reason, I seem to have to load a 2nd client of the wiki in order to successfully save.  So long as I *remember* to do that, I'm OK.

Kevin Kleinfelter

unread,
Sep 29, 2019, 2:18:14 PM9/29/19
to TiddlyWiki
Since the silent failure to save updates looks like it only happens on the initial connect, perhaps it would be simple to 'just' invoke the existing "WARNING: You are no longer connected to the server" if the initial websocket connect times out?

(My wife says that 'just' means, "I'm going to say this without actually thinking about the details.)

Jed Carty

unread,
Sep 30, 2019, 5:17:10 AM9/30/19
to TiddlyWiki
I can try to set that up. The disconnected message and reconnection attempts were made for a very specific situation when my router was dying and my laptop kept getting disconnected from Bob running on my home server. I haven't much time or opportunity to test and improve it in other situations.
Reply all
Reply to author
Forward
0 new messages