Danh mục

Understanding the Internet as an Infrastructure

Số trang: 4      Loại file: pdf      Dung lượng: 39.17 KB      Lượt xem: 4      Lượt tải: 0    
Jamona

Hỗ trợ phí lưu trữ khi tải xuống: 1,000 VND Tải xuống file đầy đủ (4 trang) 0

Báo xấu

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Hiểu biết về Internet như là cơ sở hạ tầng một Bạn đã nghe tất cả các hype về Internet, và vì vậy không ai trong số đó sẽ được lặp đi lặp lại ở đây. Tuy nhiên, bạn nên xem xét một vài điểm. Internet là một mạng lưới lớn (alright-một mạng lưới thực sự lớn)
Nội dung trích xuất từ tài liệu:
Understanding the Internet as an Infrastructure Understanding the Internet as an InfrastructureYou have heard all the hype about the Internet, and so none of it will be repeated here.However, you should consider a few points. The Internet is a big network (alright—areally big network) and, as a result, the information and data that you can access over itcan be quite remote. This should have an impact on the way you design yourapplications. For example, you might get away with locking data in a database while auser browses it in a small, local desktop application, but this strategy will not be feasiblefor an application accessed over the Internet. Resource use impacts scalability much morefor the Internet than for local applications.Network bandwidth itself is also a scarce resource that should be used sparingly. Youmight notice variations in the performance of your own local network according to thetime of day (networks always seem to slow down on a Friday afternoon just when you aretrying to get everything done before the weekend), the applications that users in yourcompany are running, and many other factors. But, no matter how variable theperformance of your own local network is, the Internet is far more unpredictable. You aredependent on any number of servers routing your requests from your Web browser to thesite you are trying to access, and the replies can get passed back along an equally tortuousroute. The network protocols and data presentation mechanisms that underpin the Internetreflect the fact that networks can be (and at times most certainly will be) unreliable andthat an application running on a server can be accessed by a user running one of manydifferent Web browsers on one of many different operating systems.Understanding Web Server Requests and ResponsesA user gaining access to an application over the Internet by using a Web browser uses theHypertext Transfer Protocol (HTTP) to communicate with the application. Applicationsare usually hosted by some sort of Web server that reads HTTP requests and determineswhich application should be used to respond to the request. The term “application” in thissense is a very loose term—the Web server might invoke an executable program toperform an action, or it might process the request itself by using its own internal logic orother means. However the request is processed, the Web server will send a response tothe client, again by using HTTP. The content of an HTTP response is usually presentedas a Hypertext Markup Language (HTML) page; this is the language that most browsersunderstand and know how to display.NOTEApplications run by users that access other applications over the Internet are oftenreferred to as clients or client applications. The applications being accessed are usuallycalled servers or server applications.Managing StateHTTP is a connectionless protocol. This means that a request (or a response) is a stand-alone packet of data. A typical exchange between a client and an application running on aWeb server might involve several requests. For example, the user can display a page,enter data, click some buttons, and expect the display to change as a result, allowing theuser to enter more data, and so on. Each request sent by the client to the server is separatefrom any other requests sent both by this client and any other clients using the sameserver (and maybe running the same application) simultaneously. The problem is that aclient request often requires some sort of context or state.For example, consider the following common scenario. A Web application allows theuser to browse goods for sale. The user might want to buy several items, placing each onein a virtual shopping cart. A useful feature of such an application is the ability to displaythe current contents of the shopping cart.Where should the contents of the shopping cart (the clients state) be held? If thisinformation is held on the Web server, the Web server must be able to piece together thedifferent HTTP requests and determine which requests come from one client and whichcome from others. This is feasible, but might require additional processing to reconcileclient requests against state information and, of course, it would require some sort ofdatabase to persist that state information between client requests. A complication withthis technique is that the Web server has no guarantee; once the state information hasbeen preserved, the client might submit another request that uses or removes theinformation. If the Web server saved every bit of state information for every client thatused it, it could need a very big database indeed!An alternative is to store state information on the client machine. The Cookie Protocolwas developed to allow Web servers to cache information in cookies (small files) on theclient computer. The disadvantages of this approach are that the application has toarrange for the data in the cookie to be transmitted over the Web as part of every HTTPrequest so that the Web server can access it. The application also has to ensure thatcookies are of a limited size. Perhaps the most significant drawback of cookies is thatusers can disable them and prevent the Web browser from storing them on theircomputers, which will cause any attempt to save state information to fail.Understanding ASP.NETFrom the discussion in the previous section, you can see that a framework for buildingand running Web applications has a number of items that it should address. It must do thefollowing: • Support the standard HTTP • Manage client state efficiently • Provide tools allowing for the easy development of Web applications • Generate applications that can be accessed from any browser that supports HTML • Be responsive and scalableMicrosoft originally developed the Active Server Pages model in response to many ofthese issues ...

Tài liệu được xem nhiều: