{"id":2522,"date":"2008-12-19T23:53:33","date_gmt":"2008-12-19T21:53:33","guid":{"rendered":"http:\/\/vasil.ludost.net\/blog\/?p=2522"},"modified":"2008-12-19T23:53:33","modified_gmt":"2008-12-19T21:53:33","slug":"2008-12-19-update-protocol","status":"publish","type":"post","link":"https:\/\/vasil.ludost.net\/blog\/?p=2522","title":{"rendered":"2008-12-19 update protocol"},"content":{"rendered":"<p>At Venski&#8217;s birthday with Bachiyski we started an interesting conversation for a mass update of already deployed software (written in a scripting language, but that doesn&#8217;t matter that much). He wanted to lower his deployment time from his current 45 seconds, and I&#8217;m thinking about describing one of the ideas which I got, so Pentchev (who got in the discussion too) can find flaws.<\/p>\n<p>The  main principle is as follows &#8211; one server sends over multicast packets with the update (in diff form, for example), and the machines take it and apply it. It should work as follows:<\/p>\n<p>1. The main server sends one hello packet to the group, to say that an update follows.<br \/>\n2. It waits for a timeout T1 and if someone doesn&#8217;t answer (it has a list of the machines) resends.<br \/>\n3. Step 2 is repeated three times, if there&#8217;s a machine that doesn&#8217;t answer, it&#8217;s removed from the list and a notification is sent to the admins.<br \/>\n4. The update is sent, split in packets, and every packet:<br \/>\n4.1. Includes ID of the update (consecutive), and each client has a list of received updates.<br \/>\n4.2. A sequence number of the packet (to track packet loss)<br \/>\n4.3. A signature of the packet (md5sum of the content+shared secret)<br \/>\n4.4. A diff in some format.<br \/>\n5. Every client that has received the update:<br \/>\n5.1. Checks if that one is already applied and if yes, doesn&#8217;t apply it, just acknowledges it.<br \/>\n5.2. If there are gaps in it, doesn&#8217;t send an acknowledgment.<br \/>\n5.3. If the update is not consecutive after the previous one applied, doesn&#8217;t acknowledge it and sends a notification to the admins.<br \/>\n5.4. If the whole update was received, checks if it can be applied. If not &#8211; sends a notification and doesn&#8217;t acknowledge.<br \/>\n5.5. If the whole update was received and is applicable &#8211; it&#8217;s applied, noted and an acknowledgement is sent.<br \/>\n6. If the central server for timeout T2 doesn&#8217;t receive a notification from everyone, repeats step 4 three times. For those, from which an acknowledgement is not received, the admins are notified.<\/p>\n<p>The question is, does this protocol have any serious flaws and can it be implemented for a few days by a normal programmer (not a lazy bastard like me). Also, is there already such thing implemented :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At Venski&#8217;s birthday with Bachiyski we started an interesting conversation for a mass update of already deployed software (written in a scripting language, but that doesn&#8217;t matter that much). He wanted to lower his deployment time from his current 45 seconds, and I&#8217;m thinking about describing one of the ideas which I got, so Pentchev [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2522","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2522"}],"version-history":[{"count":0,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2522\/revisions"}],"wp:attachment":[{"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vasil.ludost.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}