This page guides through the deployment steps for your AppWarp S2 application. Your AppWarp S2 application will run in a JVM like any other Java application. You can either host on your own infrastructure or on GPaaS by ShepHertz.
AppWarp S2 requires the following to be installed on the server machine.
- JAVA: JDK 1.7 or above
- ANT: apache-ant-1.8.3 or above (if you want to use the scripts provided to build and run)
Maven scripts to build and run are coming soon.
Most developers will develop and test their AppWarp S2 application using any of the popular Java IDEs. Once your application is tested and ready for deployment either in a production or remote test environment, you can use the following approach.
Application directory structure
Ensure that your application is developed according to the following top level folder structure if you are going to be building and running using the provided ANT script.
./src ./libs ./AppConfig.json ./warp.xml
The src folder should contain Main.java and your server application and extension classes for different domain adaptors.
The libs folder contains the library files(jar) that will be used by the server application. These include among other JARs the AppWarpS2.jar file.
AppConfig.json file contains the server configuration variables which are
- “TickTime” : “500″ (Timer Event in milliseconds)
- “ListenPort” : 12346 (For TCP and UDP traffic)
- “LogLevel” : “WARN” (ALL, DEBUG, FATAL, ERROR, INFO, WARN, OFF, TRACE)
- “AdminUsername” : “admin” (Admin dashboard userName)
- “AdminPassword” : “password” (Admin dashboard password)
- “HSQLDBFile” : “D:\data\AppWarpS2″ (path for HSQLDB files by default files will be created in running directory)
- “LICENSE_KEY” : “x45-tp0987-1276″ (your AppWarp S2 license key)
warp.xml file contains the ant script which is used to build and run server.
For example in the given SpaceWarFare sample application, the java src classes are declared in the package “spacewarfare”. You should edit this file according to your package name by editing the following line in the warp.xml file.
<property name="main-class" value="spacewarfare.Main"/>
How To Run:
Navigate to the top level directory of your application
Enter the following command
> ant -f warp.xml
This will clean, build and run your application.
Ports to be opened
AppWarp S2 requires the following ports to be opened on the machine where the application is going to be deployed.
- Open incoming TCP port 12346 (customizable)
- Open incoming TCP port 843 (required to serve cross domain flash and Unity Web player policy)
- Open incoming UDP port 12346 (customizable)
Deploying on multiple machines
Take a look at our benchmarking results to get an idea about the server performance. For applications which are expecting very high volumes of traffic, it might be required to deploy the application on multiple instances and balance the load through different application zones running on different instances.
You can implement load balancing by having a simple master server which contains information about all the instances. The clients can then first query this master server and determine the instance they should connect to.
Looking for hosting solutions for Appwarp S2?
- GPaaS (Gaming Platform as a Service) is a specialized PaaS setup from ShepHertz.
- Creates a VM for you on App42 PaaS which is pre-configured with all the above requirements.
- You can update your AppWarp S2 server application code and redeploy from your command line