How Computers Work [09]


How Email outtraces snail mail


  1. Using an email client, Jane creates a message to go to Bob. She also attaches a photo of herself for the company website, which is encoded using a standard algorithm, such as MIME, uuencode, or BINHEX. Just as easily, Jane could enclose a word processing document, spreadsheet, or program.

  2. The encoding turns the data making up the photograph into ASCII text, which computers commonly use for unformatted, simple text. The email software might also compress the enclosure before attaching it to the message so it takes less time to send.

  3. The client software contacts the Internet service provider’s computer server over a modem or network connection. The client software connects to a piece of software called an SMTP server, short for Simple Mail Transfer Protocol. The server acknowledges that it has been contacted, and the client tells the server it has a message to be sent to a certain address. The SMTP replies with a message saying either, “Send it now,” or “Too busy; send later.”

프로토콜(Protocol) - 응용프로그램 간(즉, 클라이언트와 데이터베이스 서버 간)의 데이터 전송 방식을 제어하는 규칙들의 집합을 네트워크 프로토콜이라고 한다. 네트워크 프로토콜은 네트워크를 통해 데이터를 전송할 때 사용하는 유형을 지정함. 네트워크 프로토콜의 예로는 TCP/IP, SMTP가 있다.

프로토콜은 두 가지로 이루어져 있으며 물리적 측면과 논리적 측면으로 나뉜다.

  • 물리적 측면: 자료 전송에 쓰이는 전송 매체, 접속용 단자 및 전송 신호, 회선 규격 등.
  • 논리적 측면: 프레임(Frame, 자료의 표현 형식 단위) 구성, 프레임 안에 있는 각 항목의 뜻과 기능, 자료 전송의 절차 등. 1. 폐쇄적인 프로토콜: 자사 장치들끼리 통신하기 위한 독자적인 통신 규약이며, 자세한 규격이 공개되어 있지 않아서 크래킹 위협에 상대적으로 안전하다. (보기: IBM의 SNA, SDLC 프로토콜) 2. 공개된 범용 프로토콜: 여러 장치들에 쓰이는 널리 알려진 규격이며, 규격이 널리 공개되어 있기 때문에 컴퓨터와 네트워크 크래킹에 취약한 편이다. (보기: 인터넷의 TCP/IP)
  1. The client sends the message to the SMTP server and asks for confirmation. The server confirms that it has received the message.

  2. The SMTP server asks another piece of software, a domain name server, how to route the message through the Internet. The domain name server looks up the domain name—the part of the address after the @ character—to locate the recipient’s email server. The domain name server tells the SMTP the best path for the message.

’@’ 문자 뒤에 주소의 일부인 도메인 이름을 조회하여받는 사람의 전자 메일 서버를 찾습니다. 도메인 이름 서버는 SMTP에 메시지의 가장 적합한 경로를 알려줌.

  1. After the SMTP sends the message, the email travels through various Internet routers. Routers decide which electronic pathway to send the email along based on how busy the routes are. The message might also pass through one or more gateways, which translate the data from one type of computer system—such as Windows, Unix, and Macintosh—to the type of computer system that’s the next pass-through point on the route.
  • 라우터는 경로가 얼마나 바쁜지에 따라 전자 메일을 보낼 전자 경로를 결정
  1. When the email arrives at Bob’s SMTP server, the server transfers the message to another server, usually of the POP (Post Office Protocol) or IMAP (Internet Message Access Protocol) variety. The email server holds the message until Bob asks for it.

POP, IMAP도 서버에서 돌아가고 있는 프로그램으로 생각해도 된다. 네이버 메일의 경우, 네이버 회사 데이터센터에서 운용되고 있는 서버에 구현되어 있을 것 같음(예상)

  1. Using his email client, Bob logs on to the email server with a username and password and then asks the server to check for mail.

  2. The email server retrieves Jane’s stored message and transmits it to Bob’s email client. Some email software decodes and decompresses any enclosures. Others make Bob use a utility program to expand and decode the attachment. Either way, Bob can now read Jane’s message and any attachments.

How Internet File Sharing Wroks

  • 네트워크 프로그래밍 위해서,


  1. A file-sharing program user logs on to one of several file-sharing servers (although many file-sharing programs have no central servers, in which case, consider the “server” shown here to be a virtual server that connects multiple user computers). The client software sends the server a list of files in the user’s library that other users can then search for and download—these files can be anything from MP3 songs to Microsoft Word documents or program files.

  2. The host posts the list in a database where other users can search it. The server lists the libraries for hundreds of users, but all files found in those libraries remain on the computers of the other users.

  • 데이터베이스?
  1. Another client enters a search term. This can be file metadata, such as a band name or movie director, or any other phrase you would expect to be associated with the file.
  • 메타데이터?
  1. The client looks at all the library records on the server and displays any titles that match at least some of the search criteria. The results include the names of the files, the type of Internet connection, Internet protocol (IP) addresses of other clients making those files available, and other assorted trivia.
  • 인터넷 프로토콜(IP) - IP 주소에 따라 다른 네트워크 간 패킷의 전송, 즉 경로 제어를 위한 규약으로 다른 네트워크 간의 데이터 전송을 가능하게 한다. 그러나 패킷이 발신된 순서대로 도착하는 것은 보증하지 않는다. 전송 제어 프로토콜(TCP) 또는 사용자 데이터그램 프로토콜(UDP)과 함께 사용한다. [네이버 지식백과] 인터넷 프로토콜 [Internet Protocol] (IT용어사전, 한국정보통신기술협회)
  1. The user selects one or more of the files for transfer. His client software sends a message to the other client using its IP address. The message asks permission to download the song, and the remote client obliges by becoming a server and sending the file to the computer that asked for it.

  2. At the same time someone is downloading a file, other users are finding songs on that person’s hard drive and are downloading them. Several uploads/downloads can run simultaneously by taking turns sharing the Internet connections.


  1. Cloud storage has two parts. The first—the front end—is you or other computer users, all called clients, working at their PCs. Every time a client saves or opens a file, the request is passed to the back end—an elaborate system that makes up the electronic clouds. Because the client’s files are saved in a cloud, the client does not have to be at an office or personal computer to retrieve them. With correct usernames and passwords, clients may retrieve their files on other computers, tablets, and smartphones to share them with others through a service such as Dropbox, Google Drive, or OneDrive.
  • front end - client
  • back end - server

구글드라이브를 통해 파일을 클라우드에 저장 해 두면, server를 통해 물리적인 기기에 제한 없이 자신의 파일에 접근 할 수 있다.

  1. The client’s request first goes to a central server, a computer responsible for managing all the traffic coming from hundreds or thousands of clients. To make sure all client requests are handled properly, the central server follows a set of rules, called protocols, written to ensure there are no gaps, contradictions, or impossibilities embedded in the client request.

다수의 클라이언트 - 하나의 서버(사실, 여러 개 일 수도)

  1. After the request passes the central server’s inspection, the server uses middleware software, so called because its digital turf lies between the clients and the legions of file servers whose purpose is to be repositories of whatever a client creates. With the demand for storage space so large and so immediate, a dedicated server for each client is impractical and, as we’ll see, not a good idea. But the middleware lets the storage system act as if the client does have a direct path to a dedicated, single-client server.

이후는 그냥 읽어보자, 아~ 이런게 있구나~

  1. At the same time the middleware pulls a trick on the numerous high-powered computers that make up the cloud—also called server farms—where the stored file resides. Because most of the servers are not running at full capacity, the central server uses empty storage space and otherwise idle processor time to create virtual computers. Each virtual computer operates as though it were the only computer on the farm. A neat juggling act of timing lets each virtual computer have its opportunity to send and receive information and get access to the server’s hard drives in the times when the other virtual servers are at rest.

  2. When the central server receives a request from a client to save a file, it may first encrypt the file to deter hackers who would break into the server’s farm to steal sensitive information. Then the central server consults a record of traffic and storage use among the hundreds of servers at more than one farm location. (Google is estimated to have 1 million servers.) A reputable cloud has twice the number of servers needed to store all of its clients’ file. In case of server malfunction, the cloud stores all of its data in more than one place and in more than one physical location. Doubling the number of servers and keeping copies—and sometimes copies of previous versions of a file—is referred to as redundancy.

  • 같은 파일을 저장하는 동일한 서버가 두 개 이상 있다.
  1. In case of a major catastrophe, parts of the file may be distributed among several servers, making it more difficult for a file to be totally eradicated. Such a strategy was part of the original impetus for the Internet among the U.S. military, which wanted a redundant system of information in case some computer centers were taken out in a nuclear war. The system has also been cited as a way to ensure the distribution of information among insurgents otherwise censored by a repressive government.