An introduction to network programming, explaining what it is, the key players involved (servers and clients), the role of protocols, and why network programming is important. It also covers creating network applications, network application architectures (client-server, p2p, and hybrid), processes communication, sockets, and addressing processes. Additionally, it touches upon application layer protocols and internet transport protocols.
(^) Java supports network programming from the earliest
release in a platform-independent way. (“the language of
the Internet”)
(^) New Java networking APIs provide high-level object
models and function libraries that hide most of the low-
level details
TCP/IP Suite
Creating a Network Application
(^) write programs that
(^) run on (different) end systems
(^) communicate over network
(^) e.g., web server software communicates with browser software
(^) No need to write software for
network-core devices
(^) Network-core devices do not run user applications applicatio n transport network data link physical applicatio n transport network data link physical applicatio n transport network data link physical
Client-Server Architecture
(^) server:
(^) always-on host
(^) permanent IP address
(^) server farms for scaling
(^) clients:
(^) communicate with server
(^) may be intermittently connected
(^) may have dynamic IP addresses
(^) do not communicate directly with each other client/server
Servers
(^) In a client/server network, the server runs a service, or
process, sometimes called a server daemon.
(^) Like most services, daemons typically run in the
background and are not under an end user's direct
control.
(^) When a daemon "hears" a request from a client, it
exchanges appropriate messages with the client, as
required by its protocol, and proceeds to send the
requested data to the client in the proper format
Hybrid of Client-Server and P2P
(^) Skype
(^) voice-over-IP P2P application
(^) centralized server: finding address of remote party:
(^) client-client connection: direct (not through server)