governance on the server side, along with a generic Android ... mentation methods utilizing the Java Agent DEvelopment ... for Android mobile applications.
An InfoStation-based Distributed mLearning System Zhanlin Ji, Ivan Ganchev, M´airt´ın O’Droma Telecommunications Research Centre(TRC), University of Limerick, Ireland {Zhanlin.Ji; Ivan.Ganchev; Mairtin.ODroma }@ul.ie
Abstract—Within this paper, a client-server mobile eLearning (mLearning) system is presented, which operates within an InfoStation-based networking environment for the provision of mobile services to users under the always best connected and best served (ABC&S) paradigm. A light-weight distributed framework is utilized for service governance on the server side, along with a generic Android mobile application operating on the client side. This distributed design helps improving the system’s reliability and performance as it allows mLearning services to be deployed on different machines located in different areas. Keywords-mLearning; InfoStations; Android; Mobile Application; Distributed Framework; ZooKeeper
I. I NTRODUCTION The mobile eLearning (mLearning) [1] system presented in this paper could be used to enhance traditional educational practices or as an additional tool to support the distance learning process. It is deployed to operate on an InfoStation-based network as a ‘anywhere-anytimeanyhow’ oriented system [2]. With a multi-agent system support [2], the requested mLearning services are personalized and customized to suit each individual mobile user who gets access to them through the ‘best’ wireless connection under the always best connected and best served (ABC&S) communication paradigm [3]. The system presents a novel infrastructural solution for mLearning service provisioning facilitated by the next-generation mobile applications. The utilization of an InfoStation-based network architecture by the system has been described in [4]. This architecture is context-aware and agent-oriented, and consists of three tiers, as shown in Figure 1.
Tier 2: InfoStations. Besides facilitating mobile users with access to the mLearning services via the ‘best’ available wireless connection, the InfoStations provide dynamic service/content adaptation by taking into account the current user/service/network context for enhanced service personalization and contextualization. Tier 3: InfoStation Centre. It provides a highperformance distributed environment for the efficient provision of mLearning services. The InfoStation Centre (server side) controls, updates and synchronizes information across all connected InfoStations within the network. It contains also user profile managers, which record mobile user’s personal information, including user’s location, ID, test results, interests, mobile devices, etc. and service managers, which facilitate the delivery of personalized service content to users based on the current context. The concept of this mLearning system has been discussed in detail in [5] along with corresponding implementation methods utilizing the Java Agent DEvelopment framework (JADE) [6], the Wireless Universal Resource File (WURFL) [7], and the Wireless Abstraction Library by Luca - Next Generation (WNG) [8]. A distributed framework for the provision of mLearning services has been introduced there along with its main component the inversion of control (IoC) light-weight container. A new version of the software architecture of this mLearning system, along with its associated client and server components, is the focus of the current paper. The paper details the re-designing of the system with a clientserver design pattern. An Android mobile application was developed to operate on the client side and a distributed web application operates on the server side for improving the system performance. II. S ERVER S IDE
Figure 1.
The 3-tier InfoStation-based network architecture [4].
Tier 1: User mobile devices. A personal Assistant Agent (PAA), installed on each mobile device, facilitates the initial authentication, authorization and accounting (AAA) of the user, personalizes the user requests for mLearning services (i.e., mTest, mLecture, mLibrary, etc.), and visualizes the results of the service requests’ execution.
The server side is built with a light-weight distributed framework which allows loose coupling between the architectural components. Figure 2 depicts the multi-component architecture of the server side of the system. The varnish cache [9] acts as a reverse proxy server for accelerating the HTTP responses. The web server runs a number of Nginx servers providing a load balancing function. A producer/consumer model serves as a distributed framework for service governance (Figure 3), which provides sync-over-async and request-response messaging functions, load-balancing/failover/clustering capabilities with a remote procedure call (RPC) mechanism, etc. A Zookeeper [10] acts as a register centre for the services. The producer registers a service to the Zookeeper, when
192,168.1.20
192.168.1.40 192.168.1.30
192.168.1.10 Nginx A
Redis Master
ZooKeeper
Tomcat 1
192.168.1.21
192.168.1.41
Slave Varnish 192.168.1.31 Requests
Keepalived Varnish
Load Balancer
Nginx B IMG CSS JS
192.168.1.22
Master
mLecture mLecture
192.168.1.45
mLibrary mLibrary
Sphinx Index
192.168.1.32
192.168.1.23
Tomcat 3
Varnish Cache
Redis slave
Redis Server
Tomcat 2
192.168.1.11 Nginx C File Upload
mTest
mTest
Service Provider
Nginx D
Consumer
WEB Server
Service Governance
Index Server
Hadoop
Figure 2: The Distributed Architecture of the Server Side. Figure 2. The Distributed Architecture of the Server Side.
a consumer subscribes to a service. Then the Zookeeper notifies the consumer and the corresponding service is invoked. The leader in Figure 3 is elected by a Quorum. If the leader goes down, a new leader is elected. The Redis cluster was built with master nodes and slave nodes. The Sphinx index [11] provides a full-text search functionality for Android mobile applications. The Hadoop is used as a cloud environment for running Map/Reduce algorithms and supporting the distributed file system.
Follower
Follower
Leader Subscribe
Web Tier
Figure 3.
Regisiter mServices
The Service Producer/Consumer Model.
III. C LIENT S IDE The Allied Business Intelligence (ABI) Research [12] reported that the Android operating system [13] played a dominant role in the smartphone market in 2013 (with 81% share). That is why the main focus was on the designing an Android-based mobile application, which to facilitate the mobile access to mLearning services for users equipped with mobile devices, helped by a personal assistant agent (PAA).
In the PAA design, a hardware-independent uniform JADE-Android design was elaborated, based on the JADELEAP [14]. To achieve this, a HTTP-like request/response mechanism, together with a compact Java object serialization APIs, was developed. Figure 4 shows the class diagram design of the PAA. Request
Response
-agent: String -content: String -data: ISyncObject -params: Hashtable
-content: String -data: byte[*]
+Request(agent, content, data) +getAgent(): String +getContent(): String +getData(): ISyncObject +setParam(name: String, value: String) +getParams(): Hashtable
-INST
+Response(content, data) +getContent(): String +getData(): byte
IResultListener
PAA -INST: PAA -requests: Hashtable = new Hashtable() -results: Hashtable = new Hashtable() -autoId: int = 0 #setup() #takeDown() +iWBCrequest(request: Request, listener: IResultListener)
Figure 4.
The PAA Design.
In the Android application design, the source code was divided into seven Java packages, as shown in Figure 5. The model includes a number of Plain Old Java Object (POJO), i.e., course, history, video, profiles, etc. The cache provides ContentProvider functions for the Android application. The entrance of the Android application is the HomeActivity. An android.widget.TabHost container was selected to act as a window view. After the creation
cache (from trc)
util (from trc)
Performance of the service producer/consumer model 1000
model (from trc)
activity (from trc)
Number of Blocks/s
adapter (from trc: : activity)
800 600 400
200 0
fragment (from trc: : activity)
Packagel (from Root)
1
2
3
4
6
7
8
9 10 15 20 30 40 50 100200
Threads 128Bytes
Figure 5.
5
1024Bytes
4096Bytes
The Android Application Packages’ Dependencies Diagram.
of the container, the adapter and fragment components are initialized. Then the Android application returns the corresponding activity to the user. Figure 6 shows the HomeActivity time sequence diagram. a: HomeActivity
LayoutInflater. From(this)
view
Figure 7. The Performance Evaluation of the Service Producer/Consumer Model.
TextView
View view = LayoutInflater.from(this).inflate(R.layout.tab_item); 1. LayoutInflater.from(this).inflate(R.layout.tab_item)
TextView TextView = (textView) view.findViewById(R.id.textView); 2. view.findViewById(R.id.textView)
3. tv.setText(textId)
4. view.setBackgroundResource(backgoundId)
return view
Figure 6.
The HomeActivity’s Time Sequence Diagram.
(a)
(b)
(c)
(d)
IV. R ESULTS The development of the new version of the mLearning system followed the personal software process (PSP) methodology [15]. Test-driven and feature-driven development methods were used for the PSP. Server Side: The performance of the service producer/consumer model was evaluated as this is the key element in the server side. A Zookeeper cluster was built, running on three XEON Intel 5520 servers - one is the leader and the other two are followers. Three different sizes of data blocks (128B, 1024B, and 4096B) were used for performing concurrent read-operations with different number of threads. The evaluation results, shown in Figure 7, clearly demonstrate that the smaller the block size, the better the throughput. Also, the results suggest that using more than 10 concurrent threads is not advisable for this cluster configuration as this will lead to a significant degradation of the system throughput. Client side: Figure 8 shows the GUI of the developed mLearning Android application. It includes three tabs:
Figure 8.
The designed mLearning Android Application’s GUI.
(i) the Best tab (Figures 8a/b/c) includes a search box for performing search actions, two fragments for ’best’ courses (suitable for that particular user), and a list of categories. When the user selects a category, a universal image loader is invoked for caching and displaying the course’s images. After clicking on a particular course, the list of sections is displayed to the user; (ii) the Mine tab (Figure 8d) stores the user’s profiles, history, etc.; (iii) the Down tab keeps information about all files downloaded by the user, i.e., offline videos, course lectures, etc. V. C ONCLUSION The improved design and implementation of a clientserver InfoStation-based mLearning system have been sketched in this paper. On the server side, a distributed architecture has been used for service governance, based on the producer/consumer service model and utilizing a Zookeeper as a service register. On the client side, an Android mobile application and a personal assistant agent (PAA) have been designed, as representatives of the nextgeneration mobile applications, for the provision of highly personalized and contextualized mLearning services to users under the always best connected and best served (ABC&S) paradigm. ACKNOWLEDGMENT This publication has been supported by the Irish Research Council (IRC) and the Telecommunications Research Centre (TRC), University of Limerick, Ireland. R EFERENCES [1] J. L. De Coi, P. Karger, A. W. Koesling, and D. Olmedilla, “Control Your eLearning Environment: Exploiting Policies in an Open Infrastructure for Lifelong Learning,” Learning Technologies, IEEE Transactions on, vol. 1, pp. 88-102, 2008. [2] S. Stoyanov, V. Valkanova, I. Ganchev, M. O’Droma, and H. Zedan, “Agent-Oriented Middleware for Mobile eLearning Services,” in Computer Software and Applications Conference, 2009. COMPSAC ’09. 33rd Annual IEEE International, 2009, pp. 62-66. [3] Z. Ji, I. Ganchev, and M. O’Droma, “An iWBC consumer application for‘always best connected and best served’: design and implementation,” IEEE Transactions on Consumer Electronics, vol. 57, pp. 462-470, 2011. [4] D. Meere, I. Ganchev, O’Dro, x, M. ma, S. Stojanov, et al., “An enhanced context-sensitive infostation-based mLearning architecture,” in Digital Ecosystems and Technologies (DEST), 2010 4th IEEE International Conference on, 2010, pp. 347-352. [5] J. Zhanlin, D. Meere, I. Ganchev, and M. O’Droma, “Implementation of an Intelligent Framework for Utilization within an InfoStation-based mLearning Environment,” in Advanced Learning Technologies (ICALT), 2011 11th IEEE International Conference on, 2011, pp. 310-311. [6] F. L. Bellifemine, G. Caire, and D. Greenwood, Developing multi-agent systems with JADE vol. 7: Wiley. com, 2007. [7] WURFL. (2014). Wireless Universal Resource FiLe. Available: http://wurfl.sourceforge.net/
[8] L. Passani, “WALL: Next Generation,” 2014. [9] P. Graziano, “Speed up your web site with varnish,” Linux Journal, vol. 2013, p. 4, 2013. [10] P. Hunt, M. Konar, F. P. Junqueira, and B. Reed, “ZooKeeper: wait-free coordination for internet-scale systems,” in Proceedings of the 2010 USENIX conference on USENIX annual technical conference, 2010, pp. 11-11. [11] A. Aksyonoff, Introduction to Search with Sphinx: From installation to relevance tuning: O’Reilly Media, Inc., 2011. [12] ABI Research - Technology Market Intelligence. Available: https://www.abiresearch.com/ [13] R. Meier, Professional Android 4 application development: John Wiley & Sons, 2012. [14] G. Caire and G. Iavarone, “JADE: Java Agents DEvelopment Framework,” ed, 2012. [15] W. S. Humphrey, Personal Software Process (PSP): Wiley Online Library, 2002.