FAQ
From Stax
General
What is Stax, and why would I use it?
[Stax] is a cloud-computing platform that empowers developers with tools and services to build, manage, and scale Java applications. Stax provides an end-to-end application environment that lets developers quickly build, deploy, and scale Java web applications using standard Java frameworks and APIs.
Does Stax require applications to use proprietary APIs?
No, Stax applications use the standard Servlet and JDBC APIs, so your applications are portable and can be deployed into any J2EE environment.
Can I use frameworks and classes not provided by the pre-defined application templates?
Absolutely. You are free to use any classes or libraries that can be packaged and run from a standard Java web archive (WAR file). This includes any of your own code or 3rd-party libraries and frameworks. The application templates provided in the application wizards are only to help developers get started with some of the most popular Java application frameworks. If you don't want to use any of the frameworks provided by the Stax templates, we suggest starting your application using the Basic application template.
Can I deploy my existing Java web applications on Stax?
Maybe. Any Java web application that can be packaged as standard J2EE WAR file can be deployed on Stax, however the Stax environment is a very strict implementation of the J2EE web container, so applications that step outside the J2EE standard may not work properly. The most common problem applications run into is using the local filesystem to maintain application state, which is not supported in the Stax environment. Most applications implemented using standard web application APIs (Servlets, JSPs and JDBC) will not have any problems running on Stax.
Can I use Stax for development and deploy somewhere else?
Yes. One of the strongest value propositions for Stax is to accelerate application development and testing cycles because there is no upfront resource planning required to get projects started. Since your applications are coded using standard Java technologies and APIs, you can easily deploy your applications on your own J2EE application servers.
How does Stax scale my applications?
The Stax cloud is backed by Amazon EC2, so extra computing capacity is always at your fingertips and you only get charged for what you use. It is important however to understand that as a cloud-based application environment, there are some services your application will need to avoid using to work properly. In general, applications will run and scale best if they are designed so that the applications maintain no state inside the appserver, and instead use external datastores for persistence. Since application instances may come and go at anytime, applications should avoid relying on the local-persistence such as the filesystem or application variables that span requests (such as static variables, or ServletContext/HttpSession attributes).
How much will Stax cost?
Stax is still in beta, so we have not yet set our pricing. In the meantime, we hope you can take some comfort in knowing that your applications are being coded to standard Java APIs, so you are not locked into the running your applications on the Stax platform.
Application Capabilities
Can applications write to the filesystem?
Apps on Stax can write to the local filesystem, but they are sandboxed to the system account the application runs under, and local files are deleted anytime the application's deployment is changed (which can happen automatically at anytime). The local filesystem is not synchronized, so uploaded files can be saved temporarily for processing, but should be persisted in an external filestore (such as Amazon S3). Best practices are to stick to using the filesystem for temporary file operations (such as caching) and to use the standard javax.servlet.context.tempdir ServletContext attribute to get the approved location for writing temporary files.
What are the memory constraints?
During the free beta, memory is currently capped at 256MB, but apps will be able to pay for more memory for the final release. If you need more memory for your application during the beta, contact us at beta@stax.net.
Can applications create threads?
Apps are free to create threads and are only limited by the amount of memory allocated to the JVM. During the free beta, idle applications are automatically hibernated after 12 hours, so thread-based cron jobs will not execute when the application is hibernated.
Can applications run Web Services?
Any inbound HTTP requests can be directed to your application, so as long you are hosting HTTP-based Webservices they can be hosted inside your application.
Can applications use JDBC?
JDBC is a first class API in the Stax environment. Stax provides native support for running MySQL databases, but your application can also connect to external databases using JDBC. For best performance when connecting to an externally hosted database consider hosting your database on Amazon EC2 since this allows your applications to run in the same datacenter as your Stax application servers.
Can applications connect to services hosted outside the Stax environment (like WebServices, JMS or JNDI)?
There are no restrictions on outbound socket connections, so your applications are free to connect to any external network services.
What version of Java is supported?
Applications are run in a standard Java 6 virtual machine.
Stax SDK
When running some SDK commands, what are the files that are downloaded, and where are they installed?
When running your application in the Stax Cloud, many binaries typically required to run the application are pre-installed on the servers to make startup times fast. When running your applications locally, the SDK will automatically download any of these resources and cache them in the [userhome]/.stax folder. This makes it so you only incur the cost of downloading an application "stack" the first time you run an application that depends on it.
