diff --git a/docs/RTC_diagrams.drawio b/docs/RTC_diagrams.drawio index 92c2bc10..5979da9c 100644 --- a/docs/RTC_diagrams.drawio +++ b/docs/RTC_diagrams.drawio @@ -1,122 +1,122 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -125,80 +125,80 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -207,38 +207,38 @@ - + - + - + - + - + - + - + - + - + - + @@ -247,16 +247,16 @@ - + - + - + - + @@ -265,156 +265,162 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - + - + - + - + - - + + - + + + + - + - + - + - - + + - - + + - + + + + @@ -423,241 +429,669 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + - + - - + + + + + + - - + + - - + + - - + + + + + + + + - + - + - + - + - + + + + + + + + + + + + + + + - + - + - - + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + - + - + - + - + + + + + + + - + - + - + - - + + - - + + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + + - + + + + + + + + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + + + + + + + - - + + + + + + + + - + + + + + + + + + + + + + + + + - - + + - + - + - + - + - + - - - + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/docs/source/developer/architecture.md b/docs/source/developer/architecture.md index 2e260027..497e46d5 100644 --- a/docs/source/developer/architecture.md +++ b/docs/source/developer/architecture.md @@ -2,19 +2,25 @@ ## Current implementation -COMING... +COMING SOON... ### Class diagram -![classes](../images/class_diagram.png) +![classes](../images/class_diagram.svg) ### Opening a document -![initialization](../images/initialization_diagram.png) +![initialization](../images/initialization_diagram.svg) + +### Reconnecting +The websocket connection might close for multiple reasons. In this section you will find a diagram explaining the process of reconnecting +to an old collaborative session. + +![reconnect](../images/reconnect_diagram.svg) ### Autosave -![autosave](../images/autosave_diagram.png) +![autosave](../images/autosave_diagram.svg) ### Conflict -![autosave](../images/conflict_diagram.png) +![conflict](../images/conflict_diagram.svg) ## Early attempts diff --git a/docs/source/images/autosave_diagram.png b/docs/source/images/autosave_diagram.png deleted file mode 100644 index 365fe104..00000000 Binary files a/docs/source/images/autosave_diagram.png and /dev/null differ diff --git a/docs/source/images/autosave_diagram.svg b/docs/source/images/autosave_diagram.svg new file mode 100644 index 00000000..aec818de --- /dev/null +++ b/docs/source/images/autosave_diagram.svg @@ -0,0 +1,4 @@ + + + +
Alternative
Alternative
[If content on disk
differs from room]
[If content on d...
[else]
[else]
Client
Client
YDocWebSocketHandler
YDocWebSocketHandler
send update
send update
Room
Room
type
type
File
File
Store
Store
Read message
Read message
message
message
write update
write update
try to save the content
try to save the content
ContentManager
ContentManager
get content
get content
content
content
Raise OutOfBandChanges
Raise OutOfBandChanges
load content
load content
get content
get content
content
content
content
content
send update
send update
send update
send update
Update editor view
Update editor view
model
model
send update dirty flag
send update dirty flag
send update dirty flag
send update dirty flag
Update dirty flag indicator
Update dirty flag indicator
YDocument
YDocument
Set new content
Set new content
document changed
document changed
Set dirty flag to False
Set dirty flag to False
document changed
document changed
Text is not SVG - cannot display
diff --git a/docs/source/images/class_diagram.png b/docs/source/images/class_diagram.png deleted file mode 100644 index 7e3decc2..00000000 Binary files a/docs/source/images/class_diagram.png and /dev/null differ diff --git a/docs/source/images/class_diagram.svg b/docs/source/images/class_diagram.svg new file mode 100644 index 00000000..7525a946 --- /dev/null +++ b/docs/source/images/class_diagram.svg @@ -0,0 +1,4 @@ + + + +RoomManagerhas_roomget_roomremove_roomclearFileLoaderMappingcontents_managerfile_id_manager__contains____getitem____delitem__removeclearBaseRoomclientsreadyroom_idystoreydocawarenessinitializestartstophandle_msgbroadcast_msgDocumentRoomdocumentfileTransientRoomStoreversioninitializeexistslistgetcreateremovereadwriteFileLoaderfile_idpathnumber_of_subscriptionsobserveunobserveload_contentsave_contentmaybe_save_contentnotifycleanYDocExtensionYDocWebSocketHandlerpathroomgetrecvsend
1
1
1
1
has a
has a
uses
uses
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1..*
1..*
1
1
0..*
0..*
1..*
1..*
1
1
1
1
0..*
0..*
1
1
1
1
has a
has a
has a
has a
has a
has a
has a
has a
Text is not SVG - cannot display
diff --git a/docs/source/images/conflict_diagram.png b/docs/source/images/conflict_diagram.png deleted file mode 100644 index bec7ebfa..00000000 Binary files a/docs/source/images/conflict_diagram.png and /dev/null differ diff --git a/docs/source/images/conflict_diagram.svg b/docs/source/images/conflict_diagram.svg new file mode 100644 index 00000000..7c705217 --- /dev/null +++ b/docs/source/images/conflict_diagram.svg @@ -0,0 +1,4 @@ + + + +
Client
Client
YDocWebSocketHandler
YDocWebSocketHandler
Room
Room
File
File
Store
Store
ContentManager
ContentManager
get model
get model
model
model
notify
notify
YDocument
YDocument
send file changed message
send file changed message
send file changed message
send file changed message
Show revert/overwrite dialog
Show revert/overwrite dialog
Alternative
Alternative
[Revert]
[Revert]
[Overwrite]
[Overwrite]
send message document overwriten
send message document overwriten
model
model
save content
save content
save content
save content
Send overwrite message
Send overwrite message
Send overwrite message
Send overwrite message
press overwrite
press overwrite
send message file overwriten
send message file overwriten
send message file overwriten
send message file overwriten
press revert
press revert
Send reload message
Send reload message
Send reload message
Send reload message
load content
load content
load content
load content
content
content
content
content
Set new content
Set new content
document changed
document changed
send update
send update
send update
send update
Update editor view
Update editor view
send message document overwriten
send message document overwriten
model
model
Text is not SVG - cannot display
diff --git a/docs/source/images/initialization_diagram.png b/docs/source/images/initialization_diagram.png deleted file mode 100644 index b0e98a2a..00000000 Binary files a/docs/source/images/initialization_diagram.png and /dev/null differ diff --git a/docs/source/images/initialization_diagram.svg b/docs/source/images/initialization_diagram.svg new file mode 100644 index 00000000..e57116ef --- /dev/null +++ b/docs/source/images/initialization_diagram.svg @@ -0,0 +1,4 @@ + + + +
Client
Client
YDocWebSocketHandler
YDocWebSocketHandler
connect
connect
RoomManager
RoomManager
get room
get room
Room
Room
Open document
Open document
room
room
initialize
initialize
File
File
Store
Store
FileLoaderMapping
FileLoaderMapping
Alternative
Alternative
[If the store has updates]
[If the store ha...
load content
load content
content
content
DocSessionHandler
DocSessionHandler
Request session
Request session
session
session
Alternative
Alternative
[If room
doesn't exists]
[If room...
[else]
[else]
start
start
apply updates
apply updates
create document
create document
Set initial update
Set initial update
[else]
[else]
session
session
apply updates
apply updates
return
return
initialized
initialized
broadcast content
broadcast content
Update view
Update view
Check whehter the room exists or not
Check whehter the room exists or not
Get session
Get session
Alternative
Alternative
[If room exists]
[If room exists]
[else]
[else]
Alternative
Alternative
[If document exists
in store]
[If document exi...
[else]
[else]
Check whehter the document exists or not
Check whehter the document exists or not
Get session
Get session
session token
session token
Document exists?
Document exists?
session token
session token
get file loader
get file loader
file loader
file loader
observe
observe
YDocument
YDocument
observe
observe
set content
set content
encode state as update
encode state as update
Add client and start server
Add client and start server
Text is not SVG - cannot display
diff --git a/docs/source/images/reconnect_diagram.svg b/docs/source/images/reconnect_diagram.svg new file mode 100644 index 00000000..af380392 --- /dev/null +++ b/docs/source/images/reconnect_diagram.svg @@ -0,0 +1,4 @@ + + + +
Client
Client
YDocWebSocketHandler
YDocWebSocketHandler
connect
connect
RoomManager
RoomManager
get room
get room
Room
Room
room
room
initialize
initialize
File
File
Store
Store
FileLoaderMapping
FileLoaderMapping
Alternative
Alternative
[If the store has updates]
[If the store has...
load content
load content
content
content
Alternative
Alternative
[If room
doesn't exists]
[If room...
[else]
[else]
start
start
apply updates
apply updates
create document
create document
Set initial update
Set initial update
[else]
[else]
session
session
apply updates
apply updates
return
return
initialized
initialized
Document exists?
Document exists?
get file loader
get file loader
file loader
file loader
observe
observe
YDocument
YDocument
observe
observe
set content
set content
encode state as update
encode state as update
Alternative
Alternative
[Token is valid]
[Token is valid]
[token invalid]
[token invalid]
Add client and start server
Add client and start server
broadcast content
broadcast content
Close connection
Close connection
Show error message
Show error message
Update view
Update view
Check whether the session token is valid
Check whether the session token is valid
Text is not SVG - cannot display