Twelve Factor apps are built for agility and rapid deployment. They enable continuous delivery and reduce the time and cost for new developers to join a project. At the same time, they are architected to exploit the principles of modern cloud platforms while permitting maximum portability between them. Finally, they can scale up without significant changes to tooling, architecture or development practices. In this talk, you’ll learn the principles and best practices espoused by the Twelve Factor app. We’ll discuss how to structure your code, manage dependencies, store configuration, run admin tasks, capture log files, and more. You’ll learn how modern Java deployments can benefit
2. 12 Factor App
Best Practices for JVM Deployment
Java doesn’t suck
when you do things this way
3.
4. Java Servlet API 2.2 includes one new
feature so significant it may change
the way the Web works. That feature:
Web applications.
- Javaworld.com, 1999
“
”
5. With Web apps, the entire application
can be contained in a single archive
file and deployed by placing the file
into a specific directory.
- Javaworld.com, 1999
“
”
30. Configuration belongs in
the environment,
not in the application
Configuration should
be strictly separated
from code
| Disposable | Parity | Config |
49. import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.*;
public class Main {
public static void main(String[] args) throws Exception {
Server server = new Server();
ServletContextHandler context = new ServletContextHandler(
ServletContextHandler.SESSIONS);
context.setContextPath("/");
server.setHandler(context);
context.addServlet(new ServletHolder(new App()), "/*");
server.start();
server.join();
}
}