- Andrew Kos
- Bill Burlein
- Bryan Williams
- Christian Vozar
- Jeff Brown
- John Kraus
- Joseph Mak
- Mark Daugherty
- Matt Van Bergen
- Melissa Geoffrion
- Michael Kang
- Michael Chan
- Michael Hodgdon
- Mike Motherway
- Molly McDaniel
- Nadia Maciulis
- Pat McLoughlin
- Paul Michelotti
- Puru Hemnani
- Rohit Srinath
- Ryan Lunka
- Tom Kelly
Sweepstakes with JBoss Infinispan, ModeShape, and others.
Tuesday, June 8, 2010
Don’t wait for Ed McMahon to come knocking on your door for this Sweepstakes. Instead, make sure you grab the CITYTECH mobile app “Summit World 2010″ which will be released to the Apple AppStore and Google MarketPlace sometime before JBoss World on June 22, 2010 (keeping fingers crossed on AppStore acceptance). Once you have the mobile app and the conference starts, you can start answering trivia questions served up by our “Trivia Server” running in the Amazon Cloud using JBoss ModeShape and Infinispan. Questions are mostly technical in nature and each correct answer is worth specific points. The more points you earn, the better your chances of winning great prizes in the sweepstakes drawing at the end of the conference. I know the marketing folks are planning to top the Kindle prizes from last year, so make sure to stop by the CITYTECH booth to see what they have in mind.
Our goal for JBoss World 2010 was to build a distributed and highly-scalable system with JBoss Community projects to show it could be done without the need for expensive commercial software. Truth be told, we also wanted to get the chance to really put some of these newer technologies to the test and make sure they delivered on their promise. We figured this Trivia Sweepstakes would be a good way to exercise the system because it gives everyone the chance to show off their technical expertise in answering the questions AND to win some cool prizes.
This was a team project at CITYTECH with several people specializing in the different technologies. As such, I don’t plan to cover each piece in depth, but I will discuss at a high level what technologies were used, where, and why. Some of the other team members will be adding their own specific blogs in the coming weeks leading up to the conference so keep an eye on those. I would also invite anyone at the conference to stop by the booth and grab someone from the development team during the conference to talk details.
The diagram below outlines a handful of the technologies used and what function they served:
Let me discuss these each briefly and how they played a part in the overall system. A shopping list of the major technologies used in the system include:
Used as the container for the RESTEasy web app which includes ModeShape and Infinispan as well in this case. JBossAS6 is included as part of CirraAS and can be monitored OOTB by RHQ, so was pretty much an automatic choice to use. Note that we also use Jetty for quick integration testing via Maven, so pretty much any servlet container will do the job.
ModeShape provides a JCR API to our data and let’s us choose one or more back-end datasources. In our case, we only had a single datasource (Infinispan) in mind so we did not need the federation capabilities (yet), but wanted to have it to front an Infinispan Cache. We chose to add this layer for several reasons: One, it provides a data access layer that is standardized (JCR). Two, our team has plenty of JCR experience from working with CRX and Jackrabbit. Finally, we wanted to take advantage of the JCR search capabilities across our data. ModeShape has several connectors included so wiring it to Infinispan is included; however, we did encounter a few hurdles on this task that I promise to elaborate on in an upcoming blog.
Infinispan provides us with an in-memory cache to store the content used in the system (users, questions, answers, etc). We are running Infinispan in the distributed mode to allow for the greatest scalability of the system without impacting performance. We have several Infinispan instances running in EC2 and via the Infinispan configuration we indicate how many copies of the content we want spread across the cluster. We always want at least 2, to ensure a single node failure does not result in the loss of data. Infinispan itself determines which nodes get which copies and handles forwarding requests to the proper nodes when the node in question does not have a copy of that content. This approach allows us to scale the system by adding Infinispan nodes as needed without degrading performance the way a replication approach would do.
A quick note on Infinispan in EC2. UDP communications are not allowed in EC2, so we have Infinispan using TCP and an Amazon S3 bucket that is accessible by all nodes as a workaround. The JGroups included with Infinispan already has an S3Ping option and Infinispan comes with a sample configuration that is ready to go. Check out the Infinispan blog at http://infinispan.blogspot.com/2010/05/infinispan-ec2-demo.html for details.
The system uses HornetQ for a high performance messaging system to capture all “system events” to allow for later consumption.
RHQ is the management console with associated agents installed on all nodes. RHQ is setup automatically if you use CirrAS AMI’s in Amazon as part of the Mgmt AMI instance. RHQ is required if you use CirrAS and allows for the management and monitoring of the other JBoss instances.
CirrAS is a sub-project of the StormGrind project. It provides 3 AMI types using the Fedora OS that allow you to have a typical JBoss cluster running in EC2. The 3 AMIs include: a “front-end” AMI that has Apache HTTPD with Mod_Cluster and JGroups configured for EC2, a “back-end” AMI that autostarts JBoss6 with a clustered profile, and a “mgmt” AMI that runs the RHQ server already mentioned. We decided to use CirrAS because it provided almost everything we needed and saved us some time setting things up. The trade-off to all this automation is that you still have to dig in and figure out exactly what the CirrAS scripts are doing. As CirrAS is still a beta version, this can be a challenge as the documentation is still pretty light.
The products available in AWS allow the system to provide the needed scalability. EC2 is used to power up JBoss instances within minutes. We have also researched using the Elastic Load Balancer to front the Apache CirrAS AMI and the Amazon RDS to serve as the write-behind CacheLoader for our Infinispan cache.
The PhoneGap framework was used to generate a cross-platform mobile application for both the iPhone and Android platforms. Note that a web-based client is also available for conference attendees without iPhone or Android devices.
A Flex application is used in the system to provide an RIA for the CITYTECH booth at the conference. The Flex app uses the RESTEasy services hosted in EC2 to access the data in ModeShape as well as BlazeDS to pull messages from the HornetQ server in EC2.
As I mentioned before, keep an eye on the CITYTECH blogs as other team members will most likely be discussing specific areas of the system in greater detail in the coming weeks. Also please stop by our booth to say hello if you are at the conference later this month.
Finally, I want to thank all the community folks who were very active in their support through the forums. As mentioned before, several of these technologies are relatively new, so having an active and responsive community to provide support is essential.
Good luck with the Trivia Sweepstakes!
For more than 19 years, Jeff has been developing well-designed, high-quality software products to meet business needs across many sectors, including: retail, government, insurance, education, and manufacturing. He has expertise in distributed messaging systems, service-oriented architecture design and implementation, and most recently has worked extensively with content management systems.
- Invisible requirements within Business requirements
- Building a better Options Predicate
- Extensionless URLs with Adobe Experience Manager
- The Life of a Tester in Adobe CQ World!
- Limitations of the CQ Parsys Model and the Implementation of a Nested Paragraph System
- Using Apache FOP to generate a PDF document based on a form submission data
- Configuring SAML in AEM 5.6
- Why You Should Get the WCM Experts Involved Early