From 56edd49b62efbeb2abda3fea56a7fbe7f92e76e3 Mon Sep 17 00:00:00 2001 From: Claudio Maggioni Date: Wed, 13 May 2020 18:15:24 +0200 Subject: [PATCH] hw2: last moment fixes --- hw2/.idea/misc.xml | 2 +- hw2/ciao.txt | 113 ------------------ hw2/mamma.txt | 113 ------------------ hw2/out/production/hw2/SAWReceiver2.class | Bin 0 -> 2544 bytes hw2/out/production/hw2/SAWSender2.class | Bin 0 -> 4607 bytes .../production/hw2/impl/GBNTReceiver$1.class | Bin 0 -> 693 bytes .../hw2/impl/GBNTReceiver$State.class | Bin 0 -> 1096 bytes .../production/hw2/impl/GBNTReceiver.class | Bin 0 -> 3126 bytes .../production/hw2/impl/GBNTSender$1.class | Bin 0 -> 725 bytes .../hw2/impl/GBNTSender$Packet.class | Bin 0 -> 2274 bytes .../hw2/impl/GBNTSender$State.class | Bin 0 -> 1079 bytes hw2/out/production/hw2/impl/GBNTSender.class | Bin 0 -> 6418 bytes .../hw2/transport/FileReceiver.class | Bin 0 -> 1912 bytes .../production/hw2/transport/FileSender.class | Bin 0 -> 2210 bytes .../production/hw2/transport/MyTimer.class | Bin 0 -> 2987 bytes .../production/hw2/transport/Receiver.class | Bin 0 -> 1712 bytes .../hw2/transport/ScheduledAction.class | Bin 0 -> 462 bytes hw2/out/production/hw2/transport/Sender.class | Bin 0 -> 846 bytes .../hw2/transport/TimeoutAction.class | Bin 0 -> 147 bytes .../production/hw2/transport/Transport.class | Bin 0 -> 4597 bytes hw2/src/impl/GBNTReceiver.java | 20 ++-- hw2/src/impl/GBNTSender.java | 61 ++++++++-- 22 files changed, 60 insertions(+), 249 deletions(-) delete mode 100644 hw2/ciao.txt delete mode 100644 hw2/mamma.txt create mode 100644 hw2/out/production/hw2/SAWReceiver2.class create mode 100644 hw2/out/production/hw2/SAWSender2.class create mode 100644 hw2/out/production/hw2/impl/GBNTReceiver$1.class create mode 100644 hw2/out/production/hw2/impl/GBNTReceiver$State.class create mode 100644 hw2/out/production/hw2/impl/GBNTReceiver.class create mode 100644 hw2/out/production/hw2/impl/GBNTSender$1.class create mode 100644 hw2/out/production/hw2/impl/GBNTSender$Packet.class create mode 100644 hw2/out/production/hw2/impl/GBNTSender$State.class create mode 100644 hw2/out/production/hw2/impl/GBNTSender.class create mode 100644 hw2/out/production/hw2/transport/FileReceiver.class create mode 100644 hw2/out/production/hw2/transport/FileSender.class create mode 100644 hw2/out/production/hw2/transport/MyTimer.class create mode 100644 hw2/out/production/hw2/transport/Receiver.class create mode 100644 hw2/out/production/hw2/transport/ScheduledAction.class create mode 100644 hw2/out/production/hw2/transport/Sender.class create mode 100644 hw2/out/production/hw2/transport/TimeoutAction.class create mode 100644 hw2/out/production/hw2/transport/Transport.class diff --git a/hw2/.idea/misc.xml b/hw2/.idea/misc.xml index 8f5f4fa..b79eba1 100644 --- a/hw2/.idea/misc.xml +++ b/hw2/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/hw2/ciao.txt b/hw2/ciao.txt deleted file mode 100644 index a4e075b..0000000 --- a/hw2/ciao.txt +++ /dev/null @@ -1,113 +0,0 @@ - Siena (Scalable Internet Event Notification Architectures) is a research project aimed at - designing and constructing a generic scalable publish/subscribe event-notification service. - The technical basis of Siena is an innovative type of network service called content-based networking. - -Overview -The asynchrony, heterogeneity, and inherent loose coupling that characterize applications in a wide-area - network promote event interaction as a natural design abstraction for a growing class of software systems. - An emerging building block for such systems is an infrastructure called publish/subscribe event notification - service. - -Software systems of a significant dimension, especially those that are distributed over a computer network, -are often engineered by means of the integration of components. A promising approach to support component-based -software architectures is the so-called event-based style whereby the interaction of components is modeled with -events. Components emit events to inform other components of a change in their internal state or to request services -from other components. Upon detecting the occurrence of events, components react by executing some actions and possibly - emitting other events. The glue that ties components together in an event-based architecture is an infrastructure that - we call event service. The event service registers the interests of components and then dispatches event notifications - accordingly. The advantage of using an event service instead of other "classical" integration mechanisms - such as direct or remote invocation is that this method increases the degree of de-coupling among components - thus eliminating static dependencies and improving interoperability. - -We envision a ubiquitous event notification service accessible from every site on a wide-area network and suitable -for supporting highly distributed applications requiring component interactions ranging in granularity from fine to - coarse. Conceptually, the service is implemented as a network of servers that provide access points to clients. Clients - use the access points to advertise the information about events that they generate and to publish notifications - containing that information. They also use the access points to subscribe for notifications of interest. - The service uses the access points to then notify clients by delivering any notifications of interest. Clearly, an - event notification service complements other general-purpose middleware services, such as point-to-point and multicast - communication mechanisms, by offering a many-to-many communication and integration facility. - -Given that the primary purpose of an event notification service is to support notification selection and delivery, - the challenge we face in a wide-area setting is maximizing expressiveness in the selection mechanism without sacrificing - scalability in the delivery mechanism. Expressiveness refers to the ability of the event notification service to provide - a powerful data model with which to capture information about events, to express filters and patterns on notifications - of interest, and to use that data model as the basis for optimizing notification delivery. In terms of scalability, - we are referring not simply to the number of event generators, the number of event notifications, and the number - of notification recipients, but also to the need to discard many of the assumptions made for local-area networks, - such as low latency, abundant bandwidth, homogeneous platforms, continuous and reliable connectivity, and - centralized control. - - -Intuitively, a simple event notification service that provides no selection mechanism can be reduced to a multicast -routing and transport mechanism for which there are numerous scalable implementations. However, once the service provides - a selection mechanism, then the overall efficiency of the service and its routing of notifications are affected by the - power of the language used to construct notifications and to express filters and patterns. As the power of the language - increases, so does the complexity of the processing. Thus, in practice, scalability and expressiveness are two - conflicting goals that must be traded off. - -Siena is an event notification service that we have designed and implemented to maximize both expressiveness and -scalability. A prototype implementation of Siena is available. -People -Siena is primarily the work of Antonio Carzaniga and Alexander L. Wolf. D.S. Rosenblum also made significant -contributions to the initial design of Siena. - -Others also contributed directly to the development of Siena. Among them are John Giacomoni, Mauro Caporuscio, -Matthew J. Rutherford, Cyrus P. Hall, Yanyan Wang, Giovanni Toffetti, and Amir Malekpour. -Documents -Articles are available in Portable Document Format (PDF) or PostScript® format and some of them are compressed -with gzip. Downloading any one of these documents indicates that you agree to abide by a copyright notice. -Selected Papers - - Design and Evaluation of a Wide-Area Event Notification Service - A. Carzaniga, D.S. Rosenblum, and A.L. Wolf - ACM Transactions on Computer Systems, 19(3):332-383, August 2001. - Abstract, BibTeX ref., PDF, DOI - End-to-End Reliability for Best-Effort Content-Based Publish/Subscribe Networks - A. Malekpour, A. Carzaniga, F. Pedone, and G. Toffetti Carughi - In Proceedings of the 5th ACM International Conference on Distributed Event-Based Systems (DEBS 2011). New York, New York, July 2011. - Abstract, BibTeX ref., PDF, DOI - A Routing Scheme for Content-Based Networking - A. Carzaniga, M.J. Rutherford, and A.L. Wolf - Proceedings of IEEE INFOCOM 2004. Hong Kong, China. March 2004. - Abstract, BibTeX ref., PDF, DOI - Forwarding in a Content-Based Network - A. Carzaniga and A.L. Wolf - Proceedings of ACM SIGCOMM 2003. p. 163-174. Karlsruhe, Germany. August 2003. - Abstract, BibTeX ref., PDF, DOI - Design and Evaluation of a Support Service for Mobile, Wireless Publish/Subscribe Applications - M. Caporuscio, A. Carzaniga, and A.L. Wolf - IEEE Transactions on Software Engineering, 29(12):1059-1071, December 2003. - Abstract, BibTeX ref., PDF, DOI - Content-based Networking: A New Communication Infrastructure - A. Carzaniga and A.L. Wolf - In NSF Workshop on an Infrastructure for Mobile and Wireless Systems. Lecture Notes in Computer Science n. 2538 p. 59-68. Springer-Verlag. Scottsdale, Arizona. October 2001. - Abstract, BibTeX ref., PDF - Achieving Expressiveness and Scalability in an Internet-Scale Event Notification Service - A. Carzaniga, D.S. Rosenblum, and A.L. Wolf - Nineteenth ACM Symposium on Principles of Distributed Computing (PODC2000). Portland, Oregon, July 2000. - Abstract, BibTeX ref., PDF, DOI - Content-Based Addressing and Routing: A General Model and its Application - A. Carzaniga, D.S. Rosenblum, and A.L. Wolf - Technical Report CU-CS-902-00, Department of Computer Science, University of Colorado, January 2000. - Abstract, BibTeX ref., PDF - Architectures for an Event Notification Service Scalable to Wide-area Networks - A. Carzaniga - PhD Thesis. Politecnico di Milano. December, 1998. - Abstract, BibTeX ref., PDF - A Design Framework for Internet-Scale Event Observation and Notification - D.S. Rosenblum and A.L. Wolf - 6th European Software Engineering Conference. Lecture Notes in Computer Science 1301, Springer, Berlin, 1997. - -Acknowledgments -This work was supported in part by the Air Force Materiel Command, Rome Laboratory, and the Defense Advanced -Research Projects Agency under Contract Numbers F30602-94-C-0253, F30602-97-2-0021, F30602-98-2-0163, -and F30602-99-C-0174; by the Air Force Office of Scientific Research, Air Force Materiel Command, USAF, u -nder grant number F49620-98-1-0061; and by the National Science Foundation under Grant Number CCR-9701973. -The content of the information does not necessarily reflect the position or the policy of the US Governmen -t and no official endorsement should be inferred. - -We thank Dennis Heimbigner, Richard S. Hall, and André van der Hoek of the Software Engineering Research Laboratory, -University of Colorado at Boulder (circa 1997), and Giampaolo Cugola, Elisabetta Di Nitto, and Alfonso Fuggetta of - Politecnico di Milano for their contributions to this work. -this page is maintained by Antonio Carzaniga and was updated on September 15, 2019 \ No newline at end of file diff --git a/hw2/mamma.txt b/hw2/mamma.txt deleted file mode 100644 index a4e075b..0000000 --- a/hw2/mamma.txt +++ /dev/null @@ -1,113 +0,0 @@ - Siena (Scalable Internet Event Notification Architectures) is a research project aimed at - designing and constructing a generic scalable publish/subscribe event-notification service. - The technical basis of Siena is an innovative type of network service called content-based networking. - -Overview -The asynchrony, heterogeneity, and inherent loose coupling that characterize applications in a wide-area - network promote event interaction as a natural design abstraction for a growing class of software systems. - An emerging building block for such systems is an infrastructure called publish/subscribe event notification - service. - -Software systems of a significant dimension, especially those that are distributed over a computer network, -are often engineered by means of the integration of components. A promising approach to support component-based -software architectures is the so-called event-based style whereby the interaction of components is modeled with -events. Components emit events to inform other components of a change in their internal state or to request services -from other components. Upon detecting the occurrence of events, components react by executing some actions and possibly - emitting other events. The glue that ties components together in an event-based architecture is an infrastructure that - we call event service. The event service registers the interests of components and then dispatches event notifications - accordingly. The advantage of using an event service instead of other "classical" integration mechanisms - such as direct or remote invocation is that this method increases the degree of de-coupling among components - thus eliminating static dependencies and improving interoperability. - -We envision a ubiquitous event notification service accessible from every site on a wide-area network and suitable -for supporting highly distributed applications requiring component interactions ranging in granularity from fine to - coarse. Conceptually, the service is implemented as a network of servers that provide access points to clients. Clients - use the access points to advertise the information about events that they generate and to publish notifications - containing that information. They also use the access points to subscribe for notifications of interest. - The service uses the access points to then notify clients by delivering any notifications of interest. Clearly, an - event notification service complements other general-purpose middleware services, such as point-to-point and multicast - communication mechanisms, by offering a many-to-many communication and integration facility. - -Given that the primary purpose of an event notification service is to support notification selection and delivery, - the challenge we face in a wide-area setting is maximizing expressiveness in the selection mechanism without sacrificing - scalability in the delivery mechanism. Expressiveness refers to the ability of the event notification service to provide - a powerful data model with which to capture information about events, to express filters and patterns on notifications - of interest, and to use that data model as the basis for optimizing notification delivery. In terms of scalability, - we are referring not simply to the number of event generators, the number of event notifications, and the number - of notification recipients, but also to the need to discard many of the assumptions made for local-area networks, - such as low latency, abundant bandwidth, homogeneous platforms, continuous and reliable connectivity, and - centralized control. - - -Intuitively, a simple event notification service that provides no selection mechanism can be reduced to a multicast -routing and transport mechanism for which there are numerous scalable implementations. However, once the service provides - a selection mechanism, then the overall efficiency of the service and its routing of notifications are affected by the - power of the language used to construct notifications and to express filters and patterns. As the power of the language - increases, so does the complexity of the processing. Thus, in practice, scalability and expressiveness are two - conflicting goals that must be traded off. - -Siena is an event notification service that we have designed and implemented to maximize both expressiveness and -scalability. A prototype implementation of Siena is available. -People -Siena is primarily the work of Antonio Carzaniga and Alexander L. Wolf. D.S. Rosenblum also made significant -contributions to the initial design of Siena. - -Others also contributed directly to the development of Siena. Among them are John Giacomoni, Mauro Caporuscio, -Matthew J. Rutherford, Cyrus P. Hall, Yanyan Wang, Giovanni Toffetti, and Amir Malekpour. -Documents -Articles are available in Portable Document Format (PDF) or PostScript® format and some of them are compressed -with gzip. Downloading any one of these documents indicates that you agree to abide by a copyright notice. -Selected Papers - - Design and Evaluation of a Wide-Area Event Notification Service - A. Carzaniga, D.S. Rosenblum, and A.L. Wolf - ACM Transactions on Computer Systems, 19(3):332-383, August 2001. - Abstract, BibTeX ref., PDF, DOI - End-to-End Reliability for Best-Effort Content-Based Publish/Subscribe Networks - A. Malekpour, A. Carzaniga, F. Pedone, and G. Toffetti Carughi - In Proceedings of the 5th ACM International Conference on Distributed Event-Based Systems (DEBS 2011). New York, New York, July 2011. - Abstract, BibTeX ref., PDF, DOI - A Routing Scheme for Content-Based Networking - A. Carzaniga, M.J. Rutherford, and A.L. Wolf - Proceedings of IEEE INFOCOM 2004. Hong Kong, China. March 2004. - Abstract, BibTeX ref., PDF, DOI - Forwarding in a Content-Based Network - A. Carzaniga and A.L. Wolf - Proceedings of ACM SIGCOMM 2003. p. 163-174. Karlsruhe, Germany. August 2003. - Abstract, BibTeX ref., PDF, DOI - Design and Evaluation of a Support Service for Mobile, Wireless Publish/Subscribe Applications - M. Caporuscio, A. Carzaniga, and A.L. Wolf - IEEE Transactions on Software Engineering, 29(12):1059-1071, December 2003. - Abstract, BibTeX ref., PDF, DOI - Content-based Networking: A New Communication Infrastructure - A. Carzaniga and A.L. Wolf - In NSF Workshop on an Infrastructure for Mobile and Wireless Systems. Lecture Notes in Computer Science n. 2538 p. 59-68. Springer-Verlag. Scottsdale, Arizona. October 2001. - Abstract, BibTeX ref., PDF - Achieving Expressiveness and Scalability in an Internet-Scale Event Notification Service - A. Carzaniga, D.S. Rosenblum, and A.L. Wolf - Nineteenth ACM Symposium on Principles of Distributed Computing (PODC2000). Portland, Oregon, July 2000. - Abstract, BibTeX ref., PDF, DOI - Content-Based Addressing and Routing: A General Model and its Application - A. Carzaniga, D.S. Rosenblum, and A.L. Wolf - Technical Report CU-CS-902-00, Department of Computer Science, University of Colorado, January 2000. - Abstract, BibTeX ref., PDF - Architectures for an Event Notification Service Scalable to Wide-area Networks - A. Carzaniga - PhD Thesis. Politecnico di Milano. December, 1998. - Abstract, BibTeX ref., PDF - A Design Framework for Internet-Scale Event Observation and Notification - D.S. Rosenblum and A.L. Wolf - 6th European Software Engineering Conference. Lecture Notes in Computer Science 1301, Springer, Berlin, 1997. - -Acknowledgments -This work was supported in part by the Air Force Materiel Command, Rome Laboratory, and the Defense Advanced -Research Projects Agency under Contract Numbers F30602-94-C-0253, F30602-97-2-0021, F30602-98-2-0163, -and F30602-99-C-0174; by the Air Force Office of Scientific Research, Air Force Materiel Command, USAF, u -nder grant number F49620-98-1-0061; and by the National Science Foundation under Grant Number CCR-9701973. -The content of the information does not necessarily reflect the position or the policy of the US Governmen -t and no official endorsement should be inferred. - -We thank Dennis Heimbigner, Richard S. Hall, and André van der Hoek of the Software Engineering Research Laboratory, -University of Colorado at Boulder (circa 1997), and Giampaolo Cugola, Elisabetta Di Nitto, and Alfonso Fuggetta of - Politecnico di Milano for their contributions to this work. -this page is maintained by Antonio Carzaniga and was updated on September 15, 2019 \ No newline at end of file diff --git a/hw2/out/production/hw2/SAWReceiver2.class b/hw2/out/production/hw2/SAWReceiver2.class new file mode 100644 index 0000000000000000000000000000000000000000..ae1938e9643bb8f025ac0e30e36a18750f27ab56 GIT binary patch literal 2544 zcmaJ@-%}G;6#i~D$%eQppb-_&sGwm%0&3BUr2>MY5tO88ORX-+0xMxR-E1h-{%*(T zzP00YI*uopO^{HmVRHAJbI(2JJLi0N$acjF&d>Z7Qq#%T&-u2mm-*u zp4UQD_!*5$?Ro?+NAQXiC*|^L1UFQ?7QxL3Zbe{3Fr^}^A}0_S?-CFr0$T?iyXYCV zH(}&UrXqvM-EJuff$(5zEIo8iY5{?uk)7-2_T)fWW{faR)0Qm|VieD$;f!TlUY~%H zXq%whpp&C@d&;uS(bD{s>1K?nJT3JpCu`&<4A+u+#TfKvt)jrTRJ#A#xS2Jr1=Bs& zOO&29Z#pHfKkHczlLgF0fq3e+v0xh=o;GO(g9sStM=1y6bCh!NDAzGb~P%dHOzp34rgXv z)5yhH$y&{w@%Yf9x(VSJxI=0Q?Si*X*(o03p zWPJ+hArLEb!g7*VyLOq#;aFmzZF5XgGHcjbGheArped31pPGFDQIheA zZ*$_}Go95ODatFu8?;W>H2JIIj-2kh0xj#Ev+M_qm2#Z9 zQh|&eVb|TkyiqKgEbPK7)+KR|D5BYVSay1f0;nh0ufFM;;=ee}jOcWXhUC zO;LgsEl4e>gfhDF5aAU+YB$%zsNq`6*mc-~dj9Ri9>j>hf#`NK-(DO?BaYEaE9awr zf||f{Pq4Ve9-u9zuR>i$ZR%^()JIpbMfnceihnG~hC~QiCf$oL*ZoX-h}Jmm2MFOH zQ@8kub}?9l>3VR|KO3v0JjGKg0_Pb?Lln>BG`D3hK4IV>pPh|OxB6u6t*hA9*!%zu zRP@G=ggE{P+W}ga|M^`y)KZjPs0MU|F%nGM#$M>0RXg9Z9X=qv938#>JeUV({K-k_ z1xf+#>*%AT@E^4g@-Jv&H{rdw22wmGH3(9)>g-aTz7zF)?&Mg)U+@UT4lc5Z^3%w# z9PVclYm8W%KSyVK)A4&qNXsr-^dJYRw>JfEH3xI6Xwd!P2UoFs87aE=&^>e?N$I~w z`iD0A2NmhB3njn+%ZN$eM(JCo4)<21si_Pg$%w)GWdzOAOH%1S2uL^|K|c|+ml3pV zMBwvqbJ~5Cv;jZB%KB{Xk{sZaL!{1D5}|{YQ!B6~g^b1e_iWGk152QaZia#-izi~yVxGL(9 z7JHBphcF>paDANzqP0Rtj?!lY2SrITg5#qk8BylJ7Swd~^wi;Gd!3}(Sr!sNKd&xG UUxByq9^U448>b$jp5{06FZ&Z6Qvd(} literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/SAWSender2.class b/hw2/out/production/hw2/SAWSender2.class new file mode 100644 index 0000000000000000000000000000000000000000..110f33998679f7c6631cb3ac5ba6b70fade09988 GIT binary patch literal 4607 zcmbVPdvH`&8ULN^ZuSyxnvf8ngy5#-5f;dUmzY3=Bv3*FRCWv1K*P=ECRwuC8+PwP z(-!&=C`zqVXp5z#6tF>xTCfB~9zJG#bf!9L9rX`&#(#AD%W=kkI-STw1!>byO1@T%CuPYQp z>J?PGLUF5=Oxs4%-ee>)rcYE*@ULuruwGy#lnnwExT_BAQwR#h>h|@r<#*ABEE-Vo zWx+y)!q$!rkyUL%7gU%KS+%}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(mk{YlI6mWGtb*pP~tkt>avxzd<*=LnL4+q=Tj6R?i~e2xJ;z_1-;c%El? z4l^7_7=oAR@|V$rqmJQjZ#A=qOQ9FSPt&TYyn${$*~jVXfYdq8d5k$uTz)xY1UETk z9vhOHvqkk$)NsrR`{qt#Nrl6H$<$kwtyHhS=bRjz>pket9xS};LA`7qz2-YdJzSrx zM>*kR^vUb=$#JId8(4u8Sc5ltSDoZ-a*CFoMjRtd<}=9f!(^DB5zjDn_w!5Q1%5~z z#v*@PjKPnZCF^-GsBkNCOaIu(!8sgfa!#Mb#x_70?%c2g;&;9_W5flWsOb24|#3<2($2GzCirM6X-=*g%uMZr^jE(N%Tm2 zg4;`6enF0Uj*Sfk_Ivuypi_{AuP08765R7-fV0zgCNo}%nW7Lci z!awD^&d(X2UobxJF>l{z8~G(;^eZa+8@7wzviLq=1NuGH{{!RoM>e28BZa?sOiX)n kIf%d_T`w-C5J}Af>is>=MYMO6{pb?zJSb+ZJbrJVQW{mlYSCs zKtc$iegGeZn6-kaRDra+Z{F<8oAr!;{`!6i;0YdAa0~S^Of<@5ZECt@;<1&l&Qq_K3mgMiaVR z?aNSj^RuythkUHaQ|(6qS0f%v&6my<(h5FMnI*6I(L4^sfz%mmSF7&L_=1zJ8wM&$ zWOzCd=`@;{*r7*wB1vCINowN0g$Hmflu@zp5KRk@&|=uq*&W5h(~cMU^I&=)g_^i= z9K{yeXfmwp@9bQy=^#2k5l%e3e!*_2PHvbc2M)5?3TxAoWk(7_!uG<^+yhD43#$2MYGrOTXqAlV# zU=gkmn;}mY(E0{;`J?g$xzBp#zrrw%KEimD(IU}8Mn54(IyKZ$K!Y0HB+TO`DHJoE x7g!}bN86@t!FX>{#6TY~u$J9bu})}^3b2uRYPd^Sr96`mc8Pw)8g^ecegh9pmpuRg literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/impl/GBNTReceiver$State.class b/hw2/out/production/hw2/impl/GBNTReceiver$State.class new file mode 100644 index 0000000000000000000000000000000000000000..37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U=k!2-9OBJXx zrg6GoPLp3WdQSh2{fZ5r)N`(hKQLO{#@H6d>5B2up#sk^5sM0t35&RBq!K2#qT0M2**o! dk7JgegZ!UyisNJafbZGGD*Yo|<`$n%{{_^i0eJub literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/impl/GBNTSender$State.class b/hw2/out/production/hw2/impl/GBNTSender$State.class new file mode 100644 index 0000000000000000000000000000000000000000..c436a1408ff3764c2172be74c9bc5473eef9a200 GIT binary patch literal 1079 zcmZ`%ZEq4m5PlX84z35(D}Ar;sJv)twbdF(LyK5R2$&otA%5vWPrT+h%yIO0DNU@= zX!_Y7Wt?4zrCRQiot>R$W}atve*OOT6Tl8$h9M!N;4z-aSdg)iTeOXS-|RCiR;=zvJA1HSt?Q<9Y`O`7 z%Q47$srss1J)m8&QqxDfL}RaVSkf7m-c3ymo*MRm*Ir4crlX`{@0jSsDwbnb2i=zG z){T};C$dPdy=TZID<{UOk+lt{lhr-fayq%x)V5ls*EZ~i;aa@TxR~S^U8<@5Ux*=? zw;apcWmveTPdU|Kkh~8T=?Lpq$1%KtOO^ad9th>z_Bc5;QM%*|y7?&tcj-zMy*F^% z=4*@Vj9uROI+saRt7hMO)9ZUOwpGmYr(RI;94{E=uYDyItJqO-2X|G(psASSOB@*l5A^a8{-20p81vrjb_F( ze{7jj655b7B&7|ZZA=>=NrS^u3a%wDP#_y=NSe^3A!|$akd!P z$1?UYmuF;n!09M*9Az3OC}n5lZ-95%aqA{a+Yo<^BIr zs#?Q57e#6aOP9~zwM2vVRNf9?f1wO+Wp;p&5;W>-MnQL;;dtz%~2nhOL~95~_u zONgS?4YY@~KUZ*uT(~sCnsheptX1&0FWJSj#d9fQtL;l??SazRe!DPa?a#0$+LudO znO#;PEp4we;Ebd-${89b%IM)j+OapLhkLTAw3QX>aI^Nk8{>MLlwBkq-`ZN6BkXfwPH{WT0_Mc~^$)wnWqta!J5#i)68$ zLE}{-*UgN!hY+2-p?Z6JmymwJ{YM;|a6%dH2*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)^?8{{sy$8ygho(0Em@EH$`2^^tph7L&M zD77Sdaf~3mEdD{1r@+&;V(#S=3jF=R72%3;y~7pfI+jc1Um#My~2*vvuk~N9DL^(mauHiPZ`oOOo|L+km zLH`kCiJD~GQ^*n3z}NIX#k(n1@)RFnfO`Z_*wG9dcAA=QT!?mtXn9&j5qpJT=D;yVFIDm-u;>{7RDDg(Q&Qp${@E_h9x4QrU literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/FileSender.class b/hw2/out/production/hw2/transport/FileSender.class new file mode 100644 index 0000000000000000000000000000000000000000..b8a03dffc1d47781dcda01f7362301e53ce8dfee GIT binary patch literal 2210 zcmZ`)+iw(A82`=Q&hG5=O1C%#bh+tvxfBX4u&f2za#<|}X+dkfFx{P&f$i)vGc8no z(g$BOkwhPS@Dd&%#`u5_3ju@1_@Xh!MBkLef5XI3e`j{-Zfl+7+`elFH zdUWprfCG3-#S=KD;y6wSoK$fHd4cCtgz>zJ5uB27mk)@BXM=6-5& z)5q|S@Ep0EuA4)Mh5a9S897SA&<}nInXOP(4HLjE9hv_8!8#D zTQ_+?nry`1h@EN&6|^o3qprj7)~rHF4U2JgFDHAU@|f_hl}_Z+1GL#P<{5>{r;Li9 z7lDHU7X%D}lmc~$17=DcE6+IvQznT?ZscmG+*(%H)R-Ijrbdwq^05S>8VR*!CNM()jT(8Fqo0>`L`E9joE9EIM7&J0|@0Qs zN1|9_sbP8bx_n&Q^!oDbjuwlK>9Rm#Gp0AVFv{2!q*ueP;jGXjmMD~M+YftPD!=-n zyu@8KAj&)HVD*~upN9~yI}0(KnjGw9%psTW3X!wcP#vMZv zq82T8$)Tpyj4imH$@&a3txGQjAVv#B&P%EaDO(Gj>vf?oEH7rNM|rBbWugy`_d)?15z-CF!vSF32dMU$$Wb?DJ5I%T)!_Sfj@OjOZ* zo8e!kvrVu1K^FA$chN+Q^Ry@O?mO_<`1b#7_Le?EHpZ_??#j#9klu2C;4uYZG-^ z@FDvxY^}6AL`zRYrS%*=O7VC4KJ|LJtI=YZcDHeN8@?dQ4*K4Y8^qX*AbtLXNIMwa zVSGfq%{)Df53rlE2%~t9XZJubmbdA}K13Nw0U7GW$i_qd`wwyq;16V}tKbkj(+yssYgau*(ae<@2Beb(F|Hh`kBGuLZI}RFXr$rS3 Sd4wo~Y$0N|vkh?`!0^9mz4#&k literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/MyTimer.class b/hw2/out/production/hw2/transport/MyTimer.class new file mode 100644 index 0000000000000000000000000000000000000000..e1da106fd4ecc73726ead9d76096efefec4deaa1 GIT binary patch literal 2987 zcmaJ@?N=0482=4B?6AWif&!WfzMw6;C_$tazN8?zxR429Xm7(Z!N@YR&CFtC@0q>7 zQ)zYj(1-Y%l~{RBb@D^!__>dD`UCn4@>uk{JHzg9jLx39bMJGXm*4Mso_lAn{qy|~ z0CwXO6;0@ip%F(Eq*X-xMZb^?D7aUJf}>)%PYlOY3}Q%V-7kh=1;=Apfd^C$BSLaQ zxH~Ck4~p4CVt80A9}#+ws`RQ?q8FnIGBNrZt0jsF6(&w8m{gEeFeO2mvMtlI9SODR zQ~I>tmesBCwtGiU85ysO+j_<`ZObig=RGsqHq1@i;dX4$9Jh2Y?-&x=eEX2Xp0wxa zmYcI3uWc|hVT|Ro#@K;^!>)a_jtb|~G?h+pvBxBkeG=;8Hv?%ImLPZAW7Mrqo0c(< zpBgosA$>GUNp0HB=-FZ2F~vF%%HD)Y)T=@e`e%mBDMP@Pr*)^@e{~d@6^IW_IEFqZ zR9w%_Nr=Qn=n6MLFJVJGSf+3Cw7C5@(piW&1|MQ`jv$JgwmwJgeb3f#P|*py5R^dl6?fyo56v&S95^ zz1XMWWia8ZO3huQso@p8N`wb(+jAK**Kc?e_Ly58#cLIKUBerAQ^8vr-o`r;YD%Dj zL@Xia9~pL2DbTUJW%(`ISQ4fz&v2Z4&NIe}KqNGjoG)prCBWI7_G#Z?L->#^#_1B( zjk$)`qZ>Tdta1E=5S6>0?y#NwIu%MWIOBQ-kAF=j?>L6#iJ<*vHY?5ydtNlEYd*=M zbHN^s8CheBY6s}0E}m)$HBIrVkUjbk2c&P=o)uuKP0KYL?@-BMeV9w&E+tf>mhG93 z&F~g7-9uA3k2AvIT_K;=O(K!wg(DYr$W~k1IFqCFo*8~E^h{IG6~WevC4H|z@4GXN5jEHNCK$r=BlelnyVlrWr=z(u#7 z%?_HL!TaT730rUC_g~l~gbvRVC;px zjw)nSA_fhsQH8bq^lnBqqpf6w8f>SAkE<0s(8d*`;Wp|>d{nffgWfjbc60`qI=Pmp z6-`7KzZ6ZS9E?$px`J2D*9yFD!X4Ndc=(Pi73!wGMde0)mmJv{t&1kULHRti&(SDm zbjYQE6`BH?egED@N+&lg7iB)>p)AgMn-$BLA(BEObW ze+!c({zX<1SQC>MXZn&{w=?EqmzA-@+9?;E(orl#M^Fd>mj4fLpiGKiXR#!77rX9v z+Q`C+xm}Y^{sQ?T!IX{k|D5~|YbCT^okPVy>(%W)&Mo|r{tD}o-(x*6j|~@TSHr&N ziceGF4W5T)+`?$hg?BjVJ&b&a`@P&v(XtN>IKphDsoBqR43NRmBBOHp^V?`EPgoBv z#o1WoCKzp@zZ-}t=v|<%XbxaTj(2NeQ|u#)1~rtl%(DxJ*YJU$?7gX;>e IALBFrFSJjsg#Z8m literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/Receiver.class b/hw2/out/production/hw2/transport/Receiver.class new file mode 100644 index 0000000000000000000000000000000000000000..19e743b4dafe8196078bec3e331fc6b164a8be2a GIT binary patch literal 1712 zcmaJ?&r=(96#sn5CYyu=S|Al#wk~QFf+o^X3W3HJY;7vERTvyZhi;N3*}CjzHVYAt zju#IOXFK-dIK!ovI#OpGM`!fr-{94YcP|}A{Cu+s*m1@~zVFBPz0dc(&wD%h?e8Cc z0x*r+arEM13_ZxnV^SWM;>ci1YL}%pEsvQP@|cZcE{-cGsCXlat17Okm>1}6dX{fF z)eXb8-KJR)5bq1bz4FdRX?t_i^aQ%r8Q1c-o0|>OXGpQ_uuZ4x*90PSmSgz^fzasK zs(`ZKR!m|qT8?>pd#hx6D@Mttr*F|M8}_QJxea@jY^A1xX6HhTQ}$7QqbTdu=5)QV|K z++#2nD=b=8)p0%9y}o$g*fFxU;Z(Cl$2UE1yY8EnV-QvpF75gz!6F?xA^{C57F4`R zW|rM;uWa71WXH))D;bHKz;hT(;1o_L(1-p6&LEY*b?F7SUMs|S^2RJ@(QB9;Ws|9?9IM(2S{8#qs7&*4hs zb?bxxy;);FoyU2r`>t-(>$X)kB)J(~Uv{?`VEBfZIN~rTb=?+tz>LTB&(%Ggu|1X;{3BIj(PQ?q0KP4kXZ@0a@N{_~sTDlk5qk zg6Udr_O8d~mVM7Owm8z@iD%v1inyl$_ zNzSt+Ibq5Wgd9E3AzDSo3CjNT_Yi620A1IOd;Sbqn2|8?y;8R9^ zj+gKSF0`naWV;tgfX-Y=)?S+wsf`d^?+XJcTx-5JgT= zklX>hj8~{hLT8Du@}{OeK+m^`^~Il{dmroRwY>6+Z1Kxul0#GBRG5UGp*xfckEg=J zlFKl;{4*VrG-_=I_mRwpC0LSRL&~rF=*~wdhax{eW_1JnZtt|}_y8Mxdjpl03>ci} zo&jmrI?l~|jnP>$@j83V(KE?Eg&YdFOctkc6Enn`BU&EsU>0k{2Ws5_ literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/ScheduledAction.class b/hw2/out/production/hw2/transport/ScheduledAction.class new file mode 100644 index 0000000000000000000000000000000000000000..5d54c05c630b1cd0e289bb192f24972a6bb44759 GIT binary patch literal 462 zcmZ`#-AV#M7(KJQx@nu5*^f!&r7o02H$f3Z(1l1{C_oQA7^A1vuEtVBf`oi@Jbg^h^neu0UP}M#qsry=M{` z&7b4MbOvn4skvFTE=ju5kv7)?N3HI^wDyq3xAB<9<(`hzeL5SdWFSW&E7e{c$Z#kV zo#o#}$4vBGpz+7DA57FZ4b}K(wzH7Q8J+o@3l#ftngr@jXQs6^_UTkEq=zC7J>=nf z*g%0F`~BA%U!amHI-!i7IuE0%3XFi=Y7f!mwsKsd#Y-n5GBYB##sQl|kJ%$^GJ&%H z3gI6wVfiOZ*e@(u*dkU}ZI_tI3n)=sV!cTrWjqzWS+vbDVii@%vl;I&vrzj2;5%TS literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/Sender.class b/hw2/out/production/hw2/transport/Sender.class new file mode 100644 index 0000000000000000000000000000000000000000..034b815fe2d1f5be4054f62c3e0a4d8fc50168ab GIT binary patch literal 846 zcmZ9J&2G~`6ot>&PD~uP2`RKd6QKMiE)W&6K%zpT2&70YEK+qr7szpj;?}hz+iBrd zcmXzSkf2B`cmUpqEpWyTN$A2e_ujew=A1h}e}Df0;34i>FtJiX5!WnS#|?|oO%>fT zaoa>wppwXN;D>v!-5`jL8Z5-6_wp`Sh$(3`Ct0pn>jknG*`L-}HK*q8CP+YeZ& zZAP9O?6|S7@^R5f-};F4gUCC`=>m2vlhL7^NrOz6DhL$3AWEp& z>P4g2lh1u+pqw|~+joy#8y3no&Y)z%v9YR>25L6$pe#^5?M7f>TH5|+Rp7E>wF5WY zYj?v`#_?#F%E3f9Nz;ax{e9`Bbbjpm+)81T`fuJp2?Aq&Nm3h_zLYaGYxZG=b>{g!{C1K=a@*unY7IB`Lrnp$*r{e-+BU5-Wiv%vA zgXM{%4$qXMqND%k#>yy5D3CC9QXJpeL487)&P2_FJ_@I2vP?>yGil6_tej*R>ai)2 OFG!-A{1vVmuKooy2#rGk literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/TimeoutAction.class b/hw2/out/production/hw2/transport/TimeoutAction.class new file mode 100644 index 0000000000000000000000000000000000000000..917afe6b7c42fed6807d458e42b4b4b651c01750 GIT binary patch literal 147 zcmX^0Z`VEs1_lcTPId-%b_Nbc2Huj)+|>Ni6366{%=|n?24)S-Fh&Nh;QZ2}5B}IvO#Rd6ACHg4Rj0^%G1^PLOdFlH8Nm;4MC2Wigj0{Xb WYZ(|AS%5Y$uz*+$tU!{9feio=&?Jcf literal 0 HcmV?d00001 diff --git a/hw2/out/production/hw2/transport/Transport.class b/hw2/out/production/hw2/transport/Transport.class new file mode 100644 index 0000000000000000000000000000000000000000..662c34fcf308f75b40215c0eecb8efa1cfa1de2d GIT binary patch literal 4597 zcmZ`+d0Z6t75@$_46Gw4o`@*kD~D8rNeU(n3N|PR5vrnTaoinXWtqX*S&v?6dMCY- zUP+VQm%Uq!ERCkxY8%@0Nbmc;o1XvlpY+q(@B7W{?w}|i-*0~Jz2E!2`~CK*|DC@G z;8y%AN^q(ix8TJBULxS70$wKIUdQYbMWdYqIivf*A@fM9G0)w z>3Dq<^KqYm`vtr~z#HZ0n{>Q6iY0i9fCmITDEGcqz}w{T+XeRyx$2$5|4qi} zCd?Z$_9>DurtL(Yv3$g`E!XrMS3{LAJ>w-)&3jEd;f#~J#ByCBY8_-qB-3%nwyn4~ zWTsNi2`fRuK{9#Caf?g~x;@vl(-V&CHTRqv5F|yErIKk+uE}4KGVPJ(fl=2o6Qo!6 zv>zDiYu~ZEb6}{y>tH8kc4?Tq!?DwzX?y$3RK{W;BXrQ*&OIGNy*r2c2ljTh_Y_~{ zKe}gI(oTA}YbcIw+@~S3!%0|_+MTqmJ(=+%mOEe`NfA@k?ZnO0KGRLgK0rpi(PUb~ zqLAhTIUA^(9@wj)Ce~H(eiuW~o=CV>I^EW#EhEEX%b^6 z!_=&e?FzflN4LktrZ!>Lc1ijc(jzz+aL^@j(~euIyu9VH8#0TyVmD*^7Tlb-An7!B z^%gA9F~!{57EcA)5$$&}v|(pba-kw01d-M|ho^XC^7 z5As@0eBMAOc4}C1gR0c9EKiY)@oP268xiohfb$0S;evrD@c3+^{JIs!FBrIpO9sB^ zpZk)5=i^Qd^9tefOG_e+TD@NIMY0DxrU{RNm{NSz7T0e z=)CQ*QD!DQD-mJ{`I4b=PWaa@iiIl9S5TEmB&O=LCLkBC%yk+`{AD5PbzR6{MfN-S z8mg7rpS=~So1}mP*(}Z*2$oBAGWM~lv)779K`jX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a/hw2/src/impl/GBNTReceiver.java +++ b/hw2/src/impl/GBNTReceiver.java @@ -17,8 +17,8 @@ import transport.TimeoutAction; public class GBNTReceiver extends Receiver implements TimeoutAction { private char sequence; - boolean firstPacket = true; - private static final int RECEIVER_TIMEOUT_MS = 5000; + private boolean firstPacket = true; + private static final int RECEIVER_TIMEOUT_MS = 15000; private State state = State.SETUP; enum State { @@ -85,18 +85,18 @@ public class GBNTReceiver extends Receiver implements TimeoutAction { } if (length < 3) return; char seq = readBigEndianChar(bytes, offset); - System.out.print("Read sequence: " + (int) seq + " -> "); + System.out.print("Read sequence: " + (int) seq + " Exp: " + (int) incrementAndRollover(sequence)+ " -> "); - if (seq != incrementAndRollover(sequence)) { - System.out.println("Dropping"); - return; - } //drop the packet - else { + if (seq == incrementAndRollover(sequence)) { this.deliver(bytes, offset + 2, length - 2); sequence = incrementAndRollover(sequence); - System.out.println("Sending ack: "+ (int) sequence); - this.unreliableSend(generateACK(sequence), 0, 2); + System.out.print("OK! "); + } else { + System.out.print("Drop "); } + + System.out.println("Sending ack: "+ (int) sequence); + this.unreliableSend(generateACK(sequence), 0, 2); break; } } diff --git a/hw2/src/impl/GBNTSender.java b/hw2/src/impl/GBNTSender.java index 7aa834d..00f69d3 100644 --- a/hw2/src/impl/GBNTSender.java +++ b/hw2/src/impl/GBNTSender.java @@ -48,11 +48,12 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { this.length = Math.min(length, MAX_PACKET_SIZE - 2); contents = new byte[this.length + 2]; writeBigEndianChar(contents, sequence); - System.arraycopy(buffer, offset + 2 - 2, contents, 2, contents.length - 2); + System.arraycopy(buffer, offset, contents, 2, contents.length - 2); packetMap.put(this.sequence, this); } void send() { + System.out.println("Sending seq: " + (int) sequence + " - (" + length + " + 2 bytes)"); estimateStart = System.currentTimeMillis(); unreliableSend(contents, 0, contents.length); } @@ -72,13 +73,23 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { char getSequence() { return sequence; } } - private static final char W = 10; + /** + * Change this parameter to change the window size + */ + private static final char W = 16; + private char base = (char) (new Random().nextInt() % 65536); private char waitingACK = 0; private int timeoutMs = 500; private double rttEWMA = 100; private double devRttEWMA = 100; + private void resetTimeoutEstimation() { + timeoutMs = 500; + rttEWMA = 100; + devRttEWMA = 100; + } + private State state = State.SETUP; private final Queue packets = new ArrayDeque<>(); @@ -92,7 +103,7 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { devRttEWMA = 0.75 * devRttEWMA + 0.25 * (rttEWMA - rttMIllis); rttEWMA = 0.875 * rttEWMA + 0.125 * rttMIllis; timeoutMs = (int) (rttEWMA + 4 * devRttEWMA); - //System.out.println("devRTT: " + devRttEWMA + " RTT: " + rttEWMA + " timeout: " + timeoutMs); + System.out.println("devRTT: " + devRttEWMA + " RTT: " + rttEWMA + " timeout: " + timeoutMs); } private void flushAckedPackets() { @@ -106,6 +117,7 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { private byte[] createSetupPacket() { byte[] packet = new byte[2]; + System.out.println("Sending setup: " + (int) base); writeBigEndianChar(packet, base); return packet; } @@ -116,6 +128,17 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { private void sendSetup() { unreliableSend(createSetupPacket(), 0, 2); blockSender(); + resetTimeout(); + } + + private boolean timeoutSet = false; + + private void resetTimeout() { + if (timeoutSet) cancelTimeout(this); + if (waitingACK > 0 || state == State.SETUP) { + this.setTimeout(timeoutMs, this); + timeoutSet = true; + } } @Override @@ -128,9 +151,9 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { Packet p = new Packet(addAndRollover(base, waitingACK), bytes, offset, length); waitingACK++; packets.add(p); - System.out.println("Sending seq: " + (int) p.sequence + " - (" + p.length + " + 2 bytes)"); + p.send(); - setTimeout(timeoutMs, this); + resetTimeout(); if (waitingACK >= W) { System.out.println("Window full " + (int) p.sequence); @@ -156,14 +179,28 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { } } + private volatile boolean abortTimeout = false; + @Override public void timeoutAction() { - if (state == State.SENDING) - for (Packet p : packets) { - p.send(); + abortTimeout = true; + timeoutActionImpl(); + } + + private synchronized void timeoutActionImpl() { + abortTimeout = false; + timeoutSet = false; + if (state != State.SETUP) { + for (Packet p : packets) { + p.send(); + if (abortTimeout) { + break; + } + } } - else if (state == State.SETUP) - sendSetup(); + else sendSetup(); + resetTimeoutEstimation(); + resetTimeout(); } @Override @@ -186,14 +223,14 @@ public class GBNTSender extends transport.Sender implements TimeoutAction { char ackSeq = readBigEndianChar(bytes, offset); System.out.println("Received ACK: " + (int) ackSeq); - cancelTimeout(this); Packet p = packetMap.get(ackSeq); if (p != null) computeTimeoutLength(p.getRTT()); - boolean mustResume = waitingACK == W && state == State.SENDING; + boolean mustResume = waitingACK < W && state == State.SENDING; waitingACK -= (ackSeq + 1 - base); base = incrementAndRollover(ackSeq); + resetTimeout(); flushAckedPackets(); if (mustResume || (waitingACK == 0 && state == State.CLOSING)) {