diff --git a/CHANGELOG.md b/CHANGELOG.md index a7bd8d018..4ce8ee428 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ eSockd 3.0 MochiWeb 4.0 +Log + +Async Socket ...... diff --git a/doc/design/ClientSession.md b/doc/design/ClientSession.md new file mode 100644 index 000000000..c7f6f53d2 --- /dev/null +++ b/doc/design/ClientSession.md @@ -0,0 +1,55 @@ +## Transient Client/Session Sequence1 + +``` +Client1->SM: {start_session, {true, ClientId, self()}} +SM-->Session: {destory, ClientId} +Session-->Session: {shutdown, destroy} +Session-->Client2: exit({shutdown, destroy}) +Client2-->CM: {'DOWN', MRef, process, Pid, Reason} +SM-->Client1: {ok, SessPid} +Client1-->CM: {register, Client1} +``` + +![Transient Client/Session Sequence1](TransientSessionSeq1.png) + +## Transient Client/Session Sequence2 + + +``` +Client1->SM: {start_session, {true, ClientId, self()}} +SM-->Session: {destory, ClientId} +Session-->Session: {shutdown, destroy} +SM-->Client1: {ok, SessPid} +Client1-->CM: {register, Client1} +Session-->Client2: exit({shutdown, destroy}) +Client2-->CM: {'DOWN', MRef, process, Pid, Reason} +``` + +![Transient Client/Session Sequence2](TransientSessionSeq2.png) + +## Persistent Client/Session Sequence1 + +``` +Client1->SM: {start_session, {true, ClientId, self()}} +SM-->Session: {resume, ClientId, ClientPid} +Session-->Client2: {shutdown, conflict, {ClientId, Pid}} +Client2-->CM: {unregister, ClientId, self()} +SM-->Client1: {ok, SessPid} +Client1-->CM: {register, Client1} +``` + +![Persistent Client/Session Sequence1](PersistentSessionSeq1.png) + + +## Persistent Client/Session Sequence2 + +``` +Client1->SM: {start_session, {true, ClientId, self()}} +SM-->Session: {resume, ClientId, ClientPid} +SM-->Client1: {ok, SessPid} +Client1-->CM: {register, Client1} +Session-->Client2: {shutdown, conflict, {ClientId, Pid}} +Client2-->CM: {unregister, ClientId, self()} +``` + +![Persistent Client/Session Sequence2](PersistentSessionSeq2.png) diff --git a/doc/design/PersistentSessionSeq1.png b/doc/design/PersistentSessionSeq1.png new file mode 100644 index 000000000..07e3b9856 Binary files /dev/null and b/doc/design/PersistentSessionSeq1.png differ diff --git a/doc/design/PersistentSessionSeq2.png b/doc/design/PersistentSessionSeq2.png new file mode 100644 index 000000000..5a731c230 Binary files /dev/null and b/doc/design/PersistentSessionSeq2.png differ diff --git a/doc/design/TransientSessionSeq1.png b/doc/design/TransientSessionSeq1.png new file mode 100644 index 000000000..c15e24435 Binary files /dev/null and b/doc/design/TransientSessionSeq1.png differ diff --git a/doc/design/TransientSessionSeq2.png b/doc/design/TransientSessionSeq2.png new file mode 100644 index 000000000..210b9e526 Binary files /dev/null and b/doc/design/TransientSessionSeq2.png differ