"Future-Proofing" software is a common headache for software engineers and programmers. It is a resource-intensive process, and can only realistically accommodate slow, expected changes in computing technology. Sudden changes, such as the rise of tablet computing, can leave development teams scrambling to adapt their existing software for these new environments. Data analysis and visualization programs are particularly vulnerable to this problem, due in part to their inherent dependency on specialized hardware and computing environments. So, how can a developer bring a project to new platforms easily, without expending a lot of resources? The answer to this, as with so many other current technology problems, lies in cloud computing.
Cloud computing benefits different types of software in different ways. For example, server-based software might benefit from the elasticity of cloud computing environments. Analysis and visualization programs, on the other hand, might benefit from being data-proximate. How does moving a desktop application to the cloud solve the future-proofing problem? Essentially, the program runs on a server in the cloud rather than on a local computer, and is accessed using an interactive client — which might be a desktop application, a native app on a hand-held device, or a web app. This approach is often referred to as Application Streaming.
Enabled largely by the rapid rise and adoption of cloud computing platforms, application streaming technologies allow legacy software programs to be operated wholly from a client device (be it laptop, tablet, or smartphone) while retaining full functionality and interactivity. It mitigates much of the developer effort required by other more traditional methods of porting software from one environment to another, reducing the time it takes to bring the software to a new platform.
Unidata's Integrated Data Viewer (IDV) presented itself as a prime candidate for the application streaming treatment. To this end, we have developed a version of the IDV dubbed “CloudIDV.” CloudIDV is designed for application streaming, allowing an instance of the IDV to be accessed via tablet, mobile phone, or even via a browser. These features are enabled through a fairly new technology called containerization. There are several containerization technologies in use; for CloudIDV we are using Docker.
In this article we will provide a brief overview of application streaming, with a focused discussion of the containerization technology which enables it. We will then discuss how to download and run CloudIDV in a local computing environment, and we will finally end with a discussion of the future of cloud-enabled software.
Application streaming is a way to run software remotely but have it appear as though it were running locally. In a way, Application Streaming is an extension of more common media streaming services such as Netflix or Spotify. Whereas these services are largely one-way, however, application streaming provides a fully interactive environment.
Application streaming typically involves several components.
- A server to run the software. This includes the software itself and all the various software packages upon which it depends. The server may be a remote Virtual Machine (VM) instance in the cloud, or a physical server on a local network.
- Software to enable remote viewing and interaction.
- A client program which allows for viewing and interacting with the remote software.
The CloudIDV project makes use of many technologies to satisfy these requirements. The server includes a full IDV + Java installation, a linux-based windowed environment (X11) and a virtual frame buffer (xvfb) to allow for 3D visualization. There is also remote visualization software (vnc), as well as support software to allow for access through a web browser (noVNC).
Installing, configuring and maintaining this environment manually would quickly become a cumbersome chore for anybody who simply wants to use the IDV on their tablet computer. It can also be difficult to automate the process of deploying new instances (or cleaning up existing ones) on demand. This is where the benefits of containerization become fully apparent.
Using Docker, we are able to combine many of these individual technologies into a single monolithic container. This makes using CloudIDV a much more straightforward process. First, let’s examine Docker, what it is, and provide some resources for installing and using it.
Docker, as previously described, is a containerization technology. It is used create a self-contained, sandboxed environment (called an image)
|Figure 1: CloudIDV Image Architecture|
|The CloudIDV Docker image contains the standard IDV as well as all of the technology required to run it in the cloud, viewable via a web browser.|
So, what does Docker gain us? While it is possible to wholly duplicate the CloudIDV environment without Docker, doing so would require installing and configuring each of the above technologies for every environment or server on which you would want to run it! In a best-case scenario, this would merely be cumbersome and tedious. More likely, it would require the assistance of an IT administrator and, depending on the IT policies in place, may not be possible at all.
Fortunately, there is no need to duplicate this environment, as Unidata has already done it for you!
Installing Docker is largely left as an exercise to the reader. Docker is available for Linux, OSX and Windows, although it requires a 64-bit operating system. Because Docker is a linux-native technology, the OSX and Windows versions incorporate the use of a Virtual Machine, handled transparently by the
docker-machine command-line tools. The Docker team has created comprehensive instructions for installing and using Docker, available from http://docs.docker.com.
- Linux Instructions: http://docs.docker.com/engine/installation/
- OSX Instructions: http://docs.docker.com/engine/installation/mac/
- Windows Instructions: https://docs.docker.com/engine/installation/windows/
If you are new to Docker, we suggest that after installation the software you run Docker’s “Hello World” container to verify that everything is working correctly. Instructions on how to do this are included on the pages listed above.
Armed with this understanding of Docker and containerization, let us now examine CloudIDV. As we see in figure 1, CloudIDV relies on many different technologies running in concert. Because they exist in a single Docker image, a CloudIDV user can rely on the fact that these technologies are all present and have been properly configured to interact with each other. And because of the sandboxed nature of Docker, a user can rely on being able to run multiple instances of CloudIDV simultaneously.
So, how does one run the CloudIDV? It is simple, but before you are run CloudIDV, the appropriate Docker image must be downloaded. This image is identified by Docker as unidata/cloudidv, and is available from DockerHub, Docker's repository for images. From the Docker documentation found at https://docs.docker.com/docker-hub:
The Docker Hub is a cloud-based registry service for building and shipping application or service containers. It provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation throughout the development pipeline.
In plain english, this is a place for individuals and organizations like Unidata to store their Docker images. When Docker tries to run an image, it will look for a copy. If the image is not found locally, Docker will automatically retrieve it from DockerHub. This removal of the explicit download/installation step for individual images simplifies the entire process of using Docker even further. Additionally, DockerHub provides a place for image maintainers to provide documentation specific to their project. The CloudIDV Docker Hub repository can be viewed at https://hub.docker.com/r/unidata/cloudidv/.
CloudIDV is started with the following command:
$ docker run -d -p 6080:6080 -it unidata/cloudidv
Using CloudIDV is very straightforward. Rather than require a separate viewing program, the running CloudIDV image is accessed via a web browser.
Connecting to your CloudIDV session.
In order to connect to the running CloudIDV session, you will need two pieces of information; the IP address of the Docker server and the port you must connect to. Determining the port is straightforward; we specified it when we ran the container using the
-P flag to the
docker command (we are using port 6080). Determining the IP address is also straightforward, but the exact method will depend on your operating system; see table 1.
|Table 1: Determining the appropriate IP address|
|No action required||
|This table shows the various methods for determining the appropriate IP address you will need to connect to in your web browser. Note that, for linux, it is very straight forward; it will be a fixed address. For Windows and OSX, there is an additional step, although it is still an easy process. It is helpful to remember that the default docker IP address for non-linux machines is 192.168.99.100. This will typically only change via advanced docker usage.|
Once you know the appropriate IP, you will enter the following in your web browser address bar:
After loading this address, you will see your CloudIDV instance running in the browser via Docker, as illustrated in figure 2.
|Figure 2: Accessing CloudIDV|
|This figure illustrates how a CloudIDV session looks when run in the browser. It is fully interactive.|
In this article we have introduced CloudIDV, a version of Unidata's IDV for use on new computing platforms. We've also discussed the technology that makes CloudIDV possible, Docker. Finally, we've provided an overview of a strategy for bringing traditional desktop applications to new computing platforms, application streaming. These technologies provide an exciting look into how software and services are evolving to meet the emerging cloud. The end result is a new method of writing, deploying and using software which is far removed from traditional local and server-based methods.