Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

An Integrated Moodle System Using VM Technology

to Achieve Higher Availability and Lower TCO


Hideo Masuda Kazuyoshi Murata Seigo Yasutome
Kyoto Institute of Technology Kyoto Institute of Technology Osaka Institute of Technology
Matsugasaki, Sakyou, Kyoto Matsugasaki, Sakyou, Kyoto Kitayama, Hirakata, Osaka
606-8585, JAPAN 606-8585, JAPAN 573-0196, JAPAN
h-masuda@kit.ac.jp kmurata@kit.ac.jp yasutome@is.oit.ac.jp

Yu Shibuya Michio Nakanishi


Kyoto Institute of Technology Osaka Institute of Technology
Matsugasaki, Sakyou, Kyoto Kitayama, Hirakata, Osaka
606-8585, JAPAN 573-0196, JAPAN
shibuya@kit.ac.jp naka@is.oit.ac.jp

ABSTRACT 1. INTRODUCTION
This paper describes the methodology of the Moodle system Recently, e-Learning systems are widely used in many
which we constructed using VM technology in the Center for universities and companies. In 2003, we installed “Blackboard”
Information Science at KIT. Before changing to Moodle, we had LMS in the Center for Information Science at Kyoto Institute of
been using a Learning Management System (LMS) called Technology. However, only two courses were held on it for our
Blackboard. However, it was very costly and we could not apply education consortium [1]. We asked teachers why they did not
any modifications to it. Therefore, we decided to replace it. use the LMS, and we found the following three reasons.
Our requirements of the new LMS system were as follows: (a) [P1: difficult to start using the LMS]
lower TCO including hardware and software, (b) high availability,
When a teacher wants to use our LMS, he should ask the
and (c) easy to modify the system software from the educational
maintainer to create his/her course and students’ accounts for the
and administrative point of view.
course. Since the maintainer is not working exclusively for the
To satisfy these requirements, we made up our mind to replace LMS, the set-up for the course would take some time. Moreover,
Blackboard with Moodle and to introduce virtual machine there existed the problem of how to distribute the accounts (ID
technology. Moodle is an open-source software LMS and runs on and password) to the students.
LAMP/LAPP (Linux, Apache, MySQL or PostgreSQL and PHP)
[P2: poor performance]
environment. The key ideas of our the system configurations are:
(1) use two server PCs, (2) run four web servers and two database/ Our LMS runs on a single PC server with Windows 2000
NFS servers on different virtual machines, and (3) introduce Server edition. There were some teachers who used our LMS for
mirroring. The contents on NFS and database servers are assured the programming course, but the LMS went into overloaded state
by using "lsyncd" for real time mirroring and “pgpool” for when 60 students of the course logged in at a time. The system
database replication and fail over. configuration of LMS was not appropriately tuned.
[P3: lack of extensibility]
Categories and Subject Descriptors Though the Blackboard has large numbers of features for
C.5.5 [COMPUTER SYSTEM IMPLEMENTATION]: educational tools, those are not necessarily enough for all teachers.
Servers For example, a teacher wanted to provide dynamic learning
material such as CGI with authentication, automatic code
General Terms assessment [2] and automatic marking which are not provided by
Design, Management, Experimentation.
Blackboard. Even if he implemented these features on his own
web site, some connecting features in Blackboard were required,
Keywords such as Single Sign On and variable delegation.
Moodle, LAPP, High availability, Lower TCO.
To cope with these problems, we decided to replace the
Permission to make digital or hard copies of all or part of this work for Blackboard LMS. In section 2, the requirements of our system are
personal or classroom use is granted without fee provided that copies are described. In section 3 the design concepts are described. Then,
not made or distributed for profit or commercial advantage and that technical implementation issues are discussed in section 4. We
copies bear this notice and the full citation on the first page. To copy conclude our paper with the result and future works.
otherwise, or republish, to post on servers or to redistribute to lists,
requires prior specific permission and/or a fee.
SIGUCCS’08, October 19-22, 2008, Portland, Oregon, USA.
Copyright 2008 ACM 978-1-60558-074-6/08/10...$5.00..

315
2. REQUIREMENT and assign a server PC for each service. But, the rental cost and
operation cost of this naive solution would be very high.
2.1 Ready to use
The registration of users and classes should be automatic or We will adopt VM (virtual machine) technology. The VM
should be done at the beginning of each semester, so that every enables several OS instances to run on a real PC, and reduces the
teacher can make use of the LMS immediately whenever she/he total number of real PCs. Furthermore, if we want to increase the
wants. performance of our system by adding real PCs, VM technology
can hide the hardware differences.
2.2 Lower TCO
The hardware and software configuration of the LMS should 3.5 Use Simple Redundancy Technology
be highly optimized and daily operation cost should be reasonable The redundancy of the LMS components is essential to
in order to achieve less TCO (total cost of ownership). provide service when a certain component crashes. There are
clustering technologies and load balancing technologies to realize
2.3 Easy to modify high availability, but these technologies are very expensive and
The software code of LMS can be modified when we, the require high skilled staff for the operation and management.
teachers of the Center, want to do so. Actually, we needed to link Therefore, we decide to use only a function of synchronization.
the LMS to other systems in order to get course information, We will discuss this implementation detail in Section 4.
namely, teachers, students, day and time of the lectures.
4. IMPLEMENTATION
2.4 High availability
Once the LMS comes to be used for many courses, stopping Table 1. Specifications of our LMS
the service should be carefully avoided. Therefore, it should be
constructed to keep available as much as possible, in case of a Server PCs IBM x3650 (2 sets)
component failure. Xeon-D5160 3.0GHz x2, 6GB memory
300GB SAS x4 (600GB, RAID1+0)
3. BASIC DESIGN
Redundant Power Supply Unit
3.1 Use Open Source Software
We decided to use “Moodle” [b] as our new LMS software. Virtual Machine VMware Infrastructure 3 Starter Edition
Moodle is developed by using PHP and PostgreSQL, and runs on Software
LAMP/LAPP environment (Linux, Apache, MySQL / PostgreSQL Backup HDD Buffalo (Japanese manufacturer)
and PHP). Since all of these are open source software, not only
the initial cost becomes low, but also we can modify them as we LS-1000 (NAS, 1TB)
like. UPS APC SmartUPS-1500RMJ x2
KVM IP ADDER AdderLink IP
3.2 Use Authentication Database in the Center
In the Center for Information Science of KIT, we provide Plathome (Japanese manufacturer) PShare
campus-wide network server services and computer rooms for
education. We use an LDAP server for basic authentication, which
has the accounts of all teachers and students [3]. So, the LMS 4.1 Hardware Configurations
needs to use this LDAP service. This linkage of LMS and LDAP Our LMS system consists of two real server PCs that are
would save the account distribution work. Of course, each user configured symmetrically as shown in Figure 1. This
only has to remember a single account stored in this basic configuration is tolerant from the hardware fault of one PC.
authentication server. Moreover, each server PC has a RAID-1 (mirroring) unit and a
redundant power supply with UPS. On each server PC, we run
3.3 Use Databases of the Educational Affairs VMware Infrastructure [a] instead of Xen [c]. According to our
Section basic design described in Section 3, Xen, an open source virtual
The LMS registers all courses and students in the database of machine software, may be preferable than VMware, but no
the educational affairs section. This will make our LMS ready to companies could support Xen system at that time of bid of our
use for teachers. new system. We operate a web server and a database server as the
guest OS on VMware. Because each server PC is equipped with
3.4 Use Virtual Machine Technology two dual-core CPUs, we estimate that each PC can run up to four
guest OSs. Moreover, it is not so difficult to replace a server PC
We want to manage two LMS environments, one is in the
with other PC because OS environment is isolated from hardware
operation and the other is in the experimental environment to
components by VMware.
develop the new features. For security issues, front-end (apache,
PHP) and backend (PostgreSQL) should run on separated OS
instances. A traditional solution would be to use a number of PCs

316
Figure 1 : Configuration of our LMS

4.2 Operating Systems 4.4 Data Replications


We use CentOS [d] as the guest operating system. CentOS is The hard disk of the database server is RAID1, so the failure
an enterprise-class Linux distribution derived from sources freely of a single hard disk drive will not affect database service.
provided to the public by RedHat. CentOS conforms fully to the However, if the guest OS on which database server runs stops,
upstream vendors redistribution policy and aims to be 100% whole Moodle system cannot continue. To avoid this situation, we
binary compatible. Four web servers and two database/NFS prepared two database servers and usually only use one. The other
servers run on different virtual machines as shown in Figure 1. database is synchronized and is a stand by.
This enables us to isolate outgoing web service and inner database
For file service, the data files on NFS servers are
service.
synchronized by "lsyncd", which is a simple replication tool based
The four web servers are symmetric configuration and must on "rsync". Therefore, we can easily operate and diagnose this
serve the same contents such as uploaded files via Moodle. It file system. For database service, two database servers are
requires shared storage, so the database server also acts as an NFS synchronized by "pgpool", which is also a simple replication tool
server. The difference between a web server and a database server for PostgreSQL. If pgpool fails, the system operator can continue
is whether the server has the user data installed. Therefore, we the database service by disabling pgpool and switching to
separate the user data into isolated disk partition (/export), and the postgresql.
other part that affects OS operation is common to all guest OSs.
The size of the common part is 25 GB, and the size of user data is 4.5 User Authentication
300 GB. By communizing all guest OS images, they can be The basic authentication server in the Center keeps the
updated in the same way, so we do not care the difference of Web account of all students and teachers. Since we found some
server and database server for updating and duplicating. attributes of LDAP is not compatible with Moodle, we modified
the LDAP authentication module of Moodle to automatically
4.3 Redundancy of Web services generate necessary fields for Moodle from one or more LDAP
Moodle uses cookies for tracing the user. In addition, for attributes.
multiplexing web servers, Moodle has methodology that passes a
cookie’s information to the database. Therefore, we can 4.6 Course Creation Policy
implement load balancing of web servers using DNS round robin The educational affairs section of KIT manages two master
function, instead of using an expensive load balancer appliance. datasets; one is the course dataset which contains course name,
In a precise sense DNS round robin can not balance the load date, time, and teacher name. The other is a student dataset in
completely, but our system avoids SPF (single point of failure). which courses of each student are recorded. We thought it would
be risky to directly connect these datasets with our LMS, so we
Our system consists of total four web servers (two servers in
use an intermediate data file; the datasets are converted to CSV
each real server PC). This achieves fault tolerance from one guest
format and are put in the specific directory of LMS system by our
OS failure or from one real server PC’s crash.

317
software, then the CSV file is read by Moodle in order to reflect authentication and course information provided by other system,
the changed data. and attained low-cost operation that would be higher for the
previous Blackboard system.
4.7 Co-operation with Other System We did not introduce the technologies such as clustering and
Assume the situation where program source code which a
load balancer. This is because these technologies require advanced
student has just uploaded into Moodle should be checked right
technical skill, which would take too much time for our technical
away for a programming course. This could be achieved by
staff to master.
writing such a module for Moodle, however, it would be much
better to use other web servers for source code checking from the The future tasks are to scale the system by sharing further the
view point of system load. database load in order to support more users at a time, to enhance
software modules for supporting lecture-based classes, and to
Moodle can generate GET method with parameters in link
study how to enable students to access our LMS from their cell
resource module. The parameters are inside values in Moodle. It
phones.
is very weak for the authentication delegation because secret data
value of Moodle is hashed in “md5 (PASSPHRASE + IPaddress)”,
i.e. users using proxy can easily replay attack. 7. ACKNOWLEDGMENTS
The authors thank Mr. M. Takeuchi in Mitani Corporation Japan.
Therefore we developed a module that secret information can This research was supported in part by Grant-in-Aid for Education
be generated flexible by teacher, for example, teacher generates a and Research, Kyoto Institute of Technology and Grant-in-Aid for
file resource which contains the keyword like Scientific Research (No.19500069), Ministry of Education,
“%%MOODLE_ENCRYPTEDCODE_PARAMS = userusername, Science and Culture, Japan.
remoteaddr%%”, then the module replaces above keyword by
“md5(PASSPHRASE + userusername + remoteaddr)”. This value
can not be used to replay attack by other user. By doing this, safer 8. RESOURCES
authentication cooperation is constructed. [a] VMware http://www.vmware.com/

Moreover, we are developing the SNMP pull module for [4]. [b] Moodle http://www.moodle.org/
It will get the information from client PC via SNMP when user on [c] Xen http://www.xensource.com/
client PC requests the evaluation. [d] CentOS: The Community ENTerprise Operating System
5. LESSON LEARNED http://www.centos.org/

5.1 1600 courses in Moodle [e] lsyncd - Live Syncing Daemon


There are about 1,600 courses in KIT in 2008, and all of http://www.pri.univie.ac.at/index.php?c=show&CE
them have been registered in Moodle before the start of this WebS_what=Lsyncd
semester. At the beginning of the semester the database server has [f] pgpool http://pgpool.projects.postgresql.org/pgpool-ja.html
experienced an overloaded state. This is because Moodle
generates a course list every time when each user logs in, and this 9. REFERENCES
task is quite heavy. This predicament was not observed when [1] Consortium of education for engineering related universities,
only a few dozen courses were registered. We have solved this IT council News letter, No.1, 3.1 (2003) (in Japanese).
problem by increasing the working memory size of the database.
[2] A. Nunome, M. Fukuzawa and H. Hirata. Development of an
E-learning Back-end System for Code Assessment in
5.2 Single course with multiple course codes
Programming Practice, IPSJ 2008-05-ICM-11 (2008) (in
We found that some courses have multiple course IDs for a
Japanese).
single course. The course is actually held in one classroom, but it
has an ID for one department and another ID for another [3] H. Masuda, K. Murata and Y. Shibuya. The implementation
department during the curriculum transitional period. This of integrated Moodle pilot system on KIT with low cost and
scenario may occur in other universities. We treated those high availability, IPSJ 2008-05-ICM-12 (2008) (in Japanese).
exceptional courses as “meta course” of Moodle, but it requires [4] H. Masuda, M. Nakanishi and S. Yasutome. Hands-on
manual intervention. We will discuss to assign a new ID such Training Course for Server Setup and Operations using
courses with educational affairs section. Diskless Computer System, ITHET2007 (2007).

6. CONCLUSIONS
In this paper, our Moodle system configuration based on
Virtual Machine technology is shown. The system utilizes user

318

You might also like