From 9ea4ed087adfcfd6a3a232758b43cb4f91e8b87e Mon Sep 17 00:00:00 2001 From: Louis Royer Date: Tue, 14 Apr 2020 18:02:46 +0200 Subject: [PATCH] Add sequence diagrams --- doc/download_sequence_diagram.drawio | 1 + doc/download_sequence_diagram.svg | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 doc/download_sequence_diagram.drawio create mode 100644 doc/download_sequence_diagram.svg diff --git a/doc/download_sequence_diagram.drawio b/doc/download_sequence_diagram.drawio new file mode 100644 index 0000000..33e679b --- /dev/null +++ b/doc/download_sequence_diagram.drawio @@ -0,0 +1 @@ +7Vxbc5s4FP41nkkf0uFiY/vRcZwms9kmG7uX7ZsMstEEEBWQxPvrVzdukm+hxkmn7kwTOMCR0Pl07qRjj8OXTwTE/t/Yg0HHMryXjn3ZsayBM6A/GWElCF3HEYQlQZ4gmSVhiv6DkmhIaoY8mNRuTDEOUhTXiS6OIuimNRogBD/Xb1vgoD5qDJZQI0xdEOjUb8hLfUk1DaO8cA3R0pdDD3rywhy4j0uCs0iO17HsBf8nLocg5yXvT3zg4ecKyZ507DHBOBVH4csYBmxp82UTz11tuFrMm8Ao3eeB/hzMgel2567VX3TnxrktODyBIJNrMYrjALkgRTiy5KTTVb5QdP4xO8zC4BYtYIAienYRQ4JCmEJCrwSSfF/SLp59lMJpDFz26DNFEKX5aRjQM5MeUqmmgD5CivMgAHGC5nxUg1IIdDOSoCf4ABMBHkbFWcpGGheg4LcyYUBPsirW2+B8Q+TK4wDMYXBRSG+MA8yGjzB/oSQl+LGAAmO0oHO8AiEKGMK/QuKBCEiyhLNJhXkBArSM6IlL5cFfXReQlNkTJCl8qZCkwD5BTJeNrOgt8qqVo3BV3zTPFaTmt/gVkA4Hkgjk7lgWrEuE0AMJkj0BM9gGGPMEmHcAGLshXroHwMvsojtf3nx1vNE/328n7iC9+TY6N7dhxj5h5jCY0QCyBkabMTNoBppBvy3QWBpoZoQuJX3hE17eHi+9XkMl47SFF92TubyZju++Th4o9WHyz5f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1rDSb4LbKQNTis12TtxInTjgvdM5q60OYORm0Dpb8FKNJvqttNpiSymLBTccIyq/z0d61SHE272EqVonCbXo2awQ5GB6pSdFWY24etUqyHpB7Sb3fmhHnljF3qncDCqZEg5fn/BXxmeIEujrxEAJd7UOAJI6/q4Cj+0J6uHPcMpW9UMa/71DUE6RqS3P0DCS+YCGdTeHWV7aa8OKEuHQ65J+dBF3mFa5hA4evR/5eTz//m5DiLUOJ3tIqHMRMjMfsfi7KJXFPubdLl4ZMCS8B9S7oP6j5ljBPWRbEq1pXdhelikpO3uLe3WLRf7PIW22vPWdNvQdFTjZ2N99ZoYe+h4zfE1EU61hoMrJoozm1dFC2ZAUft0GtqBjRGBzIDplKsdnp7dVqs71tUS4XtpYat7ZGPaVjddxL8HKSP6GgpQw2/jfPHKn5barawFCc7b/Jo1Y2xjhGCtes8Hy7s+lOR17OUcYbHQN6fF9OdFOLrYKkY9L55DFjqhX5pjtdVaErrzFq2KUaKizW7/RbFmyZ68+2KPBo4m+Y0NXDumdN8dWukojP727zNg4HztUkHk7/RIw+ZMY9x+SAiexAiGgzzbEIeTrP7zmjkyuUZE5iwoNPjUR2BH/ZPEygzcHEYZ2mZ8SgrWBTVQHRaivgcsSoOYuOHIHV9mBTPEOhCCi+RcpA5CJE82HNOX+4vRzPerCWtzNrOzlO83ynj9hzaeUPNm8X7eTRWwX1dnGd6ZzqVGAjZinIpRlk4F4VDhrD5KuXQSkTFcs7evc5BPrt8r50XR3NmFXU6OFSXlsao5RKCrX8HuBlC9i9DyH5zCB3nq5+u0a2J9dzSdcWBkDisA2jYtJjlGMOPve2sDuUjKInT4X7f/rwoS6kubfs5KVvPr66xqDNumCufLPDUPH7i5rSWuZc5eg+m7LNEke53fRAtRQ+H9EAClBQtJbWWEXZXxCoje5p60aQiDXy1UHIy81u+oig+wd7ZBPJ6M09Py78zIVBa/i0Pe/I/ \ No newline at end of file diff --git a/doc/download_sequence_diagram.svg b/doc/download_sequence_diagram.svg new file mode 100644 index 0000000..3d39924 --- /dev/null +++ b/doc/download_sequence_diagram.svg @@ -0,0 +1,3 @@ + + +
Application2
Application2
Application1
Application1
Application3
Application3
Tracker
Tracker
DISCOVER REQUEST(file1)
DISCOVER REQUES...
DISCOVER RESPONSE (file1, Application2, Application3)
DISCOVER RESPON...
Applications are all already registered successfully into tracker.
Lets start a download of file1 from Application1.
Applications are all already registered successfully into tracker....
SIZE REQUEST(file1)
SIZE REQUEST(fi...
SIZE RESPONSE(file1, sizeof(file1))
SIZE RESPONSE(f...
HASH REQUEST(file1, "SHA512")
HASH REQUEST(fi...
HASH RESPONSE(file1, sha512(file1))
HASH RESPONSE(f...
HASH REQUEST(file1, "SHA512")
HASH REQUEST(fi...
HASH RESPONSE(file1, sha512(file1))
HASH RESPONSE(f...
Application1 is requesting hashsum from each application to ensure applications have
the same file, but an improvement could be to register this sum in the tracker, and ask only the tracker once instead of asking each application.
Application1 is requesting hashsum from each application to ensure applications have...
LOAD PART(0, 512, file1)
LOAD PART(0, 51...
RATIO REQUEST(Application1)
RATIO REQUE...
RATIO RESPONSE(Application1, upratio, downratio)
RATIO RESPONSE(...
Application2 will cache the ratio a few seconds, to avoid asking the tracker
on each LOAD PART.
Here, based on this ratio, Application2 randomly decide to send a DENY to punish Application1. This filepart will be asked again later, and possibly to an other application.
Application2 will cache the ratio a few seconds, to avoid asking the tracker...
DENY(file1, 0)
DENY(file1, 0)
LOAD PART(1024, 512, file1)
LOAD PART(1024,...
RATIO REQUEST(Application1)
RATIO REQUEST(A...
RATIO RESPONSE(Application1, upratio, downratio)
RATIO RESPONSE(...
LOAD RESPONSE(file1, 1024, content(file1,1024, 512))
LOAD RESPONSE(f...
Application1 asks for all the missing fileparts (not represented here).
Application1 compute the hashsum locally and if it matches the received one, send
UPDATE RATIO to tracker.
Application1 asks for all the missing fileparts (not represented here)....
UPDATE RATIO(Application2, <number of bytes sent by Application2>)
UPDATE RATIO(Ap...
UPDATE RATIO(Application3, <number of bytes sent by Application3>)
UPDATE RATIO(Ap...
The download is over. Application1will detect a change in filelist an register the new
file to the tracker.
The download is over. Application1will detect a change in filelist an register the new...
Viewer does not support full SVG 1.1
\ No newline at end of file