Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Implementing your own Google App Engine

3,011 views

Published on

Google App Engine (GAE) is a popular PaaS offering. Where its scalable and reliable environment is hidden behind a custom API. This makes GAE apps hard to port over to other non-GAE environments.

But what if one could implement such similar environment? And you could simply move your GAE application’s .war file to this new environment and it would just work?

After all, at the end it’s all about the API, plus scalable and reliable services.

JBoss CapeDwarf project aims at making this a reality. This presentation will provide a glimpse into what it takes to implement something as GAE, ranging from runtime integration with JBoss Application Server, actual services implementation to last but not least, automated heavy testing.

Published in: Technology
  • Be the first to comment

Implementing your own Google App Engine

  1. 1. Implementing your own Google App Engine Aleš Justin, Red Hat
  2. 2. The goal • Take an *existing* Google App Engine app • Drop it into WildFly • It just works! • No vendor lock-in • Enable cluster debugging / testing • On-premises cloud! • Designed to scale
  3. 3. • What’s Google App Engine? • What is JBoss CapeDwarf? • How do the two work together? • The dirty details • Demo • Q&A Agenda
  4. 4. • Aleš Justin • CapeDwarf Project Founder & Lead • Old School JBoss-ian; MC, CDI, Ceylon, ... Who’s this guy?
  5. 5. “Google App Engine lets you run web applications on Google's infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it's ready to serve your users.” It’s all about services and its API! What is Google App Engine?
  6. 6. • Open source implementation of Google App Engine API • It’s all about the API, not impl - for users • Written on top of JBoss and other OS frameworks • Infinispan, Hibernate Search, HornetQ, Lucene, ... • Runs as a WildFly subsystem / extension • Management, Clustering, ... What is CapeDwarf?
  7. 7. • Super easy to setup locally - unzip & run • Same way as any WildFly / JBossAS • Trivial to setup cluster • A way to debug scalable apps • Integrated into OpenShift (Red Hat PaaS) • Own CapeDwarf cartridge / image • On-premises cloud env What is CapeDwarf?
  8. 8. • 100% pure Java • It’s all on GitHub • https://github.com/capedwarf What is CapeDwarf?
  9. 9. AppIdentity ✔ Multitenancy ✿ Blobstore ✔ OAuth ✔ Capabilities ✿ (Prospective)Search ✔ Channel ✔ Tasks ✔ Datastore ✔ URLFetch ✔ Files / GCS ✔ Users ✔ Images ✔ XMPP ✿ Logging ✔ Admin Console ✿ Mail ✿ JPA / JDO ✔ Memcache ✔ MapReduce ✔ Cron ✔ Warm-up ✔ Modules ✔ Endpoints ✔ Sockets ✔ SQL ✔ Current API matrix
  10. 10. ... or how do we know CapeDwarf actually works ... More about this in next slides :-) Testing?
  11. 11. • Google App Engine Technology Compatibility Kit (TCK) • Joint (initial) effort from Google and Red Hat • http://www.appengine-tck.org • 1000+ API tests • Additional testing - Endpoints, DataNucleus, MapReduce, Modules, Concurrency, … • GCloud support (aka Managed / Custom Runtimes) Google App Engine & CapeDwarf
  12. 12. • Runs with Maven • JUnit,Arquillian and ShrinkWrap based • Nice API test coverage report • Easy to add new containers / runtimes • Using GitHub’ “community” power; pull-request, review, ... About TCK
  13. 13. Switch screen! TCK coverage report view
  14. 14. • Simply create new TCK test • Plain JUnit @Test • @RunWith(Arquillian.class) • New ShrinkWrap @Deployment • GitHub Pull-Request Bugs?
  15. 15. • Few impl details • Datastore → Infinispan & Co. • TaskQueue → JMS / HornetQ • Endpoints → Tweaking Endpoints code • Modules • Runtime → WildFly • Subsystem → Deployers, Services, ... How does CapeDwarf work?
  16. 16. Datastore Datastore InfinispanQuery Search LuceneFS Clustering Datastore Datastore
  17. 17. App AppApp Async task JMS Invocation Tx Balancing Queue
  18. 18. • Standalone • Properly map JEE .ear onto GAE Modules logic • Setup virtual-servers for each module • Domain (TODO) • Custom DomainController • Each module gets own app server instance • Could share app servers • Testing → new Arquillian Protocol Modules
  19. 19. • Extending WildFly → New Subsystem • It’s all about DeploymentUnitProcessors • Remember JBoss Deployers? ;-) • 10+ DUPs, per phase / purpose • Almost zero configuration • Few MSC services • Fully modular • in-line API jar or as-module CapeDwarf Runtime
  20. 20. • Waiting for new WildFly9 release • Improved Infinispan7 • Hibernate Search, Lucene upgrade • CapeDwarf Managed sub-project • Using GAE API directly in WildFly • Managed / Custom Runtime https://github.com/capedwarf/capedwarf-managed CapeDwarf WIP
  21. 21. 1. Download latest CapeDwarf release • http://www.capedwarf.org/downloads/ 2. Unzip & run • <CAPEDWARF_HOME>/bin/capedwarf.sh 3. Deploy your GAE app • Via WildFly management • Drop app into deployments/ dir Try it out!
  22. 22. • CapeDwarf • JBoss.org forums • #capedwarf on Freenode IRC • capedwarf.org • ajustin@redhat.com Q&A

×