5.2.2 Software and Application Programming Interface
Software refers to the programs, consisting of sequences of instructions, which are executed by a computer. Software is commonly categorized as application programs or systems software.
An applications program, commonly referred to as an application, is a program that performs a specific function or functions for a user. Examples of applications are e-mail programs, word processing/presentation programs, web browsers, image display, and speech recognition programs.
System software is designed to run on computer hardware and as a platform for other software. It refers to the files and programs that make up the computer’s operating system (OS), such as Microsoft Windows, Mac OS, and Linux Ubuntu. System files contain libraries of system services, functions, device drivers, system preferences, and many other configuration files. The system software is the interface between the hardware and specific user applications to manage memory, input/output devices, internal and peripheral devices, system performance, and error messages. Driver software makes it possible for connected components to perform their intended tasks as directed by the OS. Such components include a keyboard, mouse, display card, network card, and soundcard. Firmware is operational software embedded within a memory chip for the OS to identify and run commands to manage and control activities of any single hardware component. The most important firmware is the BIOS (Basic Input/Output System) or UEFI (Unified Extended Firmware Interface) on a motherboard. This loads first as a computer is powered up to wake up all hardware (processor, memory, disk drives) and to run the bootloader to install the OS.
Programming language translators are intermediate programs called compilers, assemblers, and interpreters. They allow software programmers to translate high-level language source code that humans can understand, such as Java, C+ +, and Python, into machine-language code that computer processors can understand. Machine code is written in a number system of base 2, with either a 0 or a 1 representing an “onoff” switch called a “bit” at a computer memory location, and typically sequenced in 8-bit chunks called a byte. A word is the largest unit of data that can be addressed on memory (i.e., register size). Expressed in bits, the size of word with which a processor can handle data in average consumer laptop computers today is 32 to 64 bits.
Utility software is a type of system software that sits between the OS and application software and is intended for computer diagnostic and maintenance tasks. Examples include anti-virus, disk partition, file compression/defragmentation, and firewall algorithms to ensure optimal function and security of the computer.
System services and libraries are a specific API to provide access to tools and resources in an OS that enables developers to create software applications by specifying how software components can access and leverage aspects of the OS. An API defines the correct way to request services from an OS or other application and expose data within different contexts and across different channels. Private APIs have specifications for a specific company’s products and services that are not shared, public or open APIs can be used by any third party without restrictions, and partner APIs are used by specific parties that have a sharing agreement. They are also classified as local, web, or program APIs. Local APIs offer OS services to application programs to provide database access, memory management, security, and network services. An example is the Microsoft.NET framework. Web APIs are designed to represent resources like HTML pages and addressed using the HTTP protocol; thus, any web URL activates a web API. Web APIs are often called REST or RESTful because the publisher of the REST interface does not save data internally between requests. This allows many users to request information independently and intermingled, similar
as they are on the Internet. Simple programming tools or even no programming at all can be used for data access using the REST model. When APIs need to communicate between different nodes on a network, a mechanism called a Remote Procedure Call (RPC) can be employed, as well. Modern Operating Systems provide a rich set of remotely accessible system services. An extension to provide security and fully distributed software components is part of a broader Service Oriented Architecture (SOA). SOA refers to architectures designed with a focus on services. Begun in the 1990s, the classic approach of SOA architectures was based upon complex services to build complex systems. SOA has evolved to encompass microservices, which represent a more recent subset by implementing applications as a set of simple independently deployable services using modern JavaScript. Web services and RESTful interfaces are also under the umbrella of SOA.
5.2.3 Networks and Gateways
Computer networks permit the transfer of information between computers, allowing computers to enable services such as the electronic transmission of messages (e-mail), transfer of computer files, and use of distant computers. Networks, based upon the distances they span and degree of interconnectivity, may be described as local area networks (LANs) or wide area networks (WANs). A LAN connects computers within a department, a building such as a medical center, and perhaps neighboring buildings, whereas a WAN connects computers at large distances from each other. Most WANs today consist of multiple LANs connected by medium or long-distance communication links. The largest WAN in aggregate is the Internet itself.
Networks have both hardware and software components. A connection must exist between computers so that they can exchange information. Common connections include coaxial cable, copper wiring, optical fiber cables, and electronic connections such as radio wave and microwave communication systems used by Bluetooth and Wi-Fi communication links. Optical fiber cables have several advantages over cables or wiring carrying electrical signals, particularly with long-distance connections, including no electrical interference, lower error rates, greater transmission distances without the need for repeaters to read and retransmit the signals, and highest transmission rates. The benefit of wireless communication systems such as Wi-Fi is the freedom from hard-wired connections, although transmission rates are typically lower than a direct connection. Software components are also required between the user application program and the hardware of the communications link, necessitating network protocols for communication and provision of services. Both hardware and software must comply with established protocols to achieve successful transfer of information.
In most networks, multiple computers share communication pathways. Network protocols facilitate this sharing by dividing the information to be transmitted into
packets. Some protocols permit packets of variable size, whereas others permit only packets of a fixed size. Each packet has a header containing information identifying its destination. Large networks usually employ switching devices to forward packets between network segments or even between entire networks. Each device on a network, whether a computer or switching device, is called a
node, and the communications pathways between them are called
links. Each computer is connected to a network by a network adapter, also called a network interface, installed on the I/O bus of the computer, or incorporated on the motherboard. Each interface between a node and a network is identified by a unique number called a
network address. A desktop computer usually has only a single interface, but a server generally has
multiple interfaces to facilitate redundancy and throughput management. A switching device connecting two or more networks may have an address on each network.
The maximal data transfer rate of a link or a connection is called the bandwidth, a term originally used to describe the data transfer capacities of analog communications channels. An actual network may not achieve its full nominal bandwidth because of overhead or inefficiencies in its implementation. The term throughput is commonly used to describe the maximal data transfer rate that is achieved. Bandwidth and throughput are usually described in units of megabits per second (106 bps = 1 Mbps) or gigabits per second (109 bps = 1 Gbps). These units should not be confused with megabytes per second (MBps) and gigabytes per second (GBps)—recall that a byte consists of eight bits. Note that the raw network bandwidth must also accommodate overhead from various protocols (packet framing, addressing, etc.) so the actual delivered data bandwidth will be lower than network bandwidth. The former is sometimes referred to as “payload capacity” and involves many other factors beyond basic network architecture.
The latency is the time delay of a transmission between two nodes. In a packetswitching network (a network that groups data into packets that contain a header to define the destination and a payload that carries the information), it is the time required for a small packet to be transferred. It is determined by factors such as the total lengths of the links between the two nodes, the speeds of the signals, and the delays caused by any intermediate repeaters and packet switching devices.
Networks are commonly designed in layers, each layer following a specific protocol.
Figure 5-1 shows the International Standards Organization (ISO) Open Systems Interconnection (OSI) model of a network consisting of seven layers. Each layer in the OSI stack provides a service to the layer above. The top layer in the stack is the Application Layer (Layer 7 in
Fig. 5-1). Application programs, commonly called
applications, function at this layer. Applications are programs that perform useful tasks and are distinguished from systems software, such as an OS. On a workstation, applications include the programs, such as an e-mail program, word processing program, web browser, or a program for displaying medical images, with which the user directly interacts. On a server, an application is a program providing a service to other computers on the network. The purpose of a computer network is to allow applications on different computers to exchange information.
Network communications begin at the Application Layer. The application passes the information to be transmitted to the next lower layer in the stack. The information is passed from layer to layer, with each layer adding information, such as addresses and error-detection information, until it reaches the Physical Layer (Layer 1 in
Fig. 5-1). The Physical Layer sends the information to the destination computer, where it is passed up the layer stack to the application layer of the destination computer or
device. As the information is passed up the layer stack, each layer removes the information appended by the corresponding layer on the sending computer until the information sent by the application on the sending device is delivered to the intended application on the receiving device.
The lower network layers (Layers 1 and 2 in
Fig. 5-1) are responsible for the transmission of packets from one node to another over a LAN or point-to-point link and enable computers or devices with dissimilar hardware and OSs to be physically connected. As shown in
Figure 5-2, the Physical Layer transmits physical signals over a communication channel (
e.g., the copper wiring, optical fiber cable, or radio link connecting nodes) using a protocol that describes the signals (
e.g., voltages, near-infrared signals, or radio waves) sent between the nodes. Layer 2, the Data Link Layer, encapsulates the information received from the layer above into packets for transmission across the LAN or point-to-point link. The packets are transferred to Layer 1 for transmission using a protocol that describes the packet formats, functions such as media access control (determining when a node may transmit a packet on a LAN), and error checking of packets received over a LAN or point-to-point link. These tasks are usually implemented in hardware.
Between the lower layers in the protocol stack and the Application Layer are intermediate layers that mediate between applications and the network interface. These layers are usually implemented in software and incorporated in a computer’s OS. Many intermediate level protocols are available, their complexity depending upon the scope and complexity of the networks they are designed to serve.
LAN protocols are typically designed to permit the connection of computers over limited distances. On some small LANs, the computers are all directly connected and so only one computer can transmit at a time and usually only a single computer accepts the information. This places a practical limit on the number of computers and other devices that can be placed on a LAN without excessive network congestion. The congestion can be relieved by dividing the LAN into segments connected by packet switching devices, such as bridges, switches, and routers, that only transmit information intended for other segments.
The most used LAN protocols are the various forms of Ethernet. Before transmission over Ethernet, information to be transmitted is divided into packets, each with a header specifying the addresses of the transmitting and destination nodes. Ethernet is “contention-based”, meaning that a node ready to transmit a packet first “listens” to determine if another node is transmitting. If none is, it attempts to transmit. If two nodes inadvertently attempt to transmit at nearly the same moment, a collision occurs. Each node then ceases transmission, waits a randomly determined but traffic-dependent time interval, and again attempts to transmit. Media access defining collision control is important, particularly for heavily used networks.
Modern forms of Ethernet are configured in a star topology (
Fig. 5-3) with a switch as the central node. The switch does not broadcast the packets to all nodes. Instead, it stores each packet in memory, reads the address on the packet, and then forwards the packet only to the destination node. Thus, the switch permits several pairs of nodes to simultaneously communicate at the full bandwidth of the network. Fast Ethernet (100 Base-TX) permits data transfer rates up to 100 Mbps. More common are Gigabit Ethernet and Ten Gigabit Ethernet, which provide bandwidths of one and ten Gbps, respectively.
An extended LAN connects facilities, such as the various buildings of a medical center, over a larger area than can be served by a single LAN segment by connecting individual LAN segments. Links, sometimes called “backbones,” of high bandwidth media such as Gigabit or Ten Gigabit Ethernet, may be used to carry heavy information traffic between individual LAN segments.
For Wi-Fi, there are several standards that dictate theoretical and actual speeds of most current Wi-Fi networks, certified by the Institute for Electronics and Electrical Engineers (IEEE), with the 802.11 standard. Depending on network cards and connections, the lowest speed will dictate the overall throughput of connected systems. The 802.11ac standard, often referred to as Gigabit Wi-Fi, operates in the 5-GHz band. Future Wi-Fi standard implementation of 802.11ax (Wi-Fi 6) portends even greater speeds, with multiple streams of channels and a throughput of over 10 Gbps depending on the transmitter and receiver configurations. With the ubiquitous availability of cell phones and cellular networks and advances in the use of spectrum bands (those frequencies that are licensed by the cellular companies), a move to a fifth-generation (5G) mobile network is being introduced, to drastically increase the maximum speed of connections and decrease the latency over that of the common 4G mobile network. It is worth noting that 5 GHz Wi-Fi has nothing to do with 5G mobile networks.
WANs are formed by linking multiple LANs by devices called
routers as shown in
Figure 5-3A. Routers are specialized computers or switches designed to route packets among networks by performing packet switching, reading the packet information, determining the intended destinations, and, by following directions in routing tables, forwarding the packets toward their destinations. Each packet may be sent through several routers before reaching its destination. Routers communicate with each other to determine optimal routes for packets.
Routers follow a protocol that assigns each interface in the connected networks a unique network address distinct from its LAN address. Routers operate at the Network Layer (
Fig. 5-2) of the network protocol stack. The dominant routable protocol today is the IP, described below.
The Internet Protocol Suite, commonly called TCP/IP, is a packet-based suite of protocols used by many large networks and the Internet. TCP/IP permits information to be transmitted from one computer to another across a series of networks connected by routers. TCP/IP is specifically designed for internetworking, that is, linking separate networks that may use dissimilar lower-level protocols. TCP/IP operates at protocol layers above those of lower-layer protocols such as Ethernet. The two main protocols of TCP/IP are the
Transmission Control Protocol (TCP), operating at the Transport Layer and the
Internet Protocol (IP), operating at the Network Layer (Layers 4 and 3, respectively, in
Fig. 5-1). An enhancement to this basic model involves what is termed Layer 3 Switching, generally in the context of VLANs (Virtual LANs). Increasingly, VLANs are becoming the preferred model for PACS network architectures but are beyond the scope of this text (
Meraki, 2020).
Communication begins when an application passes information to the Transport Layer, along with information designating the destination computer and the application on the destination computer, which is to receive the information. The Transport Layer, following TCP, divides the information into packets, attaches to each packet a header containing information such as a packet sequence number and error-detection information, and passes the packets to the Network Layer. The Network Layer, following IP, may further subdivide the packets. The Network Layer adds a header to each packet containing information such as the source address and the destination address. The Network Layer then passes these packets to the Data Link Layer (Layer 2 in
Fig. 5-1) for transmission across the LAN or point-to-point link to which the computer is connected.
The Data Link Layer, following the protocol of the specific LAN or point-to-point link, encapsulates the IP packets into packets for transmission. Each packet is given another header containing information such as the LAN address of the destination computer. For example, if the lower level protocol is Ethernet, the Data Link Layer encapsulates each packet it receives from the Network Layer into an Ethernet packet. The Data Link Layer then passes the packets to the Physical Layer, where they are converted into electrical, infrared, or radio signals and transmitted.
Each computer and router is assigned an
IP address. Under IP Version 4 (IPv4), an IP address consists of a 32-bit number in dot-decimal notation consisting of four groups of 3 whole numbers, each separated by a period. Each group can have a value ranging from 0 to 255, making a theoretical maximum value of 255.255.255.255. In reality the actual maximum is 239.255.255.255 because certain groups of addresses are reserved for specific operational Internet functions. Each part represents a group of 8 bits of the address, thus permitting 2
32 or over 4 billion distinct addresses. The high order bits (two bytes) of the address represent the network prefix and the low-order bits (two bytes) identify the subnet and the individual computer or device on the network as illustrated in
Figure 5-4 (top). With the proliferation of Internet devices, IP version 6 (IPv6) uses a 128-bit number providing up to 2
128 or approximately 3.4 × 10
38 addresses, likely to be enough for the foreseeable future (
Fig. 5-4, bottom). Currently, these two versions of the IP are in simultaneous use; however, each version defines the format of the address differently. IP addresses typically refer to the addresses defined by IPv4, per current historical prevalence. IP addresses do not have meaning to the lower network layers. IP defines methods by which a sending computer determines, for the destination IP address, the next lower layer address, such as a LAN address, to which the packets are to be sent by the lower network layers.
IP is referred to as a “connectionless protocol” or a “best-effort protocol.” This means that the packets are routed across the networks to the destination computer following IP, but some may be lost on the way. IP does not guarantee delivery or even require verification of delivery. On the other hand, TCP is a connection-oriented protocol providing reliable delivery. Following TCP, Network Layer 4 of the sending computer initiates a dialog with Layer 4 of the destination computer, negotiating matters such as packet size as shown in
Figure 5-2. Layer 4 on the destination computer requests the retransmission of any missing or corrupted packets, places the packets in the correct order, recovers the information from the packets, and passes it up to the proper application.
The advantages of designing networks in layers should now be apparent. LANs conforming to a variety of protocols can be linked into a single internet by installing a router in each LAN and connecting the routers with point-to-point links. The point-to-point links between the LANs can also conform to multiple protocols. All that is necessary is that all computers and routers implement the same WAN protocols at the middle network layers. A LAN can be replaced by one conforming to another protocol without replacing the software in the OS that implements TCP/IP and without modifying application programs. A programmer developing an application need not be concerned with details of the lower network layers. TCP/IP can evolve without requiring changes to applications programs or LANs. Each network layer must conform to a standard in communicating with the layer above and the layer below.
A router performs packet switching that differs from switches that merely forward identical copies of received packets. On a LAN, the packets addressed to the router are those intended for transmission outside the LAN. The LAN destination address on a packet received by the router is that of the router itself.
The Internet (with a capital letter “I”) is an international network of networks using the TCP/IP protocol. A network using TCP/IP within a single company or organization is sometimes called an intranet. The Internet is not owned by any single company or nation. The main part of the Internet consists of national and international backbone networks, consisting mainly of fiber optic links connected by routers, provided by major telecommunications companies. These backbone networks are interconnected by routers. Large organizations can contract for connections from their networks directly to the backbone networks. Individual people and small organizations connect to the Internet by contracting with companies called Internet service providers (ISPs), which operate regional networks that are connected to the Internet backbone networks.
IP addresses, customarily written in dot-decimal format (e.g., 152.79.110.12), are inconvenient. Instead, host names, such as http://www.ucdmc.ucdavis.edu, are used to designate a specific computer attached to the network. The domain name system (DNS) is an Internet service consisting of servers that translate host names into IP addresses.
The Internet itself may be used to link geographically separated LANs into a WAN. Encryption and authentication can be used to create a virtual private network (VPN) within the Internet. However, a disadvantage to using the Internet to link LANs into a WAN was the historical inability of the Internet to guarantee a high quality of service. Disadvantages to the general public Internet today include lack of reliability, inability to guarantee required bandwidth, and inability to give critical traffic priority over less important traffic. For critical applications, such as PACS and teleradiology, quality of service is the major reason why “hard” leased lines were the prevailing mechanism used to link distant sites. Now it is possible to contract specifically for connectivity from major carriers defining specific Service Level Agreements (SLAs) and Quality of Service (QoS) as part of carrier-provided VPNs (
Fig. 5-3B). Older technologies such as hardware X.25, Frame Relay, or T1 have generally now been superseded (or encapsulated) by protocols such as MPLS (Multiprotocol Label Switching). MPLS defines the path between nodes rather than between explicit point-to-point endpoints.