Thursday, January 5, 2012

X server

The X window system (commonly X Window System or X11, based on its current major version being 11) is a computer software system and network protocol that provides a basis for graphical user interfaces (GUIs) and rich input device capability for networked computers. It creates a hardware abstraction layer where software is written to use a generalized set of commands, allowing for device independence and reuse of programs on any computer that implements X.

Purpose and abilities

X is an architecture-independent system for remote graphical user interfaces and rich input device capabilities which allows many people to share the processing power of a time-sharing computer and to collaborate with each other through client applications running on remote computers. Each person using a networked terminal has the ability to interact with the display with any type of user input device. Due to the ubiquity of support for

X software on Unix, Linux and Mac OS X, X is commonly used to run client applications on personal computers even when there is no need for time-sharing.

X provides windowing on computer displays and manages keyboard, pointing device control functions and touchscreens. In its standard distribution it is a complete, albeit simple, display and interface solution which delivers a standard toolkit and protocol stack for building graphical user interfaces on most Unix-like operating systems and OpenVMS, and has been ported to many other contemporary general purpose operating systems.

X provides the basic framework, or primitives, for building such GUI environments: drawing and moving windows on the display and interacting with a mouse, keyboard or touchscreen. X does not mandate that the user interface be present — individual client programs known as window managers handle this. The window manager is not necessary and programs may use X's graphical abilities with no user interface. As such, the visual styling of X-based environments varies greatly; different programs may present radically different interfaces. X is built as an additional (application) abstraction layer on top of the operating system kernel.

Unlike most earlier display protocols, X was specifically designed to be used over network connections rather than on an integral or attached display device. X features network transparency: the machine where an application program (the client application) runs can differ from the user's local machine (the display server).
X's network protocol is based on X command primitives and, with GLX, OpenGL 3D primitives rather than on a more basic framebuffer copying paradigm. This approach allows both 2D and 3D operations to be fully accelerated on the remote X server.

When used across the network, bandwidth and latency can both be significant issues in the usability of certain software models. Bandwidth is a key factor both in watching video in 2D and in transferring textures for 3D. Latency can be a concern in interactive applications - most obviously games - but for high levels of latency even basic menu manipulation can become difficult.

X provides no support for audio, although several projects exist in this niche, some also providing transparent network support. Some are PulseAudio, Advanced Linux Sound Architecture (ALSA), Open Sound System (OSS), and JACK Audio Connection Kit (JACK).

X also lacks support for user-defined stored procedures on the X server, which might have allowed for the dynamic construction of higher order primitives as seen in NeWS, which could reduce bandwidth demands from requiring fewer primitives to be sent, and improve certain types of interaction by removing round trips to the remote X client program in some varieties of menu interactions, picking, window management, and so on.

X is often used in conjunction with an X session manager to implement sessions. Usually, a session is started by the X display manager. However, the user can also start a session by manually running the xinit or startx programs.

Design

X uses a client–server model: an X server communicates with various client programs. The server accepts requests for graphical output (windows) and sends back user input (from keyboard, mouse, or touchscreen).

The server may function as:

  1. an application displaying to a window of another display system
  2. a system program controlling the video output of a PC
  3. a dedicated piece of hardware.


This client server terminology the user's terminal being the server and the applications being the clients—often confuses new X users, because the terms appear reversed. But X takes the perspective of the application, rather than that of the end-user: X provides display and I/O services to applications, so it is a server; applications use these services, thus they are clients.

The communication protocol between server and client operates network-transparently: the client and server may run on the same machine or on different ones, possibly with different architectures and operating systems. A client and server can even communicate securely over the Internet by tunneling the connection over an encrypted network session.

An X client itself may emulate an X server by providing display services to other clients. This is known as "X nesting". Open-source clients such as Xnest and Xephyr support such X nesting.

To use an X client application on a remote machine, the user does the following:

On the local machine, open a terminal window
use ssh with the X forwarding argument to connect to the remote machine. Telnet can be used but is not secure, does not allow graphical forwarding and is largely deprecated.
request local display/input service (e.g., export DISPLAY=[user's machine]:0 if not using SSH with X forwarding or 'tunneling' enabled).

The remote X client application will then make a connection to the user's local X server, providing display and input to the user.

Alternatively, the local machine may run a small program that connects to the remote machine and starts the client application.

Practical examples of remote clients include:

  1. administering a remote machine graphically
  2. using a client application to join with large numbers of other terminal users in collaborative workgroups.
  3. running a computationally intensive simulation on a remote machine and displaying the results on a local desktop machine
  4. running graphical software on several machines at once, controlled by a single display, keyboard and mouse.

Home Server

A home server is a server located in a private residence providing services to other devices inside and/or outside the household through a home network and/or the Internet. Such services may include file and/or printer serving, media center serving, web serving, web caching, account authentication and backup services. Because of the relatively low number of computers on a typical home network, a home server commonly does not require significant computing power. Often, users reuse older systems, and home servers with specifications as low as 1 GHz CPU and 256 MB of RAM can be used. Large, preferably fast hard drives (ATA-100 or SATA) and a network interface card are usually all the hardware required for home file serving. An uninterruptible power supply is sometimes used in case of power outages that can possibly corrupt data.

Commercial home server products

A common type of home server is the plug computer form factor. Most of these are small ARM-based devices running Linux, these have an integrated AC-to-DC power converter and come pre-loaded with various server applications.

Operating systems

Home servers run many different operating systems. Enthusiasts who build their own home servers can use whatever OS is conveniently available or familiar to them, such as Microsoft Windows 7, Mac OS X, GNU/Linux, Solaris or BSD.

Services provided by home servers

Administration and configuration

Home servers often run headless, and can be administered remotely through a command shell, or graphically through a remote desktop system such as RDP, VNC, Webmin, or many others.
Some home server operating systems, such as Windows Home Server include a consumer-focused graphical user interface (GUI) for setup and configuration that is available on home computers on the home network (and remotely over the Internet via remote access). Others simply enable users to use native operating system tools for configuration.

Centralized storage

Home servers often act as network-attached storage (NAS) providing the major benefit that all users' files can be centrally and securely stored, with flexible permissions applied to them. Such files can be easily accessed from any other system on the network, provided the correct credentials are supplied. This also applies to shared printers. Such files can also be shared over the Internet to be accessible from anywhere in the world using remote access.

Servers running Unix or Linux with the free Samba suite (or certain Windows Server products - Windows Home Server excluded) can provide domain control, custom logon scripts, and roaming profiles to users of certain versions of Windows. This allows a user to log on from any machine in the domain and have access to his/her "My Documents" and personalized Windows and application preferences - multiple accounts on each computer in the home are not needed.

Media serving

Home servers are often used to serve multi-media content, including photos, music, and video to other devices in the household (and even to the Internet; see Space shifting, Tonido and Orb). Using standard protocols such as DLNA or proprietary systems such as iTunes users can access their media stored on the home server from any room in the house. Windows XP Media Center Edition, Windows Vista, and Windows 7 can act as a home server, supporting a particular type of media serving that streams the interactive user experience to Media Center Extenders including the Xbox 360.

Remote access

The Webmin Interface as it would appear in a standard web browser.
A home server can be used to provide remote access into the home from devices on the Internet, using remote desktop software and other remote administration software. For example, Windows Home Server provides remote access to files stored on the home server via a web interface as well as remote access to Remote Desktop sessions on PCs in the house. Similarly, Tonido provides direct access via a web browser from the internet without requiring any port forwarding or other setup. Some enthusiasts often use VPN technologies as well.

Remote access

The Webmin Interface as it would appear in a standard web browser.
A home server can be used to provide remote access into the home from devices on the Internet, using remote desktop software and other remote administration software. For example, Windows Home Server provides remote access to files stored on the home server via a web interface as well as remote access to Remote Desktop sessions on PCs in the house. Similarly, Tonido provides direct access via a web browser from the internet without requiring any port forwarding or other setup. Some enthusiasts often use VPN technologies as well.

Web proxy

Some networks have an HTTP proxy which can be used to speed up web access when multiple users visit the same websites, and to get past blocking software while the owner is using the network of some institution that might block certain sites. Public proxies are often slow and unreliable and so it is worth the trouble of setting up one's own private proxy.
Some proxies can be configured to block websites on the local network if it is set up as a transparent proxy.

E-mail

Many home servers also run e-mail servers that handle e-mail for the owner's domain name. The advantages are having much bigger mailboxes and maximum message size than most commercial e-mail services. Access to the server, since it is on the local network is much faster than using an external service. This also increases security as e-mails do not reside on an off-site server.

BitTorrent

Home servers are ideal for utilizing the BitTorrent protocol for downloading and seeding files as some torrents can take days, or even weeks to complete and perform better on an uninterrupted connection. There are many command-line based clients such as rTorrent and web-based ones such as TorrentFlux and Tonido available for this purpose. BitTorrent also makes it easier for those with limited bandwidth to distribute large files over the internet.

Gopher

An unusual service is the Gopher protocol, a hypertext document retrieval protocol which pre-dated the World Wide Web and was popular in the early 1990s. Many of the remaining gopher servers are run off home servers utilizing PyGopherd and the Bucktooth gopher server.

Home automation

Home automation requires a device in the home that is available 24/7. Often such home automation controllers are run on a home server.

Security monitoring

Relatively low cost CCTV DVR solutions are available that allow recording of video cameras to a home server for security purposes. The video can then be viewed on PCs or other devices in the house.

A series of cheap USB-based webcams can be connected to a home server as a makeshift CCTV system. Optionally these images and video streams can be made available over the Internet using standard protocols.

Family applications

Home servers can act as a host to family-oriented applications such as a family calendar, to-do lists, and message boards.

IRC and instant messaging

Because a server is always on, an IRC client or IM client running on it will be highly available to the Internet. This way, the chat client will be able to record activity that occurs even while the user is not at the computer, e.g. asleep or at work or school. Textual clients such as Irssi and tmsnc can be detached using GNU Screen for example, and graphical clients such as Pidgin can be detached using xmove. Quassel provides a specific version for this kind of use. Home servers can also be used to run personal XMPP servers and IRC servers as these protocols can support a large number of users on very little bandwidth

Online gaming

Some multiplayer games such as Continuum, and Tremulous have server software available which users may download and use to run their own private game server. Some of these servers are password protected, so only a selected group of people such as clan members can gain access to the server. Others are open for public use and may move to colocation or other forms of paid hosting if they gain a large number of players.

Third-party platform

Home servers often are platforms that enable third-party products to be built and added over time. For example, Windows Home Server provides a Software Development Kit and over 60 third-party products are available for it. Similarly, Tonido provides an application platform that can be extended by writing new applications using their SDK

Mail Server

Within Internet message handling services (MHS), a message transfer agent or mail transfer agent (MTA) or mail relay is software that transfers electronic mail messages from one computer to another using a client server application architecture. An MTA implements both the client (sending) and server (receiving) portions of the Simple Mail Transfer Protocol.

The terms mail server, mail exchanger, and MX host may also refer to a computer performing the MTA function. The Domain Name System (DNS) associates a mail server to a domain with mail exchanger (MX) resource records containing the domain name of a host providing MTA services.

A mail server is a computer that serves as an electronic post office for email. Mail exchanged across networks is passed between mail servers that run specially designed software. This software is built around agreed-upon, standardized protocols for handling mail messages and the graphics they might contain.

Operation

A message transfer agent receives mail from either another MTA, a mail submission agent (MSA), or a mail user agent (MUA). The transmission details are specified by the Simple Mail Transfer Protocol (SMTP). When a recipient mailbox of a message is not hosted locally, the message is relayed, that is, forwarded to another MTA. Every time an MTA receives an email message, it adds a Received trace header field to the top of the header of the message, thereby building a sequential record of MTAs handling the message. The process of choosing a target MTA for the next hop is also described in SMTP, but can usually be overridden by configuring the MTA software with specific routes.

Transfer versus access

The function of an MTA is usually complemented with some means for email clients to access stored messages. This function typically employs a different protocol. The most widely implemented open protocols for the MUA are the Post Office Protocol (POP3) and the Internet Message Access Protocol (IMAP), but many proprietary systems exist (Exchange, Lotus Domino/Notes) for retrieving messages. Many systems also offer a web interface for reading and sending email that is independent of any particular MUA.

At its most basic, an MUA using POP3 downloads messages from the server mailbox onto the local computer for display in the MUA. Messages are generally removed from the server at the same time but most systems also allow a copy to be left behind as a backup. In contrast, an MUA using IMAP displays messages directly from the server, although a download option for archive purposes is usually also available. One advantage this gives IMAP is that the same messages are visible from any computer accessing the email account, since messages aren't routinely downloaded and deleted from the server. If set up properly, sent mail can be saved to the server also, in contrast with POP mail, where sent messages exist only in the local MUA and are not visible by other MUAs accessing the same account.

Issues affecting small email-servers

In recent years, mainly due to concerns over spam and a general trend towards centralisation, problems have arisen for small organisations and home users wishing to run their own email server. As of 2011 many ISPs pre-emptively block outgoing connections to TCP port 25 on domestic connections, and larger email providers have increasingly stringent requirements for other servers that wish to transfer emails to them. For example: reverse PTR records of the sending mail server are often checked before accepting mail. The PTR record must be set up by the ISP, which may refuse this request to a small-business or domestic user.

Other problems encountered by small mail-servers include zealous use of blacklisting and a presumption of guilt by blacklisting services and large email providers, which classify "new" servers as spammers by default. Such measures have inevitably reduced the overall number of small email-servers, and some end-users have opted to outsource to paid services or to GMail instead, exacerbating the problem for those not wishing to outsource.

Media Server

A media server refers either to a dedicated computer appliance or to a specialized application software, ranging from an enterprise class machine providing video on demand, to, more commonly, a small personal computer or NAS (Network Attached Storage) for the home, dedicated for storing various digital media (meaning digital videos/movies, audio/music, and picture files).

Purpose

By definition a media server is a device that simply stores and shares media. This definition is vague, and can allow several different devices to be called Media Servers. It may be a simple Network-attached storage, a Home theater PC (HTPC) running Windows XP Media Center Edition, MediaPortal or MythTV, or a commercial web server that hosts media for a large web site. In a home setting, a media server acts as an aggregator of information: video, audio, photos, books, etc. These different types of media (whether they originated on DVD, CD, digital camera, or in physical form) are stored on the media server's hard drive. Access to these is then available from a central location. It may also be used to run special applications that allow the user(s) to access the media from a remote location via the internet.

Hardware

The only requirement for a media server is a method of storing media and a network connection with enough bandwidth to allow access to that media. Depending on the uses and applications that it runs, a media server may require large amounts of RAM, or a powerful, multicore CPU. A RAID may be used to create a large amount of storage, though it is generally not necessary in a home media server to use a RAID that gives a performance increase because current home network transfer speeds are slower than that of most current hard drives. However, a RAID configuration may be used to prevent loss of the media files due to disk failure as well. Many Media servers also have the ability to capture the media. This is done with specialized hardware such as TV tuner cards. Analog TV tuner cards can capture video from analog broadcast TV and output from cable/satellite set top boxes. This analog video then needs to be encoded in digital format to be stored on the Media server. This encoding can be done with software running on the Media server computer or by hardware on the TV tuner card. Digital TV tuner cards take input from broadcast digital TV. In the USA, the ATSC standard is used. In most of the rest of the world, DVB-T is the accepted standard. Since these transmissions are already digital, they do not need to be encoded.

Media Servers in Telephony

In the world of telephony, a media server is the computing component that processes the audio and/or video streams associated with telephone calls or connections. Conference services are a particular example of how media servers can be used, as a special 'engine' is needed to mix audio streams together so that conference participants can hear all of the other participants. Conferencing servers may also need other specialized functions like "loudest talker" detection, or transcoding of audio streams, and also interpreting DTMF tones used to navigate menus. For video processing, it may be needed to change video streams, for example transcode from one video codec to another or rescale (transrate) a picture from one size to another. This media processing functions are the core responsibility of a media server.

Proxy Server

In computer networks, a proxy server is a server (a computer system or an application) that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server. The proxy server evaluates the request according to its filtering rules. For example, it may filter traffic by IP address or protocol. If the request is validated by the filter, the proxy provides the resource by connecting to the relevant server and requesting the service on behalf of the client. A proxy server may optionally alter the client's request or the server's response, and sometimes it may serve the request without contacting the specified server. In this case, it 'caches' responses from the remote server, and returns subsequent requests for the same content directly.

Uses

A proxy server has a large variety of potential purposes, including:

  • To keep machines behind it anonymous, mainly for security.
  • To speed up access to resources (using caching). Web proxies are commonly used to cache web pages from a web server.
  • To apply access policy to network services or content, e.g. to block undesired sites.
  • To access sites prohibited or filtered by your ISP or institution.
  • To log / audit usage, i.e. to provide company employee Internet usage reporting.
  • To bypass security / parental controls.
  • To circumvent Internet filtering to access content otherwise blocked by governments.
  • To scan transmitted content for malware before delivery.
  • To scan outbound content, e.g., for data loss prevention.
  • To allow a web site to make web requests to externally hosted resources (e.g. images, music files, etc.) when cross-domain restrictions prohibit the web site from linking directly to the outside domains.

Types of proxy

Forward proxies

A forward proxy taking requests from an internal network and forwarding them to the Internet. Forward proxies are proxies where the client server names the target server to connect to. Forward proxies are able to retrieve from a wide range of sources (in most cases anywhere on the Internet).

The terms "forward proxy" and "forwarding proxy" are a general description of behavior (forwarding traffic) and thus ambiguous. Except for Reverse proxy, the types of proxies described in this article are more specialized sub-types of the general forward proxy concept.

Open proxies

An open proxy is a forwarding proxy server that is accessible by any Internet user. Gordon Lyon estimates there are "hundreds of thousands" of open proxies on the Internet. An anonymous open proxy allows users to conceal their IP address while browsing the Web or using other Internet services. There are varying degrees of anonymity however, as well as a number of methods of 'tricking' the client into revealing itself regardless of the proxy being used.

Reverse proxies

A reverse proxy (or surrogate) is a proxy server that appears to clients to be an ordinary server. Requests are forwarded to one or more origin servers which handle the request. The response is returned as if it came directly from the proxy server.

Reverse proxies are installed in the neighborhood of one or more web servers. All traffic coming from the Internet and with a destination of one of the neighborhood's web servers goes through the proxy server. The use of "reverse" originates in its counterpart "forward proxy" since the reverse proxy sits closer to the web server and serves only a restricted set of websites.

Web Server | HTTP Server

Web server can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that can be accessed through the Internet. The most common use of web servers is to host web sites but there are other uses such as data storage or running enterprise applications.

A client, commonly a web browser or web crawler, initiates communication by making a request for a specific resource using HTTP and the server responds with the content of that resource or an error message if unable to do so. The resource is typically a real file on the server's secondary memory, but this is not necessarily the case and depends on how the web server is implemented.
While the primary function is to serve content, a full implementation of HTTP also includes ways of receiving content from clients. This feature is used for submitting web forms, including uploading of files.

Many generic web servers also support server-side scripting, e.g., Active Server Pages (ASP) and PHP. This means that the behaviour of the web server can be scripted in separate files, while the actual server software remains unchanged. Usually, this function is used to create HTML documents "on-the-fly" as opposed to returning fixed documents. This is referred to as dynamic and static content respectively. The former is primarily used for retrieving and/or modifying information from databases. The latter is, however, typically much faster and more easily cached.

Web servers are not always used for serving the world wide web. They can also be found embedded in devices such as printers, routers, webcams and serving only a local network. The web server may then be used as a part of a system for monitoring and/or administrating the device in question. This usually means that no additional software has to be installed on the client computer, since only a web browser is required (which now is included with most operating systems).

Common features

  1. Virtual hosting to serve many Web sites using one IP address
  2. Large file support to be able to serve files whose size is greater than 2 GB on 32 bit OS
  3. Bandwidth throttling to limit the speed of responses in order to not saturate the network and to be able to serve more clients
  4. Server-side scripting to generate dynamic Web pages, still keeping web server and website implementations separate from each other
Kernel-mode and user-mode web servers

A web server can be either implemented into the OS kernel, or in user space (like other regular applications).

An in-kernel web server (like TUX on GNU/Linux or Microsoft IIS on Windows) will usually work faster, because, as part of the system, it can directly use all the hardware resources it needs, such as non-paged memory, CPU time-slices, network adapters, or buffers.

Web servers that run in user-mode have to ask the system the permission to use more memory or more CPU resources. Not only do these requests to the kernel take time, but they are not always satisfied because the system reserves resources for its own usage and has the responsibility to share hardware resources with all the other running applications.

Also, applications cannot access the system's internal buffers, which causes useless buffer copies that create another handicap for user-mode web servers. As a consequence, the only way for a user-mode web server to match kernel-mode performance is to raise the quality of its code to much higher standards, similar to that of the code used in web servers that run in the kernel. This is a significant issue under Windows, where the user-mode overhead is about six times greater than that under Linux.

File Server

In computing, a file server is a computer attached to a network that has the primary purpose of providing a location for shared disk access, i.e. shared storage of computer files (such as documents, sound files, photographs, movies, images, databases, etc.) that can be accessed by the workstations that are attached to the computer network. The term server highlights the role of the machine in the client–server scheme, where the clients are the workstations using the storage. A file server is not intended to perform computational tasks, and does not run programs on behalf of its clients. It is designed primarily to enable the storage and retrieval of data while the computation is carried out by the workstations.

File servers are commonly found in schools and offices and rarely seen in local internet service providers using LAN to connect their client computers.

Types of file servers

A file server may be dedicated or non-dedicated. A dedicated server is designed specifically for use as a file server, with workstations attached for reading and writing files and databases. File servers may also be categorized by the method of access: Internet file servers are frequently accessed by File Transfer Protocol (FTP) or by HTTP (but are different from web servers, that often provide dynamic web content in addition to static files). Servers on a LAN are usually accessed by SMB/CIFS protocol (Windows and Unix-like) or NFS protocol (Unix-like systems). Database servers, that provide access to a shared database via a database device driver, are not regarded as file servers. Many file servers are simultaneously print servers too, as they provide access to printers via network. A single file serving computer may be accessible by multiple means: it may run an FTP server, an SMB server, etc., serving the same files.

Design of file servers

In modern businesses the design of file servers is complicated by competing demands for storage space, access speed, recoverability, ease of administration, security, and budget. This is further complicated by a constantly changing environment, where new hardware and technology rapidly obsolesces old equipment, and yet must seamlessly come online in a fashion compatible with the older machinery. To manage throughput, peak loads, and response time, vendors may utilize queuing theory to model how the combination of hardware and software will respond over various levels of demand. Servers may also employ dynamic load balancing scheme to distribute requests across various pieces of hardware.
The primary piece of hardware equipment for servers over the last couple of decades has proven to be the hard disk drive. Although other forms of storage are viable (such as magnetic tape and solid-state drives) disk drives have continued to offer the best fit for cost, performance, and capacity.

Storage

Since the crucial function of a file server is storage, technology has been developed to operate multiple disk drives together as a team, forming a disk array. A disk array typically has cache (temporary memory storage that is faster than the magnetic disks), as well as advanced functions like RAID and storage virtualization. Typically disk arrays increase level of availability by using redundant components other than RAID, such as power supplies. Disk arrays may be consolidated or virtualized in a storage area network (SAN).

Network-attached storage

Network-attached storage (NAS) is file-level computer data storage connected to a computer network providing data access to heterogeneous clients. NAS devices specifically are distinguished from file servers generally in a NAS being a computer appliance a specialized computer built from the ground up for serving files rather than a general purpose computer being used for serving files (possibly with other functions). In discussions of NASs, the term "file server" generally stands for a contrasting term, referring to general purpose computers only.

Security

File servers generally offer some form of system security to limit access to files to specific users or groups. In large organizations, this is a task usually delegated to what is known as directory services such as openLDAP, Novell's eDirectory or Microsoft's Active Directory.

These servers work within the hierarchical computing environment which treat users, computers, applications and files as distinct but related entities on the network and grant access based on user or group credentials. In many cases, the directory service spans many file servers, potentially hundreds for large organizations. In the past, and in smaller organizations, authentication can take place directly to the server itself.