Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get room attendance list as single message #277

Open
galfert opened this issue Sep 3, 2020 · 6 comments
Open

Get room attendance list as single message #277

galfert opened this issue Sep 3, 2020 · 6 comments

Comments

@galfert
Copy link
Contributor

galfert commented Sep 3, 2020

When asking for an attendance list of a room (via observe), Sockethub used to respond with a single message containing all the users of that room.

I think with introduction of the user roles this changed, Sockethub now sends separate messages for every single user. For rooms with a large number of users, this can have a significant performance impact for the client that has to process all those messages.

Is there any reason that prevents us from changing the behavior back to sending a single message?

@silverbucket
Copy link
Member

@galfert this was something that @gregkare and I worked on explicity last year, converting each attendance entry to an object, rather than a lot string of usernames. I can't remember everything we discussed at the time but it seemed like the right thing to do there - and the old way had issues as well (i believe you might have said something about not getting detailed information about any of the users, but I can't remember exactly.

Anyone else remember any other details about this?

@silverbucket silverbucket added this to Pending in Release: 3.2 Sep 8, 2020
@silverbucket silverbucket moved this from Pending to Possible in Release: 3.2 Sep 8, 2020
@galfert
Copy link
Contributor Author

galfert commented Sep 8, 2020

Yes, that is correct. But couldn't we just have a list of (detailed) user objects in a single message instead of strings with just the username?

@silverbucket
Copy link
Member

@galfert are you 100% sure that the overhead is with receiving the separate payloads rather than just the fact that the app has to process all of the objects to get the user info?

@galfert
Copy link
Contributor Author

galfert commented Oct 20, 2020

Things we discussed during the Kosmos summit to investigate, in order to find the reason and possible solutions to the performance problem:

  • remove the console.log statements for incoming messages in Hyperchannel
  • batch up processing of incoming messages in Hyperchannel
  • send attendance objects in batches from Sockethub
  • send attendance list as array of activity objects from Sockethub

@silverbucket silverbucket added this to the IRC Platform milestone Oct 22, 2020
@silverbucket silverbucket removed this from Possible in Release: 3.2 Dec 26, 2020
@silverbucket silverbucket modified the milestones: IRC Platform, 2. Medium Priority, 2. Important & Not Urgent Aug 28, 2021
@silverbucket silverbucket added this to To do in Release: Next via automation Sep 26, 2021
@raucao
Copy link
Contributor

raucao commented Feb 18, 2022

Just btw, the attendance list used in Hyperchannel atm is an inline list from an attendance message, but the list is just username strings.

However, it also receives separate presence messages, which are also processed.

@raucao
Copy link
Contributor

raucao commented Feb 19, 2022

Also relevant perhaps: https://www.w3.org/TR/activitystreams-core/#collections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants