An IBM survey conducted in 2010 revealed two main technology trends by 2015.
- Cloud computing will overtake on-premise computing as the primary way organizations acquire IT resources.
- Mobile application development for devices such as the Apple iPad and iPhone, Android devices, and more, will surpass application development on other platforms.
Online education is another trend that gives you the ability to learn at your own pace, in the comfort of your own home, or wherever you are. Moreover, thanks to mobile devices, you can participate "on the go".
In this article you are introduced to db2university.com, an online educational website that has been implemented using Moodle open source software deployed on the Amazon Cloud, and accessible from Android-based phones.
This article is the first in a series showing you cloud computing and mobile application development at work! Using these technologies in conjunction with DB2 database server, you will see the best practices that were followed to make db2university.com a reality. At the same time, you can learn about db2university.com as the place to go for excellent quality educational material about DB2 and other technologies.
Figure 1 shows you what db2university.com looks like at the time of writing. You are encouraged to register (it's free!) and test it out for yourself.
Figure 1. db2university.com home page
Moodle open source course management system
A vast range of materials, from videos to podcasts and eBooks are available right now on the internet for self-study. However, they are often not arranged in a way that is easily consumable, and some of the information may also be obsolete. Course management systems allow instructors to create and arrange existing materials for easy consumption. The Moodle open source course management system (CMS) is used at db2university.com.
Moodle, written in PHP, is one of the best open source CMS's in the market. Martin Dougiamas at Curtin University of Technology in Perth, Australia developed the first version in 2001. Today, there are over 52,000 registered Moodle sites, and over 950,000 registered users from more than 175 countries around the world on moodle.org.
Our journey with Moodle started late in 2009. Students at California State University, Long Beach (CSULB) were assigned, as part of one of their courses, the task to enable Moodle 1.9.6 to work with DB2 Express-C. Their contribution to the community (provided as a patch) can be found at http://moodle.org/mod/data/view.php?d=13&rid=3100&filter=1.
Early in 2010, the enablement of Moodle 2.0 was started to use DB2 Express-C. Moodle 2.0 is a major revision of the Moodle software, and has fundamental changes from the previous version in the way it interfaces with databases. At the time of writing, Moodle 2.0 Release Candidate 1 has been made available to the public. This is the version enabled to use DB2 Express-C, and the one that is running at db2university.com. When the official version of Moodle 2.0 is available, db2university.com will be updated, thereby committing its contribution to the Moodle community.
Figure 2 shows different courses available at db2university.com. You can reach this page by clicking the Learn tab in the home page, which shows the implementation of Moodle. A Moodle theme was created specifically for db2university.
Figure 2. Learn tab takes you to the Moodle implementation in db2university
Courses at db2university.com are not just about DB2. They can also be about other topics, such as PHP or Ruby on Rails. But any lesson in those courses that requires interaction with a database will use DB2. Instructors for the courses are members of the DB2 community, including university professors, professionals, IBM employees, and students.
There are two main categories for courses at the site: free courses, and paid courses. The Paypal plug-in included with Moodle is used for paid courses. Figures 3 and 4 provide more details about the course DB2 Essential Training I. This course was picked as an example of what you could do with our implementation of Moodle. Note the course has many videos, transcripts (PDF files), and links to an eBook to use as reference. Not shown in the figure are links to a course forum, web pages, assignments, and exams.
Figure 3. Contents of the DB2 Essential Training I course
Figure 4. Contents of the DB2 Essential Training I course (continued)
There is also a course at db2university.com that teaches you how to create other courses in Moodle that you can have hosted at db2university.com. Contact us if you would like to create and host your course at db2university.com, either as a free or paid course.
The second article in this series will discuss how Moodle 2.0 was enabled to work with DB2, as well as the setup required to make it work on the cloud.
Running on the Amazon cloud
Because db2university.com is hosted on the Amazon Cloud, it can take full
advantage of cloud computing benefits, including setting up
DB2 HADR for disaster recovery on the cloud.
The following AWS resources are being used:
- EC2 standard large instance (64-bit, 4 ECUs, 7.5 GB of memory, 850GB instance storage)
- EBS volumes of 50 GB size
- S3 buckets of 3 and 1 GB size
Three EC2 instances in the US-East region have been provisioned. One of
them is used to run the Moodle application and the web server, and another
one to run the DB2 database server (
primary server). The
DB2 HADR stand-by server
uses a third EC2 instance in a different availability zone within the
US-East region as the disaster recovery site.
Instance storage is used, with S3 and EBS volumes, as shown in Figure 5.
Figure 5. DB2 storage on the Amazon Cloud
Figure 5 also shows the following:
- EBS volumes are used to store DB2 data and DB2 recovery logs, currently at 50GB, but RAID may be considered for future needs.
- A different small EBS volume of 2GB is used to store the DB2 code and the DB2 configuration files.
- Instance storage is used to temporarily store DB2 backup images, but these backups will be moved to S3 for longer retention period.
- S3 storage is used for storing backup images and log archives for long retention periods. EBS volume snapshots are taken often, and they are stored in S3.
- AWS CloudFront is used to allow users to download course videos and materials from an Amazon "edge" server that is closer to the location where the user lives. The files to download are first copied to a S3 bucket, and are later replicated to the edge servers.
In terms of software, this is the setup used:
- Ubuntu Linux 10.04.1 LTS
- DB2 Express 9.7.2 for Linux 64-bit
- Moodle 2.0 Release Candidate 1
- PHP 5.3.3
DB2 Express is used, as opposed to DB2 Express-C, because the
DB2 HADR feature is being used, which is only
available starting with the DB2 Express edition.
RightScale is ideal to manage AWS resources because it is a partner of IBM, and its software gives the ability to build environments quickly using templates and scripts.
The second article in this series will describe this setup in more detail.
Enabling openID sign-in
Research shows that people landing on a web page with a complicated or long registration process tend to walk away from the site quickly. To ensure that users stay and register to db2university.com, openID sign-in is enabled. This means that people who already have a Facebook, Google, Yahoo, ChannelDB2, and other provider accounts need not enter their registration information; db2university instead asks those providers, with your consent, to share the information, as shown in Figure 6.
Figure 6. OpenID sign-in process
Click the Login button. A window shows you two ways to sign in.
- On the left side you can use your DB2 University user name and password, assuming you previously signed up to the site.
- Alternatively, as shown on the right side of the pop-up window, you can sign in using any of the different openID providers supported, such as ChannelDB2, Gmail, Yahoo, or Facebook. When you select one of the providers, the first time you go through this process you will get another page from your provider asking for your consent to share information between the sites. If you accept, the information is shared, and you will be automatically registered to db2university.
After this initial process, every time you want to log on to db2university.com you follow the same steps, but clicking on the provider button will automatically log you on to DB2 University.
The third article in this series will explain in detail how the enablement of the openID providers was done.
Using an Android-based phone to retrieve course marks
Moodle allows students to see their marks for assignments and exams on the web; however, using App Inventor, a mobile application was also developed to allow access using Android-based phones. The App Inventor is an easy to use application, as shown in Figure 7.
Figure 7. Use App Inventor for Android application to access db2university
First you need to input a mobile access code, a unique keyword that you can obtain from your profile in Moodle. Next, you can choose the course you took or are currently taking, and display all your marks.
In order for this application to work, coding is required on the client side using App Inventor, and on the server side using a web service created with Ruby/Sinatra.
The fourth article in this series explains the details of this Android application.
This article introduced db2university.com, an online educational website running Moodle open source software, enabled to use DB2 on the Amazon Cloud. The article also introduced some of its features, and provided an overview of recommended methods to design, configure, and deploy an application on the cloud. More articles in this series will delve into the details of each of the sections presented in this article.
- Use an RSS feed to request notification for the upcoming articles in this series. (Find out more about RSS feeds of developerWorks content.)
- Enroll in one of the free courses currently available at db2university.com.
- Learn about recent enhancements to DB2 Express-C in the article "What's new with DB2 Express-C 9.7.2" (developerWorks, Jun 2010).
- In the DB2 for Linux, UNIX, and Windows area on developerWorks, get the resources you need to advance your DB2 skills.
- Learn more about using DB2 with the RightScale cloud management platform.
- Learn more about Information Management at the developerWorks Information Management zone. Find technical documentation, how-to articles, education, downloads, product information, and more.
- Stay current with developerWorks technical events and webcasts.
- Follow developerWorks on Twitter.
Get products and technologies
- Download DB2 Express-C 9.7.2 and other free tools from the IBM DB2 Express-C home page.
- Build your next development project with IBM trial software, available for download directly from developerWorks.
Dig deeper into Information management on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.