How the cloud provider manages the connection between mobile applications and the cloud
Traditional client and server-side software technologies use a software solution called sockets to establish a connection. The use of sockets has not changed as the industry has grown from a static, fat client to a mobile thin client. But over the years, sockets have changed their shape and become more complex. As a result, this technology becomes difficult to understand, not to mention a comprehensive understanding of how sockets are used in the enterprise, or how they are used in conjunction with mobile and cloud technologies.
This article will help you understand the concept of sockets, the types of sockets you can use for your applications, the pros and cons of using sockets in mobile and cloud solutions, and how cloud service providers can support sockets.
Getting Started with sockets
A socket combination uses an Internet protocol (IP) address or a domain Name System (DNS) address and port number to connect the client software to the server-side software. A common example of this combination is Web mail (for example, www.acmewidgets.com:2095), where a colon (:) is the separator between the DNS address and the port number. Sockets allow you to establish a session-level connection to hold data transfer or perform transactions.
Type of socket
Sockets are used to establish a session between the client and the server to perform transactions or transmit data. When the enterprise deploys or uses sockets, they can use different types of sockets and different protocols depending on the type of application, security requirements, and skill sets of the development team. Socket types include the Internet, streaming, raw, and domain sockets. The Internet and streaming sockets are most popular, thanks to their ease of use, their architecture, and the popularity of Web and application servers in contemporary data centers.
For Internet sockets, HTTP based sockets are the primary choice for thin clients or web-based systems, especially for applications that do not require encryption to enforce security. Also note that HTML V5 (HTML5) introduces WebSockets, which is extremely similar to Internet sockets. When additional security is required, the enterprise should select a stream socket. Although Internet sockets are currently popular because of the proliferation of thin client applications, streaming sockets are also popular.
The most popular streaming based sockets are based on the Transmission Control Protocol (TCP) stack and are often used for fat client applications. (Note that TCP is occasionally used for thin client connections.) When additional security is required for socket connections, a solution based on Secure Sockets Layer (SSL)/Transport Layer Security (TLS) is also available. SSL/TLS protects data in motion by combining the use of a public key infrastructure (PKI) with SSL based HTTP (i.e., HTTPS). Note that when dealing with sensitive data, it is often necessary to use SSL/TLS, which includes personally identifiable information, protected health information, cardholder data, or payment, bank, or mortgage data. Organizations that need more flexibility to establish client-server connections should consider raw sockets.
The original socket does not depend on a specific transport mechanism, so the package sent on the connection using the original socket contains a header and the "original" package itself. These sockets are often used by network devices, such as firewalls and routers, that use both the Internet Control Message protocol and the Internet Group Management Protocol. Because of the generality of the original sockets, internal systems are sometimes used to encode them, so these sockets can be used in the context of a private cloud, an internal cloud. Enterprises using UNIX systems have another socket to choose from: Domain sockets.
A domain socket contains an interprocess communication (IPC) protocol. IPC is a socket that is often used for legacy platforms (such as UNIX), although some people may think that the need to connect mainframe systems to mobile or cloud environments is trivial, but this requirement is likely to arise and needs to be mentioned. Regardless of which socket is used, all sockets have a basic development and usage structure, which is described in the next section.
Structure of sockets
The system architecture or platform, security requirements, and the programming language you use for the platform help determine which type of socket you should use. Also, choosing whether to use an application programming interface (API) or an internally developed socket can affect the structure of sockets. For example, if a business is going to use a cloud-based Linux, Apache, MySQL, and PHP (LAMP) stack to perform server-side processing on the Amazon elastic Compute Cloud (Amazon EC2) platform, it is likely to be based on A socket on the Internet. Conversely, if a developer wants to find a socket based API for a mobile client session from an Apple IPad that runs Apple IOS 5, the logical choice would be the Twisted framework, which uses a streaming based socket.
The socket structure used by Twisted reflects its streaming and event-based architecture, so it is very similar to a tcp/stream based socket (that is, WinSock) in Windows, whose chart reflects its dependency on callbacks from the client (see Figure 1).
Figure 1. WinSock Client-Server interaction
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/cloud-computing/