Skip to content

Commit

Permalink
improve comments in Room
Browse files Browse the repository at this point in the history
  • Loading branch information
jbakse committed Feb 3, 2022
1 parent 32af681 commit 8e8a018
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 11 deletions.
45 changes: 36 additions & 9 deletions notes/todo.todo
Expand Up @@ -80,7 +80,7 @@

# Examples

.-- Add particpant counter to coverup
+-- Add particpant counter to coverup

# Doumentation

Expand All @@ -90,17 +90,44 @@
-- Article: Running a local/LAN server for low ping sync across devices on site

# Code Review
.-- change private methods from _ to #
-- client ids sometimes called "id" sometimes "name", confusing?
-- room has properties that are DS records and properties that are Party Records, rename properties to improve clarity?
-- Room recordList -> userRecordList?
+ -- change private methods from _ to #
+ -- client ids sometimes called "id" sometimes "name", confusing?
+ -- room has properties that are DS records and properties that are Party Records, rename properties to improve clarity?
.-- Room recordList -> userRecordList?
-- compare whenReady() implemenations in Room, Client, Record
-- should room.participants be room.participantIds
-- why use room.participants as cache of #roomDataRecord.participants
might be better to just call #roomDataRecord.get on demand, removs a property, less to think about
+ -- should room.participants be room.participantIds

-- Room remove properties?
- participantUids
- participantShareds
these could maybe be removed and just calculated on demand
- clientParticpantRecord
this could maybe be pulled from participantRecords by own uid?
also does this need to be created/loaded as a special case?
maybe it could be created the same way the rest of participantRecords are?


-- merging incoming data with shared object


















# Wait and See

- merging incoming data with shared object
note: the current merge seems to be working pretty well
so this whole note should probably wait until a concrete need arises
I wrote a custom merge function in Record, but maybe it would be better to use a library?
Expand Down
4 changes: 2 additions & 2 deletions src/Room.js
Expand Up @@ -17,8 +17,8 @@ export class Room {
#roomName; // string: user provide name for the room

#roomDataDsRecord; // ds.Record: {participants: [uid], host: uid}
#participantUids; // [uid]: cache of #roomDataRecord.participants
#recordDsList; // ds.List: user records created in this room
#participantUids; // [uid]: cache of #roomDataDsRecord.participants
#recordDsList; // ds.List: user created records associated with this room
#participantRecords; // {uid: party.Record}: map of particpant records for room
#participantShareds; // [(watched)shared] cache of #participantRecords.getShared()s
#clientParticpantRecord; // party.Record, participant record this client
Expand Down

0 comments on commit 8e8a018

Please sign in to comment.