Distributed SWISH

Many thanks @jan for making SWISH distributed, it is an excellent feature!
Can you add a few lines to the README in the swish repo explaining how to run swish in a dsitributed way?
Many thanks

Thanks. Although it is running, there are still some issues that need to be ironed out. After that I’ll add some documentation. Running the distributed SWISH is harder than the single node though :frowning:

See swish/doc/PublicInstall.md at aa23d0ba666e0116a949830a85b90e05f2099c81 · SWI-Prolog/swish · GitHub

As we all know, running and maintaining robust distributed services that need to maintain state and (file) data is not easy. The above outlines what is involved. There are still many options depending on preferences and anticipated scale. It is no wonder that many such systems are open source and the company makes money by selling SaaS …

Contact me when you are interested in a SaaS option!

Thanks @jan very useful :pray:

Updated SWISH to fix a race condition in object (file) replication. This could cause a node to stop receiving broadcast messages and failure to show files that were saved on another node.

Please share issues you may find. Please indicate the time (and timezone) if you find issues. Notably poor performance or failures to share data (you saved, you can’t open the document from another machine).

Is it really blockchain-based? I wasn’t able to confirm this easily. Could you share a link?

A status update …

For those running SWISH instances, I’ve been doing quite a bit of work to make the distributed deployment of SWISH stable. I think it has now reached a stage where hiccups in performances are rare and the Redis database that makes the cluster members communicate no longer keep growing. If you still experience problems, please report.

If there is a CSS wizard listening (@jamesnvc ?), the file search table does not scroll. You see this table by opening a new tab and specify something in the search box that gives enough results. Notably on a small screen (tablet), the search footer tends to fall of the page. The top level dict of the tab has overflow-y: auto;, but somehow this does not work and I fail to find why not. If you want to help, the browser development tools should be enough to find what is going on. If I know what CSS to add to which element it should be fixed quickly :slight_smile: Thanks!

1 Like

I’m able to make it scroll properly by putting overflow-y: auto or scroll on the <div> with the class tab-content, but that makes the whole thing scroll. I will try to see if I can come up with a reasonable solution to just make the table scroll…

1 Like

Something that appears to work, but I don’t love the guessed height at one point is this:

On div.sourcelist:

display: grid;
grid-template-rows: min-content 1fr min-content;
overflow: hidden;
height: 60vh; /* would prefer to have this not be necessary... */

on div.search-results:

overflow: scroll;

That makes just the table scroll and keeps the footer on screen.

Thanks. Not really sure what to do with it. Changing tab-content is not desirable as it is the permanent element that changes content when switching between functions. Looking through the .css files to adopt these changes, I saw an old comment with some trickery to make the editor scrollable, It seems that the scrolling gets lost because the tab content is a flex box. The way to get it back is to make tabbed-select positioned absolute with top/bottom/left/right all set to 0. I applied that and now it indeed scrolls the whole tab, as with the overflow on the tab-content.

I tried the above. It improves things on a specific viewport height range, but doesn’t help if the viewport gets too low and moves the footer too far down if the viewport is too high. Something like that should be possible …

Anyway, it is now usable. Not yet public. Will be updated with next maintenance update.

1 Like

Thanks again @jan Sooner or later I will make cplint on swish distributed, so what you’ve done is very useful :+1: