JAVA NETWORK PROGRMMING ( JAVA 网络编程)PART 1 Why networked java?(contd)

 

1.1 What Can a Network Program Do?(网络程序可以做什么

Networking adds a lot of power to simple programs. With networks, a single program can retrieve information stored in millions of computers located anywhere in the world. A single program can communicate with tens of millions of people. A single program can harness the power of many computers to work on one problem.

网络为简单的程序添加了许多的能量。使用网络, 一个简单的程序可以索引存储在位于世界任何角落的百万计
计算机上的信息。一个简单的程序可以和上千万的人交流,一个简单的程序可以联合许多的计算机的能量来解决一个问题(harness 套上挽具)

Network applications generally take one of several forms. The distinction you hear about most is between clients and servers. In the simplest case, clients retrieve data from a server and display it. More complex clients filter and reorganize data, repeatedly retrieve changing data, send data to other people and computers, and interact with peers in real time for chat, multiplayer games, or collaboration. Servers respond to requests for data. Simple servers merely look up some file and return it to the client, but more complex servers often do a lot of processing on the data before answering an involved question. Peer-to-peer applications such as Gnutella connect many computers, each of which acts as both a client and a server. And that's only the beginning. Let's look more closely at the possibilities that open up when you add networking to your programs.

网络应用程序一般是一些形式中的一种,您所听说做多的区别是在客户和服务器之间。最简单的情况,客户端从服务器索引数据然后现实出来, 复杂一些的客户端过滤并重新组织数据。重复的索引变换的数据。把数据发送到其他人和计算机, 并为聊天,多媒体播放器,合作与其他端实时交互。服务器响应数据请求,简单的服务器仅仅查找一些文件,并将他返回给客户。 但是复杂些的服务器经常在回答一个包含的问题前加工数据。端对端的应用象Gnutella 连接许多计算机,每一个同时扮演了客户端和服务器的角色。这仅仅是个开始,让我们更近的来观察下当您把网络功能添加到程序的时候所带来的可能。

1.1.1 Retrieve Data(索引数据)

At the most basic level, a network client retrieves data from a server. It can format the data for display to a user, store it in a local database, combine it with other data sources both local and remote, analyze it, or all of the above. Network clients written in Java can speak standard protocols like HTTP, FTP, or SMTP to communicate with existing servers written in a variety of languages. However, there are many clients for these protocols already and writing another one isn't so exciting. More importantly, programs can speak custom protocols designed for specific purposes, such as the one used to remotely control the High Resolution Airborne Wideband Camera (HAWC) on the Stratospheric Observatory for Infrared Astronomy (SOFIA). Figure 1-1 shows an early prototype of the HAWC controller.

在最基本的层面,一个网络客户端从服务器索引数据,它能够格式化数据来显示给用,存储数据到本地数据库。它配合其他本地或者远程的数据资源,分析它,或者所有上面的操作,java编写的网络客户端可以用http,ftp or smtp 这些标准协议和用多种语言编写的存在的数据服务器来交流。但是,已经有许多客户端程序是为这些协议而写的,再编写一个也不是那么的激动人心。 更重要的是,程序可以用为特殊目的而设计的自定义协议作为共同语言。比如Resolution Airborne Wideband Camera (HAWC) on the Stratospheric Observatory for Infrared Astronomy (SOFIA)figure1-1 显现了一个hawc 控制器的早期原型。

 

Figure 1-1. The HAWC controller prototype
figs/JNP3_0101.gif

 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值