Deployment of Play! Apps on Stax.net

21 views
Skip to first unread message

knowself

unread,
Jun 11, 2010, 2:29:43 AM6/11/10
to play-framework
I've been play?ing (pun intended) with deploying on stax.net ...
because ....

A) It's FREE! ... and they will continue to have a free option it
seems in the future.
B) They have a standard SQL environment with MySQL ... instead of the
BigTable datastore that Google's App Engine insists upon. (Not so with
they business offerings ... that will include an SQL option... but
that's not for months)
C) They are using Amazon web services EC2 as the backbone of their
cloud services. Smart. Why build what is already there ... Of course
every building needs a good foundation ... but you don't have to
replace ... the ground!

I've just deployed the initial screen that every Play! app begins
with ... and I look forward to working with other developers here that
build with Play! and deploy on stax.net.

=======================================================
Java:
~~~~~
Version: 1.6.0_12
Home: /usr/lib/jvm/java-6-sun-1.6.0.12/jre
Max memory: 266403840
Free memory: 806632
Total memory: 12308480
Available processors: 1

Play framework:
~~~~~~~~~~~~~~~
Version: 1.0.2.1
Path: /mnt/var/staxapps/staxapp8625/snazcat/install/webapp.war/WEB-INF
ID: stax
Mode: PROD
Tmp dir: /mnt/var/staxapps/staxapp8625/snazcat/install/webapp.war/WEB-
INF/application/tmp

Application:
~~~~~~~~~~~~
Path: /mnt/var/staxapps/staxapp8625/snazcat/install/webapp.war/WEB-INF/
application
Name: scoreez
Started at: 06/11/2010 06:00

Loaded modules:
~~~~~~~~~~~~~~
stax at /mnt/var/staxapps/staxapp8625/snazcat/install/webapp.war/WEB-
INF/application/../modules/stax-1.0.1

Loaded plugins:
~~~~~~~~~~~~~~
0:play.CorePlugin
1:play.data.parsing.TempFilePlugin
2:play.data.validation.ValidationPlugin
3:play.db.DBPlugin
4:play.db.zdb.ZDBPlugin
4:play.db.jpa.JPAPlugin
5:play.i18n.MessagesPlugin
6:play.libs.WS
7:play.jobs.JobsPlugin

Configuration:
~~~~~~~~~~~~~~
db.pass=ScoreEZ
application.secret=asvNx5zEcfMq6uV63NAAhp0cri1qEo7Cldk3KrLjgAYei9F7Jv5z2jj9BDRSEajq
module.stax=../modules/stax-1.0.1
mail.smtp=mock
db.url=jdbc:stax://scoreez
jpa.dialect=org.hibernate.dialect.MySQLDialect
application.name=scoreez
future.escapeInTemplates=true
db.driver=com.staxnet.jdbc.Driver
future.bindJPAObjects=true
http.useETag=true
db.user=scorer
jpa.ddl=create
application.mode=prod
db=
http.cacheControl=3600

Threads:
~~~~~~~~
Thread[Reference Handler,10,system] WAITING
Thread[Finalizer,8,system] WAITING
Thread[Signal Dispatcher,9,system] RUNNABLE
Thread[main,5,main] WAITING
Thread[Timer-0,5,main] TIMED_WAITING
Thread[Timer-1,5,main] TIMED_WAITING
Thread[requestMonitor,5,main] TIMED_WAITING
Thread[ContainerBackgroundProcessor[StandardEngine[adminEngine]],
5,main] TIMED_WAITING
Thread[MySQL Statement Cancellation Timer,5,main] WAITING
Thread[Timer-2,5,main] TIMED_WAITING
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-
#0,5,main] TIMED_WAITING
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-
#1,5,main] TIMED_WAITING
Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-
#2,5,main] TIMED_WAITING
Thread[ContainerBackgroundProcessor[StandardEngine[localEngine]],
5,main] TIMED_WAITING
Thread[http-9625-Acceptor-0,5,main] RUNNABLE
Thread[http-8625-Acceptor-0,5,main] RUNNABLE
Thread[http-8625-1,5,main] WAITING
Thread[http-8625-2,5,main] WAITING
Thread[http-8625-3,5,main] RUNNABLE

Requests execution pool:
~~~~~~~~~~~~~~~~~~~~~~~~
Pool size: 0
Active count: 0
Scheduled task count: 0
Queue size: 0

Monitors:
~~~~~~~~
Application.index(), ms. -> 2 hits;
192.0 avg; 85.0 min; 299.0 max;
/app/views/Application/index.html, ms. -> 2 hits;
141.0 avg; 77.0 min; 205.0 max;
{play}/framework/templates/tags/welcome.html, ms. -> 2 hits;
114.5 avg; 71.0 min; 158.0 max;
/app/views/main.html, ms. -> 2
hits; 3.0 avg; 1.0 min; 5.0 max;

Datasource:
~~~~~~~~~~~
Jdbc url: jdbc:stax://scoreez
Jdbc driver: com.staxnet.jdbc.Driver
Jdbc user: scorer
Jdbc password: ScoreEZ
Min pool size: 1
Max pool size: 30
Initial pool size: 3
Checkout timeout: 5000

Jobs execution pool:
~~~~~~~~~~~~~~~~~~~
Pool size: 0
Active count: 0
Scheduled task count: 0
Queue size: 0
=======================================================

Cheers!

Joe Terry
http://scoreez.virtuola.staxapps.net/

knowself

unread,
Jun 11, 2010, 3:46:06 AM6/11/10
to play-framework
One more thing ... The real key ... before you pull all of your hair
out ... is to manage the "Framework ID" and how that allows you to
have multiple configurations of your app.

I use a blank id for DEV mode and "stax" for production... below is
the relevant portion of my "application.conf" ...

=========================================

# Application mode
# ~~~~~
# Set to dev to enable instant reloading and other development help.
# Otherwise set to prod.
#
application.mode=dev
db=mysql:<username>:<password>@<databasename>
jpa.ddl=create
#
# Production Settings
#
%stax.application.mode=prod
%stax.db=
%stax.db.url=jdbc:stax://<databasename>
%stax.db.driver=com.staxnet.jdbc.Driver
%stax.db.user=<username>
%stax.db.pass=<password>
%stax.jpa.dialect=org.hibernate.dialect.MySQLDialect
#
# Production Settings
#
=========================================

I have this right near the top of the "application.conf" file ... and
of course, <username>, <password> and <databasename> must match for
your local and production configuration, respectively.

I use "play id" before deployment to change the "Framework ID" before
deployment and then use "play id" to remove it when I return to local
development.

My local database is MySQL ... my production database is MySQL ...
HEAVEN !!!!

Joet
The Software Scupltor

Guillaume Bort

unread,
Jun 11, 2010, 3:55:52 AM6/11/10
to play-fr...@googlegroups.com
You can also use play war --%stax to generate a war file that will run
with stax id.

> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>

knowself

unread,
Jun 11, 2010, 3:58:56 AM6/11/10
to play-framework
Cool!

finelinestudio

unread,
Jun 16, 2010, 3:13:06 AM6/16/10
to play-framework
What's the application cold-start time like on stax?

Thanks
Tim
Reply all
Reply to author
Forward
0 new messages