SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
RichFaces In The Cloud

Jay Balunas              Alex Smirnov
RichFaces Project Lead   RichFaces Architect
JBoss, by Red Hat Inc.   Exadel Inc.


            JavaOne
            September, 2010
What Are We Saying?
• Flavor of "Cloud"
• Google App Engine (GAE)
  o Restrictions
  o JSF 2 & GAE
• Making it work
• RichFaces/JSF 2 maven archetype
• RichFaces showcase example
Cloud Tasting
Google App Engine

• Platform as a Service ( PaaS )
• Operating system agnostic
• Proprietary application engine
  o Benefits & problems
• Supports Java & Python
• Built in storage
Advantages
• Easy setup
• Fast/easy deployments
• Simple administration
• No need to worry about:
     • OS
     • Hardware
     • Patches
     • Backups
• Free to get started
     • Fine grained pricing
• Effortless scalability
Restrictions
• VERY limited threading
• Restricted class access
    • Java2D
    • CORBA
    • RMI
• No JNI
• Requests limited to 30 sec. by default
• No write access to filesystem
From Java Point of View
•   Java 6 runtime.
•   Servlet 2.4 container.
•   JPA and JDO for Google Big Table.
•   Additional services:
    o Caching
    o Task Queues
    o Authentication
    o Email, XMPP, OAuth.
JSF 2.0 and Google App Engine
• Must disable threads for:
    • Initialization
    • Resource handling
• Should run in "Production" stage.
• Custom classes required for restricted APIs
    • Including working around Java2D
• “Push” technologies have problems
How RichFaces Makes It Work
Base RichFaces uses restricted API

• Java2D
    • dynamically-generated images
    • Visual theme backgrounds
    • <rich:paint2D> component
• Push
    • Architecture doesn't allow serialization of push
      listener
    • Polling is available
• Cache services (optional)
    • Configured to use filesystem
    • Require write access
How RichFaces Makes It Work

1.Pre-Generate resources at compile time
2.Do not use Push component ( yet )
3.Configure cache to use Google memcache
 implementation
RichFaces Maven Resources plugin
Resource Plugin:

• Substitute skin parameters to CSS for all skins used by
  application
• Compress CSS files
• Provides relative URLs in CSS
• Generates skin images
• Extracts all JavaScript files used by application and
  compress them
• Generates descriptor for all processed files.
     • RichFaces framework use this descriptor to point to
        appropriate resources
Resource Plugin usage
• Define plugin in Maven build:
      <plugin>
         <groupId>org.richfaces.cdk</groupId>
         <artifactId>maven-resources-plugin</artifactId>
         <version>4.0.0-SNAPSHOT</version>
         ....

   • Configure:            Full example:
      • Skins              http://bit.ly/RF_RESOURCE_PLUGIN
      • Content types
      • Class Mappings
•Update web.xml with resource location init param
    org.richfaces.staticResourceLocation
RichFaces New GAE Archetype
• Create your own JSF/RF App in minutes
    • Standard maven archetype
mvn archetype:generate
   -DarchetypeGroupId=org.richfaces.archetypes
   -DarchetypeArtifactId=richfaces-archetype-gae
   -DarchetypeVersion=4.0.0-SNAPSHOT
   -DgroupId=<yourGroupId>
   -DartifactId=<yourArtifactId>
   -Dversion=<your-version>

• Create your app on GAE server ( <app-name>)
• Update “appengine-web.xml” with <app-name>
• Use “appcfg” from GAE SDK to deploy
RichFaces New GAE Archetype

http://<app-name>.appspot.com


          Thats it!!!
RichFaces-Showcase on GAE
Wrap up and Q&A

Contenu connexe

Tendances

Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with Wakanda
Alexandre Morgaut
 

Tendances (20)

Netbeans 6.1 Talk
Netbeans 6.1 TalkNetbeans 6.1 Talk
Netbeans 6.1 Talk
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško VukmanovićJavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
JavaCro'14 - WebLogic-GlassFish-JaaS Strategy and Roadmap – Duško Vukmanović
 
Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen
Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen
Oracle 12c Launch Event 02 ADF 12c and Maven in Jdeveloper / By Aino Andriessen
 
Spring.new hope.1.3
Spring.new hope.1.3Spring.new hope.1.3
Spring.new hope.1.3
 
Spring Boot. Boot up your development
Spring Boot. Boot up your developmentSpring Boot. Boot up your development
Spring Boot. Boot up your development
 
JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!JEE Conf 2015: Less JS!
JEE Conf 2015: Less JS!
 
Java EE 8 Update
Java EE 8 UpdateJava EE 8 Update
Java EE 8 Update
 
How lagom helps to build real world microservice systems
How lagom helps to build real world microservice systemsHow lagom helps to build real world microservice systems
How lagom helps to build real world microservice systems
 
Database Migrations with Gradle and Liquibase
Database Migrations with Gradle and LiquibaseDatabase Migrations with Gradle and Liquibase
Database Migrations with Gradle and Liquibase
 
Laravel
LaravelLaravel
Laravel
 
Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with Wakanda
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
 
Support Tools für die Admin-Konsole - Nebil Kisa, Advanced Support Engineer
Support Tools für die Admin-Konsole - Nebil Kisa, Advanced Support EngineerSupport Tools für die Admin-Konsole - Nebil Kisa, Advanced Support Engineer
Support Tools für die Admin-Konsole - Nebil Kisa, Advanced Support Engineer
 
JDBC
JDBCJDBC
JDBC
 
Agile Site built on the top of Oracle WebCenter Sites
Agile Site built on the top of Oracle WebCenter SitesAgile Site built on the top of Oracle WebCenter Sites
Agile Site built on the top of Oracle WebCenter Sites
 
Container Landscape in 2017
Container Landscape in 2017Container Landscape in 2017
Container Landscape in 2017
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in Anger
 
Introduction to CQ5
Introduction to CQ5Introduction to CQ5
Introduction to CQ5
 

En vedette

En vedette (6)

RichFaces 4 Component Deep Dive - JAX/JSFSummit
RichFaces 4 Component Deep Dive - JAX/JSFSummitRichFaces 4 Component Deep Dive - JAX/JSFSummit
RichFaces 4 Component Deep Dive - JAX/JSFSummit
 
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
A Peek At The Future: Going Beyond JavaServer Faces 2.0 With RichFaces 4
 
The Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java DeveloperThe Mobile Web Revealed For The Java Developer
The Mobile Web Revealed For The Java Developer
 
Realtime web application with java
Realtime web application with javaRealtime web application with java
Realtime web application with java
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Similaire à Rich faces in_the_cloud_mini_booth

3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k
IBM
 
Rad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh K
Roopa Nadkarni
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
daveayan
 
Java EE 6, Eclipse @ EclipseCon
Java EE 6, Eclipse @ EclipseConJava EE 6, Eclipse @ EclipseCon
Java EE 6, Eclipse @ EclipseCon
Ludovic Champenois
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanth
Ravikanth Chaganti
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
Ulrich Krause
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
Igor Anishchenko
 

Similaire à Rich faces in_the_cloud_mini_booth (20)

Google Cloud Platform, Compute Engine, and App Engine
Google Cloud Platform, Compute Engine, and App EngineGoogle Cloud Platform, Compute Engine, and App Engine
Google Cloud Platform, Compute Engine, and App Engine
 
Developing for the Atlassian Ecosystem
Developing for the Atlassian EcosystemDeveloping for the Atlassian Ecosystem
Developing for the Atlassian Ecosystem
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k3 rad extensibility-srilakshmi_s_rajesh_k
3 rad extensibility-srilakshmi_s_rajesh_k
 
Rad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh KRad Extensibility - Srilakshmi S Rajesh K
Rad Extensibility - Srilakshmi S Rajesh K
 
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB MeetupMariaDB 10.1   what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
MariaDB 10.1 what's new and what's coming in 10.2 - Tokyo MariaDB Meetup
 
01/2009 - Portral development with liferay
01/2009 - Portral development with liferay01/2009 - Portral development with liferay
01/2009 - Portral development with liferay
 
JSF2
JSF2JSF2
JSF2
 
Java EE 6, Eclipse @ EclipseCon
Java EE 6, Eclipse @ EclipseConJava EE 6, Eclipse @ EclipseCon
Java EE 6, Eclipse @ EclipseCon
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanth
 
Get Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty RepositoryGet Rapid Right-sized and Recent with the Liberty Repository
Get Rapid Right-sized and Recent with the Liberty Repository
 
JHipster
JHipsterJHipster
JHipster
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Modern Web Framework : Play framework
Modern Web Framework : Play frameworkModern Web Framework : Play framework
Modern Web Framework : Play framework
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with Chef
 
Java EE8 - by Kito Mann
Java EE8 - by Kito Mann Java EE8 - by Kito Mann
Java EE8 - by Kito Mann
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
 

Rich faces in_the_cloud_mini_booth

  • 1. RichFaces In The Cloud Jay Balunas Alex Smirnov RichFaces Project Lead RichFaces Architect JBoss, by Red Hat Inc. Exadel Inc. JavaOne September, 2010
  • 2. What Are We Saying? • Flavor of "Cloud" • Google App Engine (GAE) o Restrictions o JSF 2 & GAE • Making it work • RichFaces/JSF 2 maven archetype • RichFaces showcase example
  • 4. Google App Engine • Platform as a Service ( PaaS ) • Operating system agnostic • Proprietary application engine o Benefits & problems • Supports Java & Python • Built in storage
  • 5. Advantages • Easy setup • Fast/easy deployments • Simple administration • No need to worry about: • OS • Hardware • Patches • Backups • Free to get started • Fine grained pricing • Effortless scalability
  • 6. Restrictions • VERY limited threading • Restricted class access • Java2D • CORBA • RMI • No JNI • Requests limited to 30 sec. by default • No write access to filesystem
  • 7. From Java Point of View • Java 6 runtime. • Servlet 2.4 container. • JPA and JDO for Google Big Table. • Additional services: o Caching o Task Queues o Authentication o Email, XMPP, OAuth.
  • 8. JSF 2.0 and Google App Engine • Must disable threads for: • Initialization • Resource handling • Should run in "Production" stage. • Custom classes required for restricted APIs • Including working around Java2D • “Push” technologies have problems
  • 9. How RichFaces Makes It Work Base RichFaces uses restricted API • Java2D • dynamically-generated images • Visual theme backgrounds • <rich:paint2D> component • Push • Architecture doesn't allow serialization of push listener • Polling is available • Cache services (optional) • Configured to use filesystem • Require write access
  • 10. How RichFaces Makes It Work 1.Pre-Generate resources at compile time 2.Do not use Push component ( yet ) 3.Configure cache to use Google memcache implementation
  • 11. RichFaces Maven Resources plugin Resource Plugin: • Substitute skin parameters to CSS for all skins used by application • Compress CSS files • Provides relative URLs in CSS • Generates skin images • Extracts all JavaScript files used by application and compress them • Generates descriptor for all processed files. • RichFaces framework use this descriptor to point to appropriate resources
  • 12. Resource Plugin usage • Define plugin in Maven build: <plugin> <groupId>org.richfaces.cdk</groupId> <artifactId>maven-resources-plugin</artifactId> <version>4.0.0-SNAPSHOT</version> .... • Configure: Full example: • Skins http://bit.ly/RF_RESOURCE_PLUGIN • Content types • Class Mappings •Update web.xml with resource location init param org.richfaces.staticResourceLocation
  • 13. RichFaces New GAE Archetype • Create your own JSF/RF App in minutes • Standard maven archetype mvn archetype:generate -DarchetypeGroupId=org.richfaces.archetypes -DarchetypeArtifactId=richfaces-archetype-gae -DarchetypeVersion=4.0.0-SNAPSHOT -DgroupId=<yourGroupId> -DartifactId=<yourArtifactId> -Dversion=<your-version> • Create your app on GAE server ( <app-name>) • Update “appengine-web.xml” with <app-name> • Use “appcfg” from GAE SDK to deploy
  • 14. RichFaces New GAE Archetype http://<app-name>.appspot.com Thats it!!!
  • 16. Wrap up and Q&A