Sei sulla pagina 1di 7

This DZone Refcard is brought to you by:

Visit refcardz.com to browse and download the entire DZone Refcardz collection
brought to you by...
#88
Get More Refcardz! Visit refcardz.com

CONTENTS INCLUDE:
n
About Resin
Downloading Resin
Getting Started with
Caucho Resin
n

n
Installing Resin
n
Resin Directory Layout
n
Starting Resin
n
Configuring Resin and more...
By Emil Ong
are provided in the distribution. Ubuntu Linux users can use
ABOUT RESIN Caucho’s Ubuntu repository to install Resin as a .deb.

Caucho Technology’s Resin® is a Java Application Server with Resin 4.0 now requires Java SE 6. This latest version
a reputation for being lightweight and fast, yet reliable and Hot of Java introduces a number of API improvements and
scalable enough to power the most demanding enterprise Tip Caucho’s internal testing shows performance benefits as
well. Make sure to get the JDK, not just the JRE.
sites. Beginning as a Servlet and JSP engine in 1998, Resin
has since evolved to support the Java EE 6 Web Profile within Unix and Mac OS X installation
highly integrated implementations of Servlet 3.0, CDI, and EJB To install Resin on Unix and Mac OS X, you’ll need to compile
3.1 Lite. In addition to the Web Profile standards, Resin also the JNI code for Resin. Before you compile, you’ll need an
includes a high performance JTA transaction manager, a JMS environment capable of compiling C code (gcc, etc.). You’ll
provider, clustering, connection pooling, and a management probably also want OpenSSL, though this isn’t strictly required.
console. Once you’ve unpacked Resin, it should create a directory with
the full Resin version name (e.g. resin-pro-4.0.4). Change to
Resin is available in two flavors: Resin Open Source and
this directory and run the following commands:
Resin Professional. Resin Open Source is licensed under the
GPL and has all the features necessary for Java EE 6 Web $ ./configure
$ make
Profile development. Resin Professional builds on Resin Open $ sudo make install
Source and offers advanced features such as clustering (both
You’ll need to run the last command (make install) as root so
traditional and cloud), fast native I/O, proxy caching, and
www.dzone.com

you can install Resin system wide. By default, this installs Resin
OpenSSL integration.
in /usr/local/resin-<version>, but you can change this behavior
by passing the --prefix= to the configure command. For more
DOWNLOADING RESIN options, pass -- help to the configure command.

Resin is maintained in two branches: stable and development. Windows Installation


At the time of writing, the stable branch is Resin 3.1 and the Resin includes precompiled DLLs for the native code, so no
development branch is Resin 4.0. Users should note that compilation is necessary. Simply unpack the Resin .zip file
despite the name, each release of the development branch is directly where you’d like to install Resin and you’re done.
production ready. It’s termed “development” because all new Typically, we recommend C:\Resin.
features and APIs go into this branch, but core technologies Once you have Resin installed, you should see two .exe files
like Web Profile APIs are stable. This Refcard will deal entirely in the top-level Resin directory, resin.exe and setup.exe. resin.
with Resin 4.0 because it contains the Java EE 6 Web Profile exe launches Resin from the command line, but is used for
implementation (Resin 3.1 focused on Java EE 5) and has many backwards compatibility. setup.exe installs Resin as a Windows
new exciting features that are useful for emerging technologies Service, which we will discuss in a later section.
such as cloud deployment.

All currently available versions of Resin are listed for download


Getting Started with Caucho Resin

at http://caucho.com/download. Most users will want to


download Resin Professional, even if they haven’t purchased
a license. Without the license, Resin Professional operates
just like Resin Open Source. If you decide to upgrade later, all
you have to do is drop in a license file. Developers who want a
purely GPL version can download Resin Open Source.

the Web Profile solution for


INSTALLING RESIN Java EE applications.
Maximize your web application potential using
Resin is available in tar.gz and .zip formats for Unix, Mac OS X, Resin Web Profile and Cloud Computing support.
and Windows users. While Resin can run in a pure Java mode,
it also features some native (JNI) code that offers functionality Caucho Technology
like dropping root privileges in Unix and OpenSSL integration. 858.456.0300
sales@caucho.com
Because of these features, you’ll need to compile the JNI http://caucho.com

code if you’re running on Unix or Mac OS X. Windows DLLs

DZone, Inc. | www.dzone.com


2
Getting Started with Caucho Resin

Ubuntu Installation $ java -jar $RESIN_HOME/lib/resin.jar


--root-directory /var/www --conf /etc/resin/resin.xml start
Ubuntu users can use Caucho’s Ubuntu repository to install
Resin. Add the following lines to your /etc/apt/sources.list: If you need to stop Resin, you can run:
deb http://caucho.com/download/debian/ unstable universe $ java -jar $RESIN_HOME/lib/resin.jar stop
deb http://caucho.com/download/debian/ unstable multiverse
This command stops the Resin instance, but the Resin
After adding these lines, then run
Watchdog will still be running. The Resin Watchdog (see the
$ sudo apt-get update Hot Tip below for more info) and all Resin processes can be
This command will update your Ubuntu database with stopped by running:
information about the latest Resin releases. To install Resin, run: $ java -jar $RESIN_HOME/lib/resin.jar shutdown

$ sudo apt-get install resin-pro


Starting Resin at Boot
This will install Resin Professional. Use “resin” instead of Once you have installed Resin system-wide, you may want to
“resin-pro” if you’d prefer to install Resin Open Source. This have it start when your server boots up. Resin provides start
installation will start Resin for you automatically on startup. scripts for Unix and Windows.
Unix boot-time start up
RESIN DIRECTORY LAYOUT Resin provides an init.d script and installs it in /etc/init.d/resin.
This script is editable and essentially just starts the Resin server
Resin uses a number of directories for the server itself, using the command line interface shown above. For standard
application files, and logging. These are all configurable (as installations, it shouldn’t be necessary to modify this file, but
you saw in the installation section), but we’ll need to refer to you can configure alternate directories.
them by name later. The following table will give the names,
descriptions, and standard locations of commonly used Resin Windows Server Installation
directories: Resin includes a Windows installation program called setup.
exe to create a Windows Service. You can set parameters
Directory Description Recommended
such as the Resin Home, Resin Root, and Log Directory for
Resin Home Contains Resin server jars, JNI, and /usr/local/resin-<version> (Unix)
licenses. C:\Resin (Windows)
the service. You can also set the Service name or remove an
Root Directory Contains application content, log /var/www (Unix)
existing service.
files, and server data C:\www (Windows)

Web App Deploy Contains applications (.war files webapps/ (Subdirectory of root
Directory and exploded applications) directory)

Log Directory Contains server and access log files log/ (Subdirectory of root directory)

Resin separates the Resin Home directory, where Resin’s


libraries and licenses are contained, from the root directory,
where your applications and logs are maintained. This structure
makes it easier for you to upgrade Resin without disturbing
your applications. In other words, you can just replace your
Resin Home directory with the new Resin installation to
upgrade.

STARTING RESIN

Resin command line


Resin can be started from the command line for debugging Even though we showed Resin run as a single Java
and development purposes. To run Resin with its output sent to process above, there are actually two processes being
the console, use the following command: Hot run, Resin and a Watchdog. The Watchdog is in charge
$ java -jar $RESIN_HOME/lib/resin.jar console
Tip of launching and monitoring the Resin process. This
architecture provides additional reliability by restarting
Resin if there’s an error.
Resin can also open a standard Java debugging port on startup
using the -debug-port option:
$ java -jar $RESIN_HOME/lib/resin.jar -debug-port 8000 console
CONFIGURING RESIN

Similarly, you can have Resin open a JMX port using the –jmx- Configuring the Resin Server
port option: Resin’s server configuration is XML-based and contained largely
$ java -jar $RESIN_HOME/lib/resin.jar -jmx-port 9000 console within one file called resin.xml. The default resin.xml should
work fine for most users with single-server deployments or
To have Resin run in the background with its log output placed
developers. For more advanced configurations however, you’ll
in the log directory, run:
want to understand and modify the resin.xml file.
$ java -jar $RESIN_HOME/lib/resin.jar start
Structure of resin.xml
You may also want to set the root directory of Resin and a The XML structure of the resin.xml file models the organization
specific configuration file on the command line as well: of Resin. At the top level there is the full Resin deployment,

DZone, Inc. | www.dzone.com


3
Getting Started with Caucho Resin

which contains clusters. Each cluster is a set of servers and


(virtual) hosts. (Note that even when running a single server,
Resin considers this to be a cluster with one server.) Each host
contains web applications.

With this hierarchical structure, you can share resources and


policies across applications. For example, you could configure
a database pool shared by all applications in a single host or a
distributed cache shared by all servers in a cluster.

Configuring JVM parameters DEPLOYING APPLICATIONS


One of the most common tasks that administrators first do
when setting up a new server is to configure JVM parameters. File system deployment
Because of Resin’s Watchdog architecture, you can configure Resin offers file system-based “hot deployment” with which
these parameters directly in your resin.xml file. When the you can deploy an application by copying it to the Resin
Watchdog launches (or relaunches) a server, it will start a new “webapps” directory. The application can be either in .war
JVM with these parameters: form or an “exploded” war. If you deploy the application as a
.war, Resin will expand and start it automatically by default.
<resin>
<cluster>
<server id=”a”> Many developers may also prefer to copy their application
<jvm-arg>-Xmx512m</jvm-arg>
</server> in “exploded” form for development. Resin is able to detect
… changes to the code base (both JSPs and Java files) within
the application and automatically recompile and redeploy.
Configuring Applications with resin-web.xml
This feature can help developers iterate quickly to see code
Resin supports a number of features for applications
changes in their application.
that go beyond what Java EE standards specify, such as
database pooling, custom logs and log rotation, and security While file system-based deployment is great for developing
authenticators. All of these facilities can be configured in applications and deploying applications on a single machine,
the top-level resin.xml or in a Resin-specific application it can be difficult to manage when deploying to multiple
deployment descriptor file named WEB-INF/resin-web.xml. machines in a cluster. Resin offers a distributed deployment
This file is recognized by Resin and can be used alongside of mechanism for these cases.
the portable web.xml descriptor file to configure Resin-specific
resources. You can think of the resin-web.xml file as providing
Distributed Deployment
Resin 4.0 introduced a new clustering mechanism and a new
the <web-app> configuration in the resin.xml structure above.
deployment tool for distributed applications. This tool lets
The sections below will discuss how to configure resources in
users deploy their application once and have it distributed
the resin-web.xml file.
across all servers in a cluster, even dynamic servers that are
MONITORING AND ADMINISTRATION added after the application is deployed! (See the Clustering
section for more information about dynamic servers.)
Setting up an administrator password This tool is accessible via Ant and Maven. To use the Resin
Once you’ve started Resin, one of the first tasks you’ll want to Maven plugin to deploy, add Caucho’s Maven repository to
do is set up a password for administration tasks. To do this, just your pom.xml:
browse to http://localhost:8080/resin-admin (replace localhost
<pluginRepositories>
with the host on which you’ve installed Resin if it’s different). <pluginRepository>
There you should see a login page with a section called “Don’t <snapshots>
<enabled>true</enabled>
have a login yet?” Enter a username and password, then <updatePolicy>always</updatePolicy>
<checksumPolicy>ignore</checksumPolicy>
submit and follow the directions on the next page for copying </snapshots>
the generated password file to your Resin installation.
<id>caucho</id>
<name>Caucho</name>
Once you’ve installed the password file, Resin will restart <url>http://caucho.com/m2-snapshot</url>
</pluginRepository>
automatically and you can login with the password you’ve </pluginRepositories>
set up. The administration application features a number of
monitoring resources for web applications, the proxy cache, Once you have the plugin available, add it to your build
server configuration, cluster status, memory usage, CPU usage, configuration and specify the administrator username and
sampling-based profiling, and post-mortem failure analysis. password that you setup in the administration application:

DZone, Inc. | www.dzone.com


4
Getting Started with Caucho Resin

<build> <log-handler name=”com.example” level=”all” path=”example.log”


<finalName>foo</finalName> archive-format=”example-%Y%m%d.log.gz”
<plugins> rollover-period=”1D”/>
<plugin> <logger name=”com.example” level=”info”/>
<groupId>com.caucho</groupId>
<artifactId>resin-maven-plugin</artifactId>
<version>4.0.4</version> Notice that the names of both the logger and log-handler are
<configuration> “com.example”. We also changed the path to an explicit file
<server>127.0.0.1</server>
<port>80</port> name. We also added a rollover-period and an archive format.
<user>admin</user>
<password>my-admin-pass</password> In this case, the log will be rolled over (rotated) once a day and
</configuration>
</plugin>
the old log will be stored as example-%Y%m%d.log.gz, where
</plugins> the %Y%m%d will be replaced with the year, month, and date
</build>
when the log was rolled over. The .gz extension also indicates
Once you have this configuration in your pom.xml, you can to Resin that this log should be gzipped.
deploy to Resin simply by using the upload .war goal:
THE RESIN HTTP SERVER
$ mvn resin:upload-war

For more Maven options, see http://wiki.caucho.com/Maven2 Resin includes its own powerful HTTP server which features
For the related Ant plugin, see http://wiki.caucho.com/Ant comparable performance to C-based servers such as Apache
or nginx without the overhead of requiring multiple processes.
CONNECTING DATABASES Using the Resin HTTP server is recommended. In addition to
its solid performance, the Resin HTTP server also has a number
Resin features a built-in database pool which allows multiple
of convenient features for configuring SSL, rewriting requests,
database servers, load balancing, and connection checking.
and managing virtual hosts.
Resin’s database pools are integrated with Resin’s CanDI (CDI
implementation) so that developers can use annotations to OpenSSL
inject the database easily into their code. One of Resin Professional’s most useful features is OpenSSL
integration which offers far faster SSL performance than pure
The following code shows a sample database pool Java solutions. To configure OpenSSL, add an <http> tag with
configuration that you might include in your resin-web.xml for a an <openssl> tag to your server configuration:
pool of up to 150 simultaneous connections:
<resin xmlns=”http://caucho.com/ns/resin”
xmlns:resin=”urn:java:com.caucho.resin”>
<web-app xmlns=”http://caucho.com/ns/resin”>
<cluster id=”app-tier”>
<database jndi-name=”jdbc/myDb”>
<server id=”” address=”192.168.0.10” port=”6800”>
<driver type=”org.postgresql.Driver”>
<http port=”443”>
<url>jdbc:postgresql://localhost/test</url>
<openssl>
<user>myUser</user>
<certificate-file>example.crt</certificate-file>
<password>myPassword</password>
<certificate-key-file>example.key</certificate-key-file>
</driver>
<password>my-password</password>
<max-connections>150</max-connections>
</openssl>
</database>
</http>
</web-app>
</server>
</cluster>
Once you’ve configured the pool in your resin-web.xml, you …
</resin>
can either use JNDI to access the DataSource or use CDI
annotations as in the following class: Rewrite Dispatch
public class MyBusinessLogic { Resin offers a URL rewriting mechanism similar to Apache’s
@javax.inject.Inject mod_rewrite in its HTTP server. Rules for rewriting URLs can be
DataSource myDatabase;
… configured on an application, host, server, or cluster level. For
}
example, you may want to allow all requests for specific static
resources (such as images, CSS, JavaScript, etc.) to be served
LOGGING as usual, but redirect all other requests to a central controller
Servlet. You could achieve that within your resin-web.xml with
Resin uses standard java.util.logging facilities for all its the following configuration:
internal logging and implements several custom log handlers <web-app xmlns=”http://caucho.com/ns/resin”
to manage log output and log rotation. The default logging xmlns:resin=”urn:java:com.caucho.resin”>
<resin:Dispatch regexp=”\.(php|js|gif|png|css|html)$”/>
configuration in the resin.xml file provides INFO-level logging <resin:Dispatch regexp=”^” target=”/controller”/>
</web-app>
for all Resin output. The XML for this configuration is:
<log-handler name=”” level=”all” path=”stdout:”
The <resin:Dispatch> tag here is an internal redirection (i.e. the
timestamp=”[%y-%m-%d %H:%M:%S.%s] {%{thread}} “/> request is passed within the server without an HTTP redirect).
<logger name=”com.caucho” level=”info”/>
You can use tags for HTTP forwarding, FastCGI integration,
You can configure additional loggers for your classes simply load balancing, and more:
by adding another <logger> tag either to resin.xml or your Tag Behavior
application’s resin-web.xml. The default log-handler will <resin:Dispatch> Redirect a request internally
output all log messages to the log directory (or standard <resin:Redirect> Send an HTTP redirect
output, if running in console mode). You can also configure
<resin:Forbidden> Send an HTTP forbidden response
additional log-handlers to deal specifically with your classes’
<resin:Forward> Send an HTTP forward
log messages. For example, if all of your packages started with
<resin:FastCgiProxy> Redirect requests to a backend FastCGI process
“com.example”, you could configure a logger and log-handler:

DZone, Inc. | www.dzone.com


5
Getting Started with Caucho Resin

<resin:HttpProxy> Redirect requests to a backend HTTP service As an example, you may want to allow all accesses to an “/
<resin:LoadBalance> Redirect the request to a backend cluster for processing
admin” application only if the user is in the proper “admin” role:
<web-app xmlns=”http://caucho.com/ns/resin”
Virtual Hosts xmlns:resin=”urn:java:com.caucho.resin”>
<resin:Forbidden regexp=”^/admin”>
For many deployments, you may not need to use specialized <resin:Not>
virtual hosts (e.g. you only use example.com and www.example. <resin:IfUserInRole role=”admin”/>
</resin:Not>
com). In these cases, you can deploy to the standard web </resin:Forbidden>
app deploy directory and Resin will serve all your applications <resin:Dispatch regexp=”^/admin”>
regardless of the virtual host specified by the client. <resin:IfUserInRole role=”admin”/>
<resin:AddHeader name=”Cache-Control” value=”no-cache”/>
</resin:Dispatch>
If you have a deployment with more virtual hosts however </web-app>
(store.example.com, blog.example.com, etc.), you’ll need to
organize your applications in the appropriate virtual hosts. Notice that we also changed the caching behavior of the
Virtual hosts are a native concept to Resin and you can create response to indicate that browsers should not cache this
them two different ways: secure content.
• Use Resin’s host deploy directory
• Create an explicit host with the <host> tag in resin.xml DEVELOPING WITH RESIN
The host deploy directory allows you to create a directory
structure such as: Eclipse Integration
Resin features a development plugin for Eclipse based on the
/var/www/hosts/store.example.com/webapps
WTP framework. With this plugin, developers have all of the
Then any applications deployed in this webapps directory will facilities of the WTP environment with the ability to deploy to
be served from Resin as store.example.com. Resin using a variety of file system and remote deployment
options.
You may prefer to use an explicit <host> tag in your resin.xml.
This approach allows you to create a custom directory structure
and make your hosts explicit in configuration.

SECURITY

Resin provides two aspects of security for web applications:


authorization and authentication.
Authentication
Resin provides an authentication framework that allows
applications to authenticate users from a wide variety of
sources including LDAP, a JDBC database, JAAS, or a simple
XML database. The plugin includes built-in configuration files for the
development environment, but you can use any configuration
Authenticator Description
file as well.
XmlAuthenticator For basic applications with few users (such as the Resin administration
console).
To download and install the Eclipse plugin for Resin, add
LdapAuthenticator Can reference an LDAP database for users and passwords. Specify a
distinguished name prefix and/or suffix to select users. http://caucho.com/eclipse as an update site within Eclipse and
JdbcAuthenticator Specify a table and columns against which users, passwords, and roles will
install the Caucho Resin plugin.
be authenticated.
Testing Resin
JaasAuthenticator Use any JAAS plugin to authenticate users.
Resin features an embedded server interface which can be
For example, to configure the XmlAuthenticator, you might add used in test frameworks such as JUnit. The following example
this XML to your resin.xml or resin-web.xml: code shows how this API can be used to test a service injected
using Resin CDI implementation, CanDI:
<web-app xmlns=”http://caucho.com/ns/resin”
xmlns:resin=”urn:java:com.caucho.resin”> package qa;
<resin:XmlAuthenticator>
<password-digest>md5-base64</password-digest> import org.junit.*;
<user name=’myuser’ password=’IXiMnz7P2cJU18MSJjKiaA==’> import org.junit.runner.RunWith;
<role>user</role> import static org.junit.Assert.*;
<role>foo</role> import com.caucho.junit.ResinBeanContainerRunner;
</user>
</resin:XmlAuthenticator> @RunWith(ResinBeanContainerRunner.class)
</web-app> @TestConfiguration(beanXML=”beans-test.xml”)
public class AccountServiveTest {
Authorization @Inject
private AccountService accountService;
While Resin supports the Servlet standard <security-
@Test
constraint> mechanism, it also provides an easy-to-use, public void testGetAccount()
throws Exception
yet powerful alternative that is integrated with the Rewrite {
Dispatch architecture. This integration makes it possible to Account account = accountService.getAccount(1007);
assertNotNull(account);
handle requests for authorized and unauthorized users with }
}
custom logic.

DZone, Inc. | www.dzone.com


6
Getting Started with Caucho Resin

In this case, you would run this command from the machine
CLUSTERING RESIN with the network interface assigned the IP 192.168.0.10, as per
the configuration above.
Resin provides clustering capabilities for both traditional
clusters and cloud deployments. This functionality includes: Load Balancing
• Smart load balancing Once you’ve got a backend cluster set up as we did above,
• Distributed session replication you’ll probably want to add load balancing. In the same
• Distributed object caching resin.xml as the app-tier cluster, add the following cluster
• Dynamic server addition and removal
configuration for a web-tier:
• Distributed application deployment
<resin xmlns=”http://caucho.com/ns/resin”
To get started with Resin clustering, you can add <server> xmlns:resin=”urn:java:com.caucho.resin”>
configurations to a <cluster>: <cluster id=”app-tier”>

</cluster>
<resin xmlns=”http://caucho.com/ns/resin”
xmlns:resin=”urn:java:com.caucho.resin”> <cluster id=”web-tier” root-directory=”web-tier”>
<cluster id=”app-tier”> <server id=”web-a” address=”123.45.67.89” port=”6800”>
<server id=”app-a” address=”192.168.0.10” port=”6800”/> <http address=”*” port=”80”/>
<server id=”app-b” address=”192.168.0.11” port=”6800”/> </server>
...
</cluster> <host id=””>
<web-app id=”/”>
<resin:LoadBalance regexp=”” cluster=”app-tier”/>
The default resin.xml file has distributed sessions already </web-app>
enabled, so by adding these servers you’ve already got a </host>
</cluster>
cluster that can share data. </resin>

The start up procedure for Resin changes a bit when you have This configures a third Resin instance that will load balance
a cluster. When you have multiple servers configured in your requests from the outside world back to the app-tier servers.
resin.xml, you need to specify which of the servers you will use: Because the <resin:LoadBalance> tag is part of the Rewrite
Dispatch architecture, you can route load balanced requests
$ java -jar $RESIN_HOME/lib/resin.jar -server app-a start
with custom dispatch rules.

ABOUT THE AUTHOR RECOMMENDED BOOK


Emil Ong is the Chief Evangelist and a lead A comprehensive tutorial on EJB 3 co-authored by
developer of Caucho Technology. He comes from Caucho’s Reza Rahman, this book features code
an academic research background, having studied samples, performance tips, and design patterns for
security, systems, and peer-to-peer technology to gain using EJB and JPA. Novice and experienced Java
his M.S.  in Computer Science at UC Berkeley. When programmers alike will find this book useful and
Emil joined Caucho in 2006, he began by working informative.
on Quercus, Caucho’s 100% Java implementation
of PHP, and Resin, Caucho’s screamingly fast
Java application server. In 2007, Emil became the Chief Evangelist
of Caucho, adding public speaking engagements, community BUY NOW
management, and press relations to his engineering duties. Emil is books.dzone.com/books/ejb3
based in the San Francisco Bay Area.

#82

Browse our collection of over 85 Free Cheat Sheets


Get More Refcardz! Visit refcardz.com

CONTENTS INCLUDE:

About Cloud Computing
Usage Scenarios Getting Started with
n
Aldo

Cloud#64Computing

Underlying Concepts
Cost
by...

Upcoming Refcardz
youTechnologies ®
Data

t toTier
brough Comply.
borate.
Platform Management and more...

Chan
ge. Colla By Daniel Rubio

tion:
dz. com

also minimizes the need to make design changes to support


CON

tegra ternvasll
ABOUT CLOUD COMPUTING one time events. TEN TS
INC ■
HTML LUD E:

us Ind Anti-PPaat
Basics
Automated growthHTM
ref car

Web applications have always been deployed on servers & scalable


L vs XHT technologies

nuorn

Valid
ation one time events, cloud ML
connected to what is now deemed the ‘cloud’. Having the capability to support

Java GUI Development


Usef
Du
ti

ul M.
computing platforms alsoulfacilitate
4 Open the gradual growth curves

n an
Page Source

o

s
Vis it

However, the demands and technology used on such servers Structure

C
faced by web applications. Tools

Core
By Key ■
Elem

atte
has changed substantially in recent years, especially with Structur
E: al Elem ents
INC LUD gration
NTS
P the entrance of service providers like Amazon, Google and Large scale growth scenarios involvingents
specialized
and mor equipment
rdz !

ous Inte Change

HTML
CO NTE Microsoft. es e... away by
(e.g. load balancers and clusters) are all but abstracted
Continu at Every e chang
m

About ns to isolat
relying on a cloud computing platform’s technology.
Software i-patter
space

Adobe Catalyst
rdz .co


n
Re fca

e Work
Build
riptio
and Ant These companies
Desc have a Privat
are in long deployed trol repos
itory web applicationsge HTM
L BAS

to mana
Patterns Control

that adaptDeve
lop softw
and scale to
n-con
large user
a versio bases,ng and making them In addition, several cloud computing ICSplatforms support data
les to ize mergi
ment
rn
Version e... Patte it all fi minim le
tier technologiesHTM
Manage s and mor e Work knowledgeable in amany
ine to
mainl aspects related tos multip
cloud computing. that Lexceed the precedent set by Relational
space Comm and XHT

ref ca

Build
re

tice Privat lop on that utilize HTML MLReduce,


Prac

Deve a system Database Systems (RDBMS): is usedMap are web service APIs,
Build of work prog as thescalethe foundati By An
Ge t Mo

This Refcard will introduce e within


to you to cloud riente computing, with an
d units
RATION
etc. Some platforms ram support large grapRDBMS deployments.

The src
INTEG softwar emphasis on these providers, so es by
task-o it
youComm can better understand and Java s written in hical on of
all attribute dy Ha
also rece JavaScri user interfac web develop and the rris
Vis it

OUS

Flash Builder 4
chang
ding code Level
as the desc
the ima alt attribute ribes whe
www.dzone.com

a Task
ive data pt. Server-s
ce
NTINU of buil tr what it is a cloud computing es as platform can offer your ut web output e in clien ment.
T CO cess ion con it chang e witho likew ide lang t-sid e ge is describe re the ima
ise use mec hanism. fromAND
e name CLOUD COMPUTING PLATFORMS
the pro ject’s vers applications. and subm sourc
ABOU (CI) is
with uniqu are from web
The eme pages and uages like Nested
unavaila s alte ge file
rd z!

a pro the build softw um was HTM ble. rnate can be


gration ed to Label ies to
build minim UNDERLYING once CONCEPTS L and rging use HTM PHP tags text that found,
ous Inte
activit the bare standard a very loos XHTML Tags
committ to a pr USAGE SCENARIOS ate all
gurat
ion cies to t
ely-defi as thei Ajax
technolo L can is disp
Continu ry change ization, cannot be (and freq
Autom nden ymen layed
tion r visu
Re fca

a solu inef tool depe same


deplo t need but ned al eng gies if
eve (i.e., ) alled the nmen for stan as software languag overlap uen
(i.e., t, use target enviro it has ine. HTM
e-inst
with blem Amazon EC2: Industry
whether standard
dards and virtualization
e with b></ , so <a>< tly are) nest
patterns-patterns ar pro ymen
ory. d deploEAR) in each has bec become very little L a> is

Maven 3
reposit ed via particul tions that e Pay only what you consume
tagge or Amazon’s cloud you cho platform
computing
the curr isome
heavily basedmoron fine. b></ ed insid
anti e imp a></
For each (e.g. WAR
ent stan ose to writ
lain the t
es more e
not lega each othe
and x” solu b> is
be exp text) to “fi duc Web application deployment ge until
nden a few years
t librari agonmen was similar app ortant,
ns are to pro packa t enviro industry standard
that will softwaredardand virtualization
e HTM technology.
Mo re

CI can ticular con used i-patter they tend but can


all depe all targe
s will L or XHT arent. Reg the HTM l, but r. Tags
etimes s. Ant tices,
to most phone services: alizeplans with le that
late fialloted resources, ts with an and XHT simplify all help ML, und ardless
L VS
XHTM <a><
in a par hes som , Centr temp you prov b></
enting your
ces end nmen
pro prac incurred cost whether a single
such resources on
were consumed
enviro orthenot. ML of L
in the rily bad
based t Virtualization
muchallows aare physical pieceothe ofr hardware ideto be erstand HTML
implem
eate
approac ed with the cial, but, ies are nt targe es to
of the actually web cod a solid ing has
necessa pared to into differe
opert chang
efi itting utilized by multiple operating simplerThis allows
function systems. ing.resourcesfoundati job adm been arou
associat to be ben e builds
Ge t

are not n com Cloud computing as it’semot known etoday


e comm
has changed this.
befor commo alitytohas than Fortuna on irably, nd for
They
etc. they
Build (e.g. bandwidth, memory,
n elem CPU) be allocated exclusively totely exp som
lts whe that job
ually,
appear effects. rm a
Privat , contin nt team Every mov
entsinstances. ed to CSS
used
to be, HTM ected.
has exp e time. Whi
ed resu ion The various resourcesPerfo consumed by webperio applications
dically (e.g.
opme pag
individual operating system because
L Brow Early
adverse unintend Integrat
sitory Build r to devel common e (HTML . ser HTM anded le it has
web dev manufacture L had very
Repo
e ous bandwidth, memory, CPU) areInteg tallied
ration on a per-unit CI serve basis or XHT far done
duc
Continu Refcar
rm an from
extensio .) All are limited mor e than
om

pro ML shar its


tern.
ack rs add
(starting from zero) by Perfo all major cloud
feedb computing platforms. As a user of Amazon’s essecloud
EC2 elopers
nti computing es platform, you are result anyb
on layo
he pat tion he term le this s toma
ted
hey occur d based n H c ed
d

DZone, Inc.
ISBN-13: 978-1-934238-68-4
140 Preston Executive Dr. ISBN-10: 1-934238-68-6
Suite 100
50795
Cary, NC 27513

DZone communities deliver over 6 million pages each month to 888.678.0399


919.678.0300
more than 3.3 million software developers, architects and decision
Refcardz Feedback Welcome
$7.95

makers. DZone offers something for everyone, including news,


refcardz@dzone.com
tutorials, cheat sheets, blogs, feature articles, source code and more. 9 781934 238684
Sponsorship Opportunities
“DZone is a developer’s dream,” says PC Magazine.
sales@dzone.com
Copyright © 2010 DZone, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, Version 1.0
photocopying, or otherwise, without prior written permission of the publisher.

Potrebbero piacerti anche