ssbc / patchbay

An alternative Secure Scuttlebutt client interface that is fully compatible with Patchwork
http://www.scuttlebutt.nz
388 stars 78 forks source link

Enhancement: Responsive UI while creating indexes #370

Open rhz opened 4 years ago

rhz commented 4 years ago

I just opened patchbay after a year of not using it and the UI has been quite unresponsive (although not completely) for several hours. It would be great if there was some sort of progress bar or something that informs the user that heavy processing is taking place and perhaps how long it will approximately take. It would be even better if the UI was responsive while creating the indexes and all that.

Should I have pressed the initial sync button in ahoy? Since I did the initial sync about 2 years ago, I thought I should press the other button.

I'm getting the following two types of errors in the console.

server error, from net:::ffff:127.0.0.1:34932~shs:
Error: stream ended with:64 but wanted:112
    at drain (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/pull-reader/index.js:43:26)
    at /tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/pull-reader/index.js:63:18
    at /tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/pull-reader/index.js:20:7
    at drain (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/stream-to-pull-stream/index.js:126:18)
    at Socket.<anonymous> (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/stream-to-pull-stream/index.js:143:5)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

and

Error replicating with @tXroIBgvpO//CNS4od08GiPHQJQ7fX4ZxDQasuKIeww=.ed25519:
   Error: parent stream is closing
    at PacketStream.stream (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/packet-stream/index.js:46:28)
    at Object.ws.remoteCall (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/muxrpc/stream.js:116:17)
    at /tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/muxrpc/index.js:46:15
    at remoteCall (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/muxrpc/api.js:40:19)
    at EventEmitter.obj.(anonymous function) [as createHistoryStream] (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-server/node_modules/muxrpc/api.js:25:18)
    at replicate (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-replicate/legacy.js:291:13)
    at EventEmitter.fallback (/tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-replicate/legacy.js:351:7)
    at Object.onceWrapper (events.js:273:13)
    at EventEmitter.emit (events.js:182:13)
    at /tmp/.mount_patchbhQXx7k/resources/app.asar/node_modules/ssb-ebt/index.js:129:15

However, the former is much more frequent than the latter. In fact, the latter has only happened once so far.

Maybe this is related to #343? I'm using archlinux and the last version of patchbay which I downloaded today (patchbay-Linux-8.1.0-x86_64.AppImage from releases).

Thanks for the great work on patchbay :)

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

rhz commented 4 years ago

I think it is still relevant. I'd have to check again to see if it is working now. I'm not sure what is blocking it. It would be great to hear from the devs :)

mixmix commented 4 years ago

hey @rhz , I've been on parental leave and focusing my energies on building Ahau. I've seen some of those Errors as well, and not sure where they are coming from. The second one is safe (I'm fairly sure), that first one is a localhost connection ...

  1. Are you using just patchbay or are you opening another client at the same time.

In terms of the interface not being functional which replicating, that's a completely different issue, and a hard one to solve easily. Yes that initial sync button probably would have served you well to catch up on 6 months of gossip. But opening the main UI and leaving it for a while should be fine. Sorry it's just not well designed for people being away for months.

rhz commented 4 years ago

Hey @mixmix! Didn't know you're on parental leave! <3 Lots of love to you and your family.

At the time I was just using patchbay, no other client. Recently I started looking for alternatives. I found patchfox first and wanted to try that but ssb-server and scuttle-shell don't compile with nodejs v14. Then I found oasis and I've liked it very much. The only thing I don't know yet how to do and maybe it hasn't been implemented yet is to look at the list of friends, yours or of somebody else, and perhaps even see how many hops there are between you and people in each direction. I'll ask in the appropriate channel though, no worries. Enjoy parental leave :)

So the initial sync button is not only for the initial sync but can be used any time one has been away from the butts for a long time?

Now that I have catched up on gossip I still have the problem sometimes that whenever patchbay starts getting new gossip and indexing it, it slows down significantly and becomes partially unresponsive. This issue happens on oasis as well (pages take forever to load). So I'm guessing it is a problem related to the whole SSBC stack but I'm not sure.

Didn't know you were working on Ahau. Yesterday I read a bit about it on https://ahau.io and it seems interesting. Hope it's going well.

mixmix commented 4 years ago

So the initial sync button is not only for the initial sync but can be used any time one has been away from the butts for a long time?

Yes!

Re lagging while indexing, yes it's a common problem in js stack. I basically some queries wait until the index is up to date before replying. I think it's possible to say "just give me what you currently have" but that's not been experimented with in js, not sure how reliable or what the experience would be.

Other stacks like rust have experimented with putting manual controls on indexing, so that it only happens when there's some down time, which is super awesome. I think likely there will be a new wave of clients in the future but for now this is where we are.

Ahau.io is a little out of date. I published some more recent screenshots in #ahau channel on scuttlebutt.

rhz commented 4 years ago

Yes, I thought it could have to do with javascript. Rust sounds very cool! Looking forward to see some scuttlebutt stuff built with it.

Ahau looks amazing! Really liked the idea of having a thin public profile + a personal profile only you see + different profiles for different groups. Identity is relationship.

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

mixmix commented 3 years ago

Leave open

On Sun, 13 Dec 2020, 09:52 stale[bot], notifications@github.com wrote:

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ssbc/patchbay/issues/370#issuecomment-743856085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUK3HR54IY2NRDM3KLZW53SUPJXZANCNFSM4MHOPRPA .