Arthur Maximov
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 2022: Компьютерные системы и сети. Материалы к лекциям. [TOC] ## WebRTC https://blog.logrocket.com/webrtc-over-websocket-in-node-js/ ## MQTT Over Websockets Explained for Beginners https://youtu.be/EvUI4vRhF88 ## Tasks https://www.cs.cornell.edu/courses/cs4450/2019sp/lecture27-review.pdf ## Testing The Mathis Equation with iperf and tc https://netbeez.net/blog/packet-loss-round-trip-time-tcp/#:~:text=Testing%20The%20Mathis%20Equation%20with%20iperf%20and%20tc ## Puppeteer https://nitayneeman.com/posts/getting-to-know-puppeteer-using-practical-examples/ ## Алгоритмы маршрутизации https://ru.wikipedia.org/wiki/%D0%90%D0%BB%D0%B3%D0%BE%D1%80%D0%B8%D1%82%D0%BC%D1%8B_%D0%BC%D0%B0%D1%80%D1%88%D1%80%D1%83%D1%82%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D0%B8 ## Category:Routing algorithms https://en.wikipedia.org/wiki/Category:Routing_algorithms # New internet vision ## Named_data_networking https://en.wikipedia.org/wiki/Named_data_networking ## [New IP passages (excerpts from ICANN | New IP | October 2020 )](https://www.icann.org/en/system/files/files/octo-017-27oct20-en.pdf) ### Intelligent Operation Network (ION) It is suggested that future networks will apply artificial intelligence, machine learning, and neural networks to identify and locate malfunctions in the network. A comprehensive and deeply correlated analysis of measurements would be needed to allow the network to accurately pinpoint root causes of alarms and automatically invoke recovery mechanisms. Requirements: • “This capability in future networks enables the advanced intelligent operations described previously. The network requires instantaneous collection of network statistics with low latency.” • “The network will need to report network monitoring information to the intelligent control functionalities from diverse discrete events... Such information should be given a higher priority, as a need for extremely low latency is expected, at millisecond level.” ### Network and Computing Convergence (NCC) Networks may require multiple distributed network edge sites to interconnect and collaborate with each other to exploit the full potential of cloud computing. *Instead of the conventional client-server model, applications would be able to dynamically schedule computing tasks to corresponding computing nodes at different locations according to specific service requirements.* These networks are expected to support computing-aware network capabilities that can offer unified management, control, and operation in order to guarantee differentiated service experience with much higher granularity than what is available at present. Requirements: • “As networks and computing converge, future networks should support controllable in-time computing power allocation, including modelling, measuring, sensing, advertising and operation of computing power, with prescribed time limitations.” • “Future networks should also support joint network and computing resource scheduling.” • “Based on ubiquitous computing resources, every network node can become a resource provider. Flexible addressing capability is thus needed in order to optimally address computing sites and to avoid wasting network resources.” ### Industrial IoT with Cloudification (IIOT) It is anticipated that future industrial networks will move towards the close integration of all components of the manufacturing process: IoT sensors, robots, automated production lines, logistics, cloud computing resources and enterprise business systems. These developments are expected to result in the automatic operation and control of industrial processes without significant human intervention. Requirements: • “IoT systems contain many control subsystems that run at cycle times ranging from sub-ms to 10 ms.” • “It is a fundamental requirement for multiple-axis applications to have time synchronization in order to permit cooperation between various devices, sometimes remotely.” • “In order to recover the clock signal and reach precise time synchronization, the machine control, especially the motion control sub-system, requires very small jitter at sub-microsecond level, and such a small jitter is expected to have bounded limits under some critical situations.” • “IIoT systems demand high reliability and high security to avoid any potential risk of interrupting production. Specifically, the service availability requirement typically ranges from 99.9999% to 99.999999% for IIoT applications.” # Ссылка на экзаменационную задачу по PDV https://hackmd.io/@IvanVasil/Vasilevskiy # Пример расчетной экзаменационной задачи ## Ненадежные WebSockets В момент времени $t=0$ серверное приложение было соединено с 6 независимыми клиентскими приложениями по протоколу WebSockets: ![](https://i.imgur.com/wrSCPxE.png) Каждую минуту серверное приложение посылает сообщение клиентам и проверяет, какое количество клиентов у него находится. К сожалению, из-за состояния каналов связи, ограничений браузеров и серверов, вероятность отключения сокета между очередными сообщениями равна 1/2. Через некоторое время все сокеты были отключены: ![](https://i.imgur.com/NEc8wfJ.png) Распределенное клиент-серверное приложение считается работающим до тех пор, пока есть хотя бы одно работающее соединение. Такое поведение называется [плавной деградацией работы](https://en.wikipedia.org/wiki/Fault_tolerance#:~:text=The%20ability%20of%20maintaining%20functionality%20when%20portions%20of%20a%20system%20break%20down%20is%20referred%20to%20as%20graceful%20degradation.) клиент-серверной системы. **Найдите среднее время (в минутах) работы этого приложения** с точностью 2 знака после запятой. # Пример экзаменационной задачи на реализацию ## Модель ненадежных WebSockets Построить клиент-серверное приложение, используя протокол Websockets, моделирующее условия расчетной задачи и выполняющее эмпирическую оценку времени существования распределенного приложения. Для реализации можно воспользоваться в качестве шаблона приложением https://replit.com/join/byvoqjthld-arthmax [![](https://i.imgur.com/1ICWQIz.png)](https://replit.com/join/byvoqjthld-arthmax) ## Решение задачи " Ненадежные WebSockets" Среднее время в данном случае - математическое ожидание времени работы при всех возможных вариантах поведения. Случайной величиной здесь является величина $\widehat{T}$, принимающая значения из множества $\{ 1,2,3, ...\}$ - номера сообщения от сервера, и одновременно (по условию задачи)- это число минут в момент полной деградации системы. Пусть $p(t)=P(\widehat T = t)$ - вероятность полной деградации системы на $t$-той минуте. Тогда мы можем записать математическое ожидание $E(\widehat T)$ времени полной деградации как $$ E(\widehat T) = \sum_{t=1}^{\infty} t\cdot p(t) \, \, = \,\, 1\cdot P(\widehat T = 1) + 2 \cdot P(\widehat T = 2) + 3 \cdot P(\widehat T = 3) \,+ \,\,... \label{E1}\tag{1} $$ Легко показать, что $(\ref{E1})$ можно переписать в виде $(\ref{E2})$: $$ E(\widehat T) = P(\widehat T \ge 1) + P(\widehat T \ge 2) + P(\widehat T \ge 3) \,+ \,\,... \label{E2}\tag{2} $$ Здесь $P(\widehat T \ge t)$ - вероятность того, что полный отказ произойдет на $t$-той минуте или позже. Вероятность того, что какой-то конкретный сокет дожил до окончания $t$-той минуты: $$ p_s(t) = (1/2)^t, $$ а соответствующая вероятность, что он не дожил: $$ \bar p_s(t) = 1 - p_s(t) =1 - (1/2)^t, $$ Обозначим вероятность, что система прекратит свою работу до окончания $t-1$ минуты, то есть, что все 6 сокетов не дожили до начала $t$-той минуты, как $$ P(\widehat T \le t-1) $$ Тогда $$ P(\widehat T \le t-1)= (\bar p_s(t-1))^6 = \left(1 - (1/2)^{t-1}\right)^6, $$ поскольку отключения сокетов происходят независимо друг от друга. Зная, что $$ P(\widehat T \ge t) + P(\widehat T \le t-1)= 1, $$ получаем $$ P(\widehat T \ge t) = 1 - P(\widehat T \le t-1) = 1 - \left(1 - (1/2)^{t-1}\right)^6. \label{PgeT}\tag{3} $$ Раскрывая скобки $(\ref{PgeT})$, получаем $$ P(\widehat T \ge t) = 6 \left(\frac{1}{2} \right)^{t-1} -15 \left(\frac{1}{4} \right)^{t-1}+ 20 \left(\frac{1}{8} \right)^{t-1} -15 \left(\frac{1}{16} \right)^{t-1} +6 \left(\frac{1}{32} \right)^{t-1} - \left(\frac{1}{64} \right)^{t-1}. $$ Поскольку (см. $(\ref{E2})$): $$ E(\widehat T) = P(\widehat T \ge 1) + P(\widehat T \ge 2) + P(\widehat T \ge 3) \,+ \,\,... = \sum_{t=1}^\infty P(\widehat T \ge t), $$ получаем $$ E(\widehat T) = \Sigma_{t=1}^\infty \left[ 6 \left(\frac{1}{2} \right)^{t-1} -15 \left(\frac{1}{4} \right)^{t-1}+ 20 \left(\frac{1}{8} \right)^{t-1} -15 \left(\frac{1}{16} \right)^{t-1} +6 \left(\frac{1}{32} \right)^{t-1} - \left(\frac{1}{64} \right)^{t-1} \right] $$ $$ E(\widehat T) = 6 \Sigma_{t=1}^\infty \left(\frac{1}{2} \right)^{t-1} -15 \Sigma_{t=1}^\infty \left(\frac{1}{4} \right)^{t-1}+ 20 \Sigma_{t=1}^\infty \left(\frac{1}{8} \right)^{t-1} -15 \Sigma_{t=1}^\infty\left(\frac{1}{16} \right)^{t-1} +6 \Sigma_{t=1}^\infty \left(\frac{1}{32} \right)^{t-1} - \Sigma_{t=1}^\infty \left(\frac{1}{64} \right)^{t-1}. $$ И, используя формулу для суммы геометрической прогрессии, имеем $$ E(\widehat T) = 6 \frac{1}{1-1/2} -15 \frac{1}{1-1/4}+ 20 \frac{1}{1-1/8} -15 \frac{1}{1-1/16} +6 \frac{1}{1-1/32} - \frac{1}{1-1/64} \approx 4.03 \text{[минуты]}.\\ $$ ## Образец выравнивания многострочных формул $$a := x^2-y^3 \tag{a}$$ $$ \begin{array}{rcr} x+2y & = & -1 \\ -x+4y & = & 0 \\ \end{array} $$ $$ \left\{ \begin{array}{rcl} x+2y & = & -1 \\ -x+4y & = & 0 \\ \end{array} \right. $$ In equation $(2)$, we find the value of an interesting integral: $$ \begin{equation} \ddot{\underline{\mathbf{r}}} = \frac{d^2\underline{\mathbf{r}}}{dt^2} = 0 \end{equation} $$ Reference to label q is $\ref{q}$ $$ a := x^2-y^3 \label{a} $$ $$ a := x^2-y^3 \label{q}\tag{*} $$ Reference to label \ref{PgeT} is $\ref{PgeT}$ $$ \newcommand{\SES}[3]{ 0 \to #1 \to #2 \to #3 \to 0 } \SES{A}{B}{C} \\ \SES{C}{A}{B} \newcommand{\e}{ \varepsilon } \newcommand{\m}[9]{ \left[ \begin{matrix} #1 & #2 & #3 \\ #4 & #5 & #6 \\ #7 & #8 & #9 \end{matrix} \right] } $$ $$ \m{x }{0 }{0 } {y }{\e}{0 } {z }{0 }{\e}^{-1} = \frac{1}{x\varepsilon} \m{\e}{0}{0} {-y}{x}{0} {-z}{0}{x} = \m{1/x}{0}{0} {-\e^{-1}y/x}{\e^{-1}}{0} {-\e^{-1}z/x}{0}{\e^{-1}} $$ # Список литературы 1. High Performance Browser Networking, Ilya Grigorik, 2013, O'Reilly Media, Inc. 1. Kurose, J. F., & Ross, K. W. (2012). Computer Networking: A Top-Down Approach 1. Распределенные системы, Эндрю С. Таненбаум, Мартен ван Стин, 2021 1. Компьютерные сети, Таненбаум, Э., Шрага, В., 2009 1. Комп'ютерні мережі: принципи, технології, протоколи: навч. посібник для вузів. Укладач: Оліфер, В. Г., 2015 1. Безопасность сетей - Национальный Открытый Университет "ИНТУИТ" - 2016 - 571с. 1. Грегори Р. Эндрюс. Основы многопоточного, параллельного и распределенного программирования. – М.: Издательский дом «Вильямс», 2003 # Ресурсы 1. https://hpbn.co/ High Performance Browser Networking, Ilya Grigorik, online version 2. https://ebin.pub/9785970607084-9781543057386.html Распределенные системы, Эндрю С. Таненбаум, Мартен ван Стин 3. https://e.lanbook.com/book/100581 Безопасность сетей 4. http://www.parallel.ru – сервер Лаборатории Параллельных информационных технологий Научно-исследовательского вычислительного центра Московского государственного университета имени М.В.Ломоносова. 5. https://en.wikipedia.org/wiki/Transmission_Control_Protocol Transmission Control Protocol 6. https://replit.com/talk/learn/SocketIO-Tutorial-What-its-for-and-how-to-use/143781 Socket.IO Tutorial 7. https://en.wikipedia.org/wiki/WebSocket Протокол WebSocket 8. [TCP throughput calculator](https://www.switch.ch/fr/network/tools/tcp_throughput/?do+new+calculation=do+new+calculation) # Статьи [Keeping CALM: When Distributed Consistency Is Easy](https://cacm.acm.org/magazines/2020/9/246941-keeping-calm/fulltext) [The Macroscopic Behavior of the TCP Congestion Avoidance Algorithm. Mathis, 1998](https://www.cs.utexas.edu/users/lam/395t/papers/Mathis1998.pdf) [Distributed Solution of Large-Scale Linear Systems via Accelerated Projection-Based Consensus](https://arxiv.org/pdf/1708.01413.pdf) [Capacity Planning: A Revolutionary Approach for Tomorrow’s Digital Infrastructure ](https://www.cmg.org/wp-content/uploads/2013/10/CMG-Revolutionary_Capacity_Planning-PAPER.pdf) [Network_calculus](https://en.wikipedia.org/wiki/Network_calculus) [A Network Calculus with Effective Bandwidth](https://www.comm.utoronto.ca/~jorg/archive/papers/effenv-bw-v8-R2v2.pdf) [minplus playground](https://www.realtimeatwork.com/minplus-playground) [What’s the Difference? Efficient Set Reconciliation without Prior Context](https://www.ics.uci.edu/~eppstein/pubs/EppGooUye-SIGCOMM-11.pdf) [Approximate Distributed Set Reconciliation with Defined Accuracy. Dissertation](https://edoc.hu-berlin.de/bitstream/handle/18452/22105/dissertation_kruber_nico.pdf?sequence=5) [String Reconciliation in Ditributed System](https://github.com/String-Reconciliation-Ditributed-System/cpisync) https://en.wikipedia.org/wiki/Cheeger_constant_(graph_theory) https://en.wikipedia.org/wiki/Conductance_(graph)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully