Contents
This deployment guide describes activities needed to make systems built on the 10Duke SDK ready for use.
The SDK enables building several kinds of applications including web, desktop and mobile applications. Also, there are several models of how different kinds of applications can be deployed. This briefly discusses some common deployment models, and describes tasks and activities that are common for all kinds of applications, with a special focus on web applications.
In the web application space, there are several models of how applications can be structured and deployed. Software architecture selected when building an application may affect the choices that are available when deploying the application.
The 10Duke SDK doesn't enforce any software architecture, system architecture or deployment model, but instead allows freedom of choice. Since the SDK comes with a built-in distribution solution, it allows some simple and yet efficient distributed system architectures and distribution models that would be difficult to implement otherwise.
Deployment models can be discussed from several different perspectives. One top level choice that affects the deployment model of a web application is whether the application is built as a Java Web Application and deployed as a .war package on an application server. Competitive models include using embedded web server and servlet containers like Jetty. The SDK's embedded model is also very simple. Lifecycle management describes these scenarios in more detail.
Another top level choice affecting the deployment model is the selected way of designing and implementing multi-tier architecture. This is one of the aspects where using the SDK gives additional options that may be simple and efficient for some applications. Architectural foundations that allows a wide range of deployment models include clean separation of data and logics (see Object model, data provider and persistence), choice of different kinds of database solutions, and especially the distribution architecture. Distribution architecture allows applying distribution and scaling out on almost any kind of deployment model. Extreme deployment models such as "everything on single server" where a single server runs all components of the system including database, web server, application server and transcoding engine, and "everything on separate servers" where there are separate servers responsible for each component, are equally suited for distribution. For instance, simple yet robust, efficient and scalable distributed system can be deployed by simply cloning a node running on a single server and configuring the nodes for distribution.
As with all Java software, software built on the 10Duke SDK requires a Java Runtime Environment (JRE). You may also want to use a Java application server like Apache Tomcat as the environment for running your web application, however, this is optional. Web applications can also be built without an application server using an embedded web server and servlet container such as Jetty.
In any kind of running environment it is required that Java class loader is able to find and load classes of the SDK and classes specific to your application. Standard 10Duke SDK distributions contain tenduke-sdk-[version].jar, where a [version] is substituted by version number of the SDK package. This .jar file contains the SDK core class libraries. If you use SDK extensions, each extension is distributed as a separate .jar file. Usually it is sufficient that all the .jar files required by your application are deployed and can be found by Java classpath configured for your JRE instance, or in the case of .war web applications you include the required .jar files in the .war package.
Applications built on the 10Duke SDK can be used with several different kinds of databases from xml files to common relational databases or large-scale non-relational databases - or without any database at all. Provided standard binding implementations support the following relational databases:
PostgreSQL, versions 8 and 9
MySQL, version 5
HSQLDB, versions 1 and 2
Deploying an application built on the SDK requires that selected database engine is set up correctly and binding is configured respectively. Please consult documentation of your selected database for database set-up, and DataProvider configuration for binding / database configuration.
Some features encapsulated and provided by the SDK rely on external tools to perform certain tasks such as media conversions.
The 10Duke SDK media processing features allow configuring toolchains for converting video and audio files to other formats. Dependencies to external tools are introduced in these toolchain configurations. Some media handling tools are also used by media handling utilities. Typical media conversion and media handling tools used by these toolchains and utilities include:
These are only examples of tools that can be used, the toolchain configuration allows using any tools as long as tools in each chain take media files in one format as input, and output media files in other formats.
In addition to media conversions and media handling tools, the SDK makes use of curl for some network operations.
When deploying applications built on the SDK, required tools must be installed on the system where the application is deployed. For further information, see pages about media processing and external tools.
Configuration is closely related to deployment. It is recommended that you get familiar with Configuration Guide and Configuration Reference to get general understanding of the SDK configuration.
When deploying a distributed system, each node may have unique configuration. Although the differences are usually quite limited, this introduces additional requirements to deployment management. An example is a peer group implementation based on explicitly named nodes in the group (see StaticConfiguredGlobalPeerGroup). In this configuration case each node knows other nodes in the system but configuration differs on each.
Refer to distribution guide.