CharstarAdmin
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Thanks Convex team!
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Sure, that would be great.
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
I can share all the
/convex
code.114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Unfortunately, it's private but I'm happy to share temporary access.
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
I haven't been able to diagnose that one though.
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room

114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room

114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room

114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room

114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Very cool, thanks!
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Are you saying that if the result is
head = p*
, then the read set is [-1, p*]
?114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
@sujayakar, does your assertion still apply? Just want to make sure.
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Just to clarify, what you're referring to is a lookup by key (
position
) while here we have a lookup by relative order.114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Woot!
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
I see. Either way, it would be good to know. Thanks for sanity-checking the rest.
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Will this invalidate the query after any addition even if
head
doesn't change?114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
Got it, so I shouldn't have any mention of
roomSize
in getPosition
?114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
@jamwt sorry for the ping -- just wanted to get your thoughts on this ^
114 replies
CCConvex Community
•Created by CharstarAdmin on 9/21/2023 in #support-community
Implementing a virtual waiting room
@jamwt , I had a question on this line: https://gist.github.com/charstar-ai/dd12c74a2c6d1b48239f9bd9cb4639c3#file-queue-ts-L28
Will replacing
roomSize
with a boolean hasSpace
make things less reactive and therefore more efficient? Also, is it more efficient to move the roomSize
into its own query function and check if there is space in the room separately from getPosition
(e.g. useEffect(() => {/* call promoteToRoom(userId) if position is 0 and roomSize < MAX_ROOM_SIZE */}, [position, roomSize])
? Is there a way to have getPosition
react to changes in roomSize
only if the user is the head of the queue or is that an over-optimization due to caching?114 replies