1. Network Applications

  • Read and write data over network
  • Dominant model: bidirectional, reliable byte stream connection
    • One side reads what the other writes
    • Operates in both directions
    • Reliable (unless connection breaks)

Blow we will introduce three examples: the world wide web, BitTorrent and Skype

  • the world wide web: A client-server model. A client opens a connection to a server and requests documents. The server responds with the documents.
  • BitTorrent: A peer-to-peer model. Swarms of clients open connections to each other to exchange pieces of data, creating a dense network of connections.
  • Skype: A mix of the two models. When Skype clients can communicate directly, they do so in a peer-to-peer fashion. But sometimes the clients can’t open connections directly, and so instead go through rendezvous or relay servers.
Read more »

介绍线段树的原理、代码实现和相应例题。参考《算法竞赛入门经典 训练指南》等资料。

Read more »