research article rest-mapreduce: an integrated interface...

11
Research Article REST-MapReduce: An Integrated Interface but Differentiated Service Jong-Hyuk Park, 1 Hwa-Young Jeong, 2 Young-Sik Jeong, 3 and Min Choi 4 1 Department of Computer Engineering, Seoul National University of Science and Technology, 232 Gongneung-ro, Nowon-gu, Seoul 139-743, Republic of Korea 2 Humanitas College, Kyunghee University, No. 26, Kyunghee-daero, Dongdaemun-gu, Seoul 130-701, Republic of Korea 3 Department of Multimedia Engineering, Dongguk University, 30 Pildong-ro 1 Gil, Jung-gu, Seoul 100-715, Republic of Korea 4 Department of Information and Communication Engineering, Chungbuk National University, 52 Naesudong-ro, Heungdeok-gu, Chungbuk, Cheongju 361-763, Republic of Korea Correspondence should be addressed to Min Choi; [email protected] Received 16 March 2014; Accepted 3 April 2014; Published 11 June 2014 Academic Editor: Laurence T. Yang Copyright © 2014 Jong-Hyuk Park et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. With the fast deployment of cloud computing, MapReduce architectures are becoming the major technologies for mobile cloud computing. e concept of MapReduce was first introduced as a novel programming model and implementation for a large set of computing devices. In this research, we propose a novel concept of REST-MapReduce, enabling users to use only the REST interface without using the MapReduce architecture. is approach provides a higher level of abstraction by integration of the two types of access interface, REST API and MapReduce. e motivation of this research stems from the slower response time for accessing simple RDBMS on Hadoop than direct access to RDMBS. is is because there is overhead to job scheduling, initiating, starting, tracking, and management during MapReduce-based parallel execution. erefore, we provide a good performance for REST Open API service and for MapReduce, respectively. is is very useful for constructing REST Open API services on Hadoop hosting services, for example, Amazon AWS (Macdonald, 2005) or IBM Smart Cloud. For evaluating performance of our REST- MapReduce framework, we conducted experiments with Jersey REST web server and Hadoop. Experimental result shows that our approach outperforms conventional approaches. 1. Introduction With the fast deployment of cloud computing, MapReduce architectures are becoming the major technologies for mobile cloud computing. Nowadays, we are experiencing a major shiſt from conventional mobile applications to mobile cloud computing. e demand of Open API-based development stems from the increasing use of smartphone applications [1, 2]. Community portal companies are providing Open API service for access to their service. Within a few years, we can expect a major shiſt from traditional mobile application technology to mobile cloud computing [3]. It improves appli- cation performance and efficiency by off-loading complex and time-consuming tasks onto powerful computing plat- forms. By running only simple tasks on mobile devices, we can achieve a longer battery lifetime and a greater processing efficiency. is off-loading with the use of parallelism is not only faster but can also be used to solve problems related to large data sets of nonlocal resources. With a set of computers connected on a network, there is a vast pool of CPUs and resources, and you have the ability to access files on a cloud. In this paper, we propose a novel approach that realizes the mobile cloud convergence in a transparent and platform- independent way. Users need not know how their jobs are actually executed in a distributed environment and need not to take into account their mobile platforms are IPhone or Android. All they have to do is to make use of the REST interface, and need not to know the complex distributed computing API such as Hadoop [4]. e research of MapReduce using REST web service interface is underexplored and most research efforts are still at their initial state [5, 6]. MapReduce is a programming model and an associated implementation for processing and generating large data sets. In this work, we propose a concept Hindawi Publishing Corporation Journal of Applied Mathematics Volume 2014, Article ID 170723, 10 pages http://dx.doi.org/10.1155/2014/170723

Upload: others

Post on 07-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

Research ArticleREST-MapReduce An Integrated Interface butDifferentiated Service

Jong-Hyuk Park1 Hwa-Young Jeong2 Young-Sik Jeong3 and Min Choi4

1 Department of Computer Engineering Seoul National University of Science and Technology 232 Gongneung-roNowon-gu Seoul 139-743 Republic of Korea

2Humanitas College Kyunghee University No 26 Kyunghee-daero Dongdaemun-gu Seoul 130-701 Republic of Korea3 Department of Multimedia Engineering Dongguk University 30 Pildong-ro 1 Gil Jung-gu Seoul 100-715 Republic of Korea4Department of Information and Communication Engineering Chungbuk National University 52 Naesudong-roHeungdeok-gu Chungbuk Cheongju 361-763 Republic of Korea

Correspondence should be addressed to Min Choi miinchaegmailcom

Received 16 March 2014 Accepted 3 April 2014 Published 11 June 2014

Academic Editor Laurence T Yang

Copyright copy 2014 Jong-Hyuk Park et alThis is an open access article distributed under theCreative CommonsAttribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

With the fast deployment of cloud computing MapReduce architectures are becoming the major technologies for mobile cloudcomputing The concept of MapReduce was first introduced as a novel programming model and implementation for a large setof computing devices In this research we propose a novel concept of REST-MapReduce enabling users to use only the RESTinterface without using the MapReduce architecture This approach provides a higher level of abstraction by integration of thetwo types of access interface REST API and MapReduce The motivation of this research stems from the slower response time foraccessing simple RDBMS on Hadoop than direct access to RDMBS This is because there is overhead to job scheduling initiatingstarting tracking and management during MapReduce-based parallel execution Therefore we provide a good performance forREST Open API service and for MapReduce respectivelyThis is very useful for constructing REST Open API services on Hadoophosting services for example Amazon AWS (Macdonald 2005) or IBM Smart Cloud For evaluating performance of our REST-MapReduce framework we conducted experiments with Jersey REST web server and Hadoop Experimental result shows that ourapproach outperforms conventional approaches

1 Introduction

With the fast deployment of cloud computing MapReducearchitectures are becoming themajor technologies formobilecloud computing Nowadays we are experiencing a majorshift from conventional mobile applications to mobile cloudcomputing The demand of Open API-based developmentstems from the increasing use of smartphone applications[1 2] Community portal companies are providing Open APIservice for access to their service Within a few years wecan expect a major shift from traditional mobile applicationtechnology to mobile cloud computing [3] It improves appli-cation performance and efficiency by off-loading complexand time-consuming tasks onto powerful computing plat-forms By running only simple tasks on mobile devices wecan achieve a longer battery lifetime and a greater processingefficiency This off-loading with the use of parallelism is not

only faster but can also be used to solve problems related tolarge data sets of nonlocal resources With a set of computersconnected on a network there is a vast pool of CPUs andresources and you have the ability to access files on a cloudIn this paper we propose a novel approach that realizes themobile cloud convergence in a transparent and platform-independent way Users need not know how their jobs areactually executed in a distributed environment and need notto take into account their mobile platforms are IPhone orAndroid All they have to do is to make use of the RESTinterface and need not to know the complex distributedcomputing API such as Hadoop [4]

The research of MapReduce using REST web serviceinterface is underexplored and most research efforts are stillat their initial state [5 6] MapReduce is a programmingmodel and an associated implementation for processing andgenerating large data sets In this work we propose a concept

Hindawi Publishing CorporationJournal of Applied MathematicsVolume 2014 Article ID 170723 10 pageshttpdxdoiorg1011552014170723

2 Journal of Applied Mathematics

of REST-MapReduce enabling users to use only the RESTinterface without using the MapReduce architecture it isthe MapReduce framework using REST web service OpenAPI interface We combine MapReduce and REST Open APIinto an integrated service as REST-MapReduce [7 8] Thisis because of the slower response time for accessing simpleRDBMS onHadoop than direct access to RDMBS [9 10]Theslow response time stems from the fact that MapReduce wasoriginally designed for analyzing large data not for simpleRDBMS lookup Such a job scheduling initiating startingtracking and management during MapReduce execution isnot a necessary task for REST Open API service executionTo avoid such a problem REST-MapReduce frameworkprovides an integrated interface with high performance thatsupports both REST Open API and MapReduce At thesame time the REST Open API service is provided by aseparated architecture for the REST Open API service with aseparate architecture Likewise we can overcome such a slowresponse time of simple RDBM invocation onHadoop by thisintegrated interface but differentiated service

The rest of this paper is organized as follows Section 2describes related works Section 3 explores the architecture ofMapReduce computation processes in our REST-MapReduceframework Section 4 presents the platform independentimplementation of application using the REST-MapReduceinterface Section 5 shows performance evaluation Finallywe conclude and summary our work in Section 6

2 Related Works

Before we go into more detail we briefly introduce theREST Open API-based mobile application developmentapproaches To communicate with remote procedure callbetween client and server the interface should be definedfirst To this end web service description language (WSDL)and remote procedure call (RPC) were used for the specifi-cation But these previous approaches are relatively compli-cated and highly overloaded Recently representational statetransfer (REST) architecture was first introduced by FieldingREST web service is becoming popular and explosivelyused in the field of application development of web andsmartphone Therefore todayrsquos many Internet companiesalready provide their services by both traditional SOAP-basedweb service andRESTful web services [11 12]Themaindifferences between RESTweb service and SOAPWSDLwebservice are as follows due to the complicated characteristicsof SOAP-based web services REST web service has notbeen introduced REST web service removes the overheadfrom encodingdecoding of header and body during messagetransfer The REST web service enables users and developersto easily use the web services at remote or local sites Weneed not add additional communication layer or protocolsfor REST web service but we can easily achieve scalabilityand performance This research evaluates the performanceof mash-up architectures through RESTful Open API webservices on smart mobile devices It provides the analyticalexperimental results for the performance evaluation of sys-tem models Especially we try to find an optimal number of

parallel REST web server architectures under certain requestarrival rates We show the performance of the proposedarchitecture especially the mean number of requests in thequeue and the mean waiting time

REST web service is a core technology for smartphoneapplication developmentThis is because REST web service isthe most appropriate way for accessing information throughthe Internet Usually a smartphone application needs infor-mation from several sources of (one or more) REST webservices [13] So we need to utilize two or more REST webservices composition to realize a target application [14 15]In this paper we propose a server architecture for managingREST web services This server is for managing web ser-vices so as to provide web server maintenance especiallyon composition deployment and management of RESTweb services It enables service developers to convenientlydevelop deploy upload and run their composedweb serviceswith the use of general OOP languages [16]

In 2004 the concept of MapReduce [17] was first intro-duced as a novel programming model and implementationfor a large set of computing devices Map generates aset of intermediate keyvalue pairs and reduces merges allintermediate values associated with the same intermediatekey so that programs with this are automatically parallelizedand executed on a large cluster of computing devices [18 19]

Apache Hadoop has become the de facto standard formanaging and processing hundreds of terabytes to petabytesof data It is an open-source Java software framework thatsupports massive data processing across a cluster of serversIt can run on a single server or thousands of servers Hadoopuses a programming model called MapReduce to distributeprocessing across multiple servers It also implements a dis-tributed file system called HDFS [20] that stores data acrossmultiple serversHadoopmonitors the health of servers in thecluster and can recover from the failure of one ormore nodesIn this way Hadoop provides not only increased processingand storage capacity but also high availability Hadoop [4]is actively used these days by AmazonA9 [21] FacebookGoogle IBM [22] Joost New York Times PowerSet Yahooand so on

3 REST-MapReduce Framework Architecture

This research focuses on designing the concept ofMapReduceusing the REST Open API interface This means that bothinterfaces of REST Open API and MapReduce are integratedinto a REST Open API interface We provide a higher levelof abstraction by integrating those two different types ofaccess methods such as REST Open API and MapReduceThe abstraction by integration provides higher abstraction forboth REST API andMapReduce Users need not to recognizeor differentiate how to use those two interfaces respectivelyThis is good for user convenience but it is known tohave lower performance when simple RDBMS access occurson MapReduce servers This is because MapReduce wasoriginally designed for analyzing large data through parallelexecution among multiple cluster nodes To avoid such anoverhead we proposed a novel architecture as follows

Journal of Applied Mathematics 3

Platform as a service

JerseyREST Open API web server

MapReduce library based on Hadoop

HDFS

Job executionand tracking

Resource configuration and management

REST-MapReduce request processor

Schedulersmanagement toolsapplications

SNFR node

Figure 1 REST-MapReduce framework architecture

31 Architecture Figure 1 depicts the architecture of ourREST-MapReduce framework It has five core componentsapplications Jersey platform as service MapReduce libraryand HDFSS3 First REST-MapReduce Request Processoracts as the role of a service differentiator in this frameworkIt determines whether the incoming request is for RESTOpen API or MapReduce Then it sends to Hadoop orJersey depending on the request type Second Jersey is theopen source JAX-RS (JSR 311) Reference Implementation [6]for building RESTful Web services Jersey provides an APIso that developers may extend Jersey to suit their needsWe make use of both Tomcat and Jersey to implement oursystems Platform as a Service is achieved by Hadoop TheMapReduce library job execution job tracker and resourcemanagement schemes are from the Hadoop Third HDFSstands for Hadoop distributed file system whereas SNFRstands for special node for fast responses [23]

The general concept is that a user submits a job to ourREST-MapReduce framework Then the REST-MapReducerequest processor determines whether the request is for RESTOpen API or MapReduce Then it sends it to either Hadoopor Jersey depending on the request type Information aboutthe type of the incoming request is necessary for the initial jobplacement to maximize resource utilization and also that ofthe entire system This is because the most appropriate nodeto execute the task is determined by the type of request Ifit is a REST API call it is better to be forwarded to Jerseyserver due to its performance whereas if it is a MapReducerequest it should be forwarded to Hadoop server becauseof its nature of the parallel execution The user client cancommunicate with the PaaS components such as ResourceConfigurationampManager using the client tool to first acquirea new connection and then submit the application to berun via ClientRMProtocolsubmitApplication As part of theClientRMProtocolsubmitApplication call the client needsto provide sufficient information to the ResourceManagerto ldquolaunchrdquo the applicationrsquos first container that is theApplicationMaster You need to provide information such asthe details about the local filesjars that need to be availablefor your application to run the actual command that needs tobe executed (with the necessary command line arguments)any Unix environment settings (optional) and so forthEffectively you need to describe the Unix process(es) that

Map

Reduce

Worker 1 Worker 2 Worker 3

f(t) =a

4

1 + t2(foralla b isinR)

a x1 x2 x3t

f(t)

120587 3141592⟩⟨

intb

⟨partial 120587 104513⟩ ⟨partial 120587 103925⟩ ⟨partial 120587 105721⟩

Figure 2 MapReduce computation process on our framework

needs to be launched for your ApplicationMaster Due to theintegration there are somewhat different features in requeststhrough REST Open API from smartphones Almost allrequests are usually simple data lookup whereas the rest ofthem are taskdata parallel operations Therefore we focuson differentiating those two operations to increase responsetime

Figure 2 shows the overall flow of a MapReduce compu-tation process in our REST-MapReduce architectureWhen anew job is submitted to a system a global job scheduler selectsthe most preferable node for the job to be executed (mappingstrategy) Then the Hadoop JobTracker monitors the job bykeeping track of change of job resource usage during theexecution Let us take a look at the procedure in detail Whenthe user program calls the REST Open API the followingsequence of actions occurs slowast(slowast1) The job execution andMapReduce module split the pi value calculation workloadinto multiple nodes Then it starts up on multiple workersof the Hadoop cluster Our approach is different in terms oftask parallelism and not data parallelism Typically previousresearches in the field of big data processing on Hadoopcluster usually focus on data parallelism distributing the dataof 16 megabytes to 64 megabytes (MB) per piece throughthe Hadoop cluster slowast(slowast2) One of the workers (the workersrun on nodes called DataNodes or slaves interchangeably)has a special purpose It is a master node The master nodereduces tasks to be assigned The master picks idle workersand assigns to each one a map task or a reduce task The restare slave workers The slaves are configured in confslavesof the Hadoop configuration They initially join into theframework on system bootup Once they have joined theframework the master node sends a short heartbeat messageto every worker periodically If there is no response from aworkerwithin a certain amount of time themaster checks theworker as failed slowast(slowast3) After completion of the distributedworkload calculation the Reduce worker iterates over thesorted intermediate data and for each unique intermediatekey encountered passes the key and the corresponding

4 Journal of Applied Mathematics

set of intermediate values to the userrsquos Reduce function[1] In this work we eliminate data dependency throughworkload parallelization if any exists between the workloadsof slaves This is because the data dependency leads toperformance degradation severely resulting in sequentialexecution slowast(slowast4) Map phase generates computation resultas a form of key-value pairs into log files (eg ltpartialpigt lt105721gt) The Map function takes a log line pullsout the timestamp field when the server finished processingthe request converts it into a minute-in-week slot and thenwrites out in file systems Reduce phase reads and sorts allintermediate data so that all occurrences of the same keyare grouped together resulting in the final result which isnumerically added for all the same keys This is the reasonwhy we can see the final pi value as 3141592 in Figure 2

32 Task Parallelization Phase In this section we show adevelopment procedure of the cloud-based applications ona mobile platform especially 120587 calculation The first stepin this procedure is to identify sets of tasks that can runconcurrently andor partitions of data that can be processedconcurrently The second step is to eliminate dependencyif any exists between every computational phase in thealgorithmThe dependency limit of the degree of parallelismresults in performance degradation 120587 is a mathematicalconstant whose value is the ratio of any Euclidean planecirclersquos circumference to its diameter this is the same valueas the ratio of a circlersquos area to the square of its radius Manyformulas frommathematics science and engineering involve120587 which makes it one of the most important mathematicalconstants The simplest method to calculate 120587 is circum-ference divided by diameter [24] However it is difficult toget the exact circumference using this simple method As aresult there are other formulas to calculate 120587 These includeseries products geometric constructions limits special val-ues and pi iterations To calculate 120587 through mobile cloudconvergence we first need to convert the algorithm into aparallelized version We present a 120587 calculation with infiniteseries that puts forth a parallelization method for ease ofapplication on the mobile cloud convergence To calculate 120587we first show the procedure of parallelizing the pi calculationas follows

119875119899(119909) = 119891 (119888) + 119891

1015840

(119888) (119909 minus 119888)

+

11989110158401015840

(119888)

2

(119909 minus 119888)2

+ sdot sdot sdot +

119891(119899)

(119888)

119899

(119909 minus 119888)119899

(1)

where 119875119899(119909) is defined by the Taylor series 119875

119899(119909) =

suminfin

119896=0(119891119896

(0)119896) especially on 119888 = 0 is known as theMaclaurinseries So we compute the Maclaurin series generated by119891(119909) = tanminus1(119909) Since we need the 119899th order derivative of119891(119909) = tanminus1(119909) we apply this expression to the Maclaurinseries Consider

119875119899(119909) = 0 + 119909 + 0 +

1199093

3

+ 0 +

1199095

5

+ sdot sdot sdot

= 119909 minus

1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot

(2)

Finally we get the following expression from 119875119899(119909) =

tanminus1(119909)

tanminus1 (119909) = 119909 minus 1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot + (minus1)1198991199092119899+1

2119899 + 1

+ sdot sdot sdot

(3)

But there is still another problem such that a function tocompute this based on the above form is not appropriatefor parallelization This is because each computed value isdependent on previously computed values Assuming wedistribute this workload on eight nodes they should not bedependent on the previous iteration and the next iterationThat means the next term calculation requires the result ofprevious term calculation resulting in serialized executionin a parallelized environment For example considering thefollowing expression

tanminus1 (119909) = 1205874

(4)

it is necessary to calculate the following expression

tanminus1 (119909) = 1 minus 13

3

+

15

5

minus

17

7

+ sdot sdot sdot (5)

But for computing (minus177) the partial term of 1minus133+155should be calculated a priori Again for computing (+155)the partial term of 1 minus 133 should be calculated a prioriThus we need to come up with a parallelized solution for the120587 calculation

In this paper we propose such a parallelized solutionto distribute the heavy workloads to multiple nodes Anindependent form of this equation should be providedTherefore we convert the equation into an integral formthat is suitable for parallelized execution on MapReduceframework We first take the derivative from the expression(3) with respect to 119909

119889

119889119909

tanminus1 (119909) = 1 minus 1199092 + 1199094 minus 1199096 + sdot sdot sdot + (minus1)1198991199092119899 + sdot sdot sdot (6)

We replace the variable 119909 with 119905 for the sake of convenience

119889

119889119905

tanminus1 (119905) = 1 minus 1199052 + 1199054 minus 1199056 + sdot sdot sdot + (minus1)1198991199052119899 + sdot sdot sdot (7)

At this time expression (7) can be simplified by

1

1 + 1199052

= 1 minus 1199052

+ 1199054

minus 1199056

+ sdot sdot sdot + (minus1)119899

1199052119899

+ sdot sdot sdot (8)

to119889

119889119905

tanminus1 (119905) = 11 + 1199052

(9)

Integrate this formula to infinite

int

119887

119886

119905

119889119905

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (10)

Integrating this equation for the interval 119886 to 119887 yields theintegral form of tanminus1(119905) By substituting 1205874 = tanminus1(119905) into

Journal of Applied Mathematics 5

this formula we get the parallelized form that is executableon the MapReduce platform

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (11)

By tanminus1(tan(1205874)) = tanminus1(1) we get1205874 = tanminus1(1) Finallywe make use of (11) in this expression to get the followingexpression

120587 = 4 tanminus1 (119905) = 4int119887

119886

1

1 + 1199052

= int

119887

119886

4

1 + 1199052

(forall119886 119887 isin 119877)

(12)

We approximately get the 120587 value by integrating this equationfor the interval minus12 to 12

Unlike an infinite series representation the integral formis fully parallelizable and it is easy to divide the probleminto chunksparts of the work We distribute and map thesetasks onto multiple clouding nodes However this equationcannot be executed on cloud computing which is highlyparallelized and distributed in a computing environmentThis is an example of task parallelization and partitioning andcan be run on a mobile cloud convergence platform

4 REST Application Interface

41 Persistent Storage In this section we examine localstorages on HTML5 web applications Usually we make useof cookie and session for keeping information on desktopwhen network connection is not available HTML5 providesmore options than conventional web development methodsLocalStorage sessionStorage andWebDB are like thatWhileall of these functionalities are applicable to both the mobileand desktop worlds in the world of desktops you generallyhave a lower rate of adoption However any mobile devicereleased in the last 2-3 years will support most of thesespecs Moreover the explosive use of mobile devices such assmartphones requires the demand of using HTML5 due toone source multiuse (OSMU) development So there are bigdemands of persistent storage using HTML5 The persistentstorage support was in demand in the world of desktopsbut with the rise of the mobile web and edge connectionssupport for offline capability has exploded Everything fromoffline data storage to the actual application startup is alreadyavailable and supported on a wide range of mobile plat-forms The HTML5 brings us to the three storage mediumslocalStorage sessionStorage andWebDB Luckily the SenchaTouch data package offers awesome wrappers around allthree We can use these persistent storages regardless of thenetwork connection status SessionStorage is not a persistentstorage meaning it gets wiped whenever the user leaves thepage or closes the application However in case of one-pageweb apps where you stay on the same page the entire timesessionStorage can be a perfect candidate for offline dataaccess especially in data-sensitive scenarioswhere you do notwant the data persisted on the device after the user is doneusing the app SessionStorage is generally limited to 5MB insize and when that is exceeded depending on the platform

HTML5 (Sencha Touch) based platform independent application

REST-MapReduce

request processor

SNFR node 1

SNFR node 2

SNFR node 3

SNFR node 4

In-mem DB

In-mem DB

In-mem DB

In-mem DB

REST Open API interface

Figure 3 System integration and interactions between the compo-nents

either a JavaScript error might be thrown or a popup ispresented to the user asking for permission to increase theavailable storage

LocalStorage is essentially the same thing as sessionStor-age except that it is persistent In other words if you closethe app and return the data will still be there localStorage ismore suited for data that you want to be available when usedin combination with the offline startup techniques discussedearlier However the localStorage still has a problem for beinga perfect persistency If you clean and delete your web cachefrom your browser it will be removed from then on So wehave to prepare a work around for compensating the casesSencha Touch configuration for localStorage looks almostidentical to that of sessionStorage

Finally the web database is supported by almost everybrowser Though specs call for 5MB limit per origin iOS hasbeen known to allowup to 50MBaftermultiple user promptsBehind the scenes it is an SQL database with a query-basedlanguage that many of us know and love When it comes toconfiguring it in Sencha Touch it is just as easy as with theother storage mediums

42 System Components We implemented our applicationexploiting 3 cutting edge technologies Figure 3 shows thesystem architecture of our acquisition tax analysis appli-cation Our system architecture consists of the followingcomponents REST Open API server HTML5 based Plat-form Independent Client Application and Database ServerFigure 3 shows the system architecture of our platform inde-pendent application design and implementation for checkingcapital gain tax relief due to one house by one household

In-Memory Database For the high performance of databasewe make use of the in-memory database in this projectBecause of toomany representative requests we cameupwitha state-of-the-art technology for processing this type of shortand high frequency requests The best way to service theserequests is the in-memory databaseREST Open API Web Service The REST is a platformindependent architectural style REST ignores the details of

6 Journal of Applied Mathematics

Object1 obj1

String strSearchKeyword = getParameter(STR PARAM SEARCHKEYWORD)

String strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword + amptarget=adult

URL text = new URL(strWebSvcQuery)

XmlObjectConversionFactory objCreator = XmlObjectConversionFactorynewInstance()

XmlObjectConverter xoConverter = objCreatornewConverter()

obj1 = xoConvertersetInput( textopenStream() null )

if (obj1getbAdult())

return

else

try

strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword +

ampdisplay=10ampstart=1amptarget=webkr

URL text = new URL(strWebSvcQuery)

String test = texttoString()

XmlPullParserFactory parserCreator =

XmlPullParserFactorynewInstance()

XmlPullParser parser = parserCreatornewPullParser()

parsersetInput( textopenStream() null )

String tag

int parserEvent = parsergetEventType()

while (parserEvent = XmlPullParserEND DOCUMENT )

switch(parserEvent)

case XmlPullParserTEXT

tag = parsergetName()

break

case XmlPullParserEND TAG

tag = parsergetName()

break

case XmlPullParserSTART TAG

tag = parsergetName()

break

catch( Exception e )

Loge(dd Error in network call+ e)

Algorithm 1 Open API parser

component implementation and protocol syntax in order tofocus on the roles of components the constraints upon theirinteraction with other components and their interpretationof significant data elements

Sencha Touch (HTML5) Application Sencha Touch is arepresentative HTML5 UI Framework in these days SenchaTouch is a well-known user interface (UI) JavaScript libraryor framework specifically built for the Mobile Web It can beused byWeb developers to develop user interfaces for mobileweb applications that look and feel like native applicationson supported mobile devices As shown in Algorithm 1 it

is fully based on web standards such as HTML5 CSS3 andJavaScript SenchaTouch aims to enable developers to quicklyand easily create HTML5 based mobile apps that work onAndroid iOS Windows Tizen and BlackBerry devices andproduce a native-app-like experience inside a browser

43 System Implementation Using these techniques wedeveloped our system and application which is platformindependent one as shown in Figure 3The applicationmakesuse of the AJAX request to the REST Open API web serviceas shown in Algorithm 2

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

2 Journal of Applied Mathematics

of REST-MapReduce enabling users to use only the RESTinterface without using the MapReduce architecture it isthe MapReduce framework using REST web service OpenAPI interface We combine MapReduce and REST Open APIinto an integrated service as REST-MapReduce [7 8] Thisis because of the slower response time for accessing simpleRDBMS onHadoop than direct access to RDMBS [9 10]Theslow response time stems from the fact that MapReduce wasoriginally designed for analyzing large data not for simpleRDBMS lookup Such a job scheduling initiating startingtracking and management during MapReduce execution isnot a necessary task for REST Open API service executionTo avoid such a problem REST-MapReduce frameworkprovides an integrated interface with high performance thatsupports both REST Open API and MapReduce At thesame time the REST Open API service is provided by aseparated architecture for the REST Open API service with aseparate architecture Likewise we can overcome such a slowresponse time of simple RDBM invocation onHadoop by thisintegrated interface but differentiated service

The rest of this paper is organized as follows Section 2describes related works Section 3 explores the architecture ofMapReduce computation processes in our REST-MapReduceframework Section 4 presents the platform independentimplementation of application using the REST-MapReduceinterface Section 5 shows performance evaluation Finallywe conclude and summary our work in Section 6

2 Related Works

Before we go into more detail we briefly introduce theREST Open API-based mobile application developmentapproaches To communicate with remote procedure callbetween client and server the interface should be definedfirst To this end web service description language (WSDL)and remote procedure call (RPC) were used for the specifi-cation But these previous approaches are relatively compli-cated and highly overloaded Recently representational statetransfer (REST) architecture was first introduced by FieldingREST web service is becoming popular and explosivelyused in the field of application development of web andsmartphone Therefore todayrsquos many Internet companiesalready provide their services by both traditional SOAP-basedweb service andRESTful web services [11 12]Themaindifferences between RESTweb service and SOAPWSDLwebservice are as follows due to the complicated characteristicsof SOAP-based web services REST web service has notbeen introduced REST web service removes the overheadfrom encodingdecoding of header and body during messagetransfer The REST web service enables users and developersto easily use the web services at remote or local sites Weneed not add additional communication layer or protocolsfor REST web service but we can easily achieve scalabilityand performance This research evaluates the performanceof mash-up architectures through RESTful Open API webservices on smart mobile devices It provides the analyticalexperimental results for the performance evaluation of sys-tem models Especially we try to find an optimal number of

parallel REST web server architectures under certain requestarrival rates We show the performance of the proposedarchitecture especially the mean number of requests in thequeue and the mean waiting time

REST web service is a core technology for smartphoneapplication developmentThis is because REST web service isthe most appropriate way for accessing information throughthe Internet Usually a smartphone application needs infor-mation from several sources of (one or more) REST webservices [13] So we need to utilize two or more REST webservices composition to realize a target application [14 15]In this paper we propose a server architecture for managingREST web services This server is for managing web ser-vices so as to provide web server maintenance especiallyon composition deployment and management of RESTweb services It enables service developers to convenientlydevelop deploy upload and run their composedweb serviceswith the use of general OOP languages [16]

In 2004 the concept of MapReduce [17] was first intro-duced as a novel programming model and implementationfor a large set of computing devices Map generates aset of intermediate keyvalue pairs and reduces merges allintermediate values associated with the same intermediatekey so that programs with this are automatically parallelizedand executed on a large cluster of computing devices [18 19]

Apache Hadoop has become the de facto standard formanaging and processing hundreds of terabytes to petabytesof data It is an open-source Java software framework thatsupports massive data processing across a cluster of serversIt can run on a single server or thousands of servers Hadoopuses a programming model called MapReduce to distributeprocessing across multiple servers It also implements a dis-tributed file system called HDFS [20] that stores data acrossmultiple serversHadoopmonitors the health of servers in thecluster and can recover from the failure of one ormore nodesIn this way Hadoop provides not only increased processingand storage capacity but also high availability Hadoop [4]is actively used these days by AmazonA9 [21] FacebookGoogle IBM [22] Joost New York Times PowerSet Yahooand so on

3 REST-MapReduce Framework Architecture

This research focuses on designing the concept ofMapReduceusing the REST Open API interface This means that bothinterfaces of REST Open API and MapReduce are integratedinto a REST Open API interface We provide a higher levelof abstraction by integrating those two different types ofaccess methods such as REST Open API and MapReduceThe abstraction by integration provides higher abstraction forboth REST API andMapReduce Users need not to recognizeor differentiate how to use those two interfaces respectivelyThis is good for user convenience but it is known tohave lower performance when simple RDBMS access occurson MapReduce servers This is because MapReduce wasoriginally designed for analyzing large data through parallelexecution among multiple cluster nodes To avoid such anoverhead we proposed a novel architecture as follows

Journal of Applied Mathematics 3

Platform as a service

JerseyREST Open API web server

MapReduce library based on Hadoop

HDFS

Job executionand tracking

Resource configuration and management

REST-MapReduce request processor

Schedulersmanagement toolsapplications

SNFR node

Figure 1 REST-MapReduce framework architecture

31 Architecture Figure 1 depicts the architecture of ourREST-MapReduce framework It has five core componentsapplications Jersey platform as service MapReduce libraryand HDFSS3 First REST-MapReduce Request Processoracts as the role of a service differentiator in this frameworkIt determines whether the incoming request is for RESTOpen API or MapReduce Then it sends to Hadoop orJersey depending on the request type Second Jersey is theopen source JAX-RS (JSR 311) Reference Implementation [6]for building RESTful Web services Jersey provides an APIso that developers may extend Jersey to suit their needsWe make use of both Tomcat and Jersey to implement oursystems Platform as a Service is achieved by Hadoop TheMapReduce library job execution job tracker and resourcemanagement schemes are from the Hadoop Third HDFSstands for Hadoop distributed file system whereas SNFRstands for special node for fast responses [23]

The general concept is that a user submits a job to ourREST-MapReduce framework Then the REST-MapReducerequest processor determines whether the request is for RESTOpen API or MapReduce Then it sends it to either Hadoopor Jersey depending on the request type Information aboutthe type of the incoming request is necessary for the initial jobplacement to maximize resource utilization and also that ofthe entire system This is because the most appropriate nodeto execute the task is determined by the type of request Ifit is a REST API call it is better to be forwarded to Jerseyserver due to its performance whereas if it is a MapReducerequest it should be forwarded to Hadoop server becauseof its nature of the parallel execution The user client cancommunicate with the PaaS components such as ResourceConfigurationampManager using the client tool to first acquirea new connection and then submit the application to berun via ClientRMProtocolsubmitApplication As part of theClientRMProtocolsubmitApplication call the client needsto provide sufficient information to the ResourceManagerto ldquolaunchrdquo the applicationrsquos first container that is theApplicationMaster You need to provide information such asthe details about the local filesjars that need to be availablefor your application to run the actual command that needs tobe executed (with the necessary command line arguments)any Unix environment settings (optional) and so forthEffectively you need to describe the Unix process(es) that

Map

Reduce

Worker 1 Worker 2 Worker 3

f(t) =a

4

1 + t2(foralla b isinR)

a x1 x2 x3t

f(t)

120587 3141592⟩⟨

intb

⟨partial 120587 104513⟩ ⟨partial 120587 103925⟩ ⟨partial 120587 105721⟩

Figure 2 MapReduce computation process on our framework

needs to be launched for your ApplicationMaster Due to theintegration there are somewhat different features in requeststhrough REST Open API from smartphones Almost allrequests are usually simple data lookup whereas the rest ofthem are taskdata parallel operations Therefore we focuson differentiating those two operations to increase responsetime

Figure 2 shows the overall flow of a MapReduce compu-tation process in our REST-MapReduce architectureWhen anew job is submitted to a system a global job scheduler selectsthe most preferable node for the job to be executed (mappingstrategy) Then the Hadoop JobTracker monitors the job bykeeping track of change of job resource usage during theexecution Let us take a look at the procedure in detail Whenthe user program calls the REST Open API the followingsequence of actions occurs slowast(slowast1) The job execution andMapReduce module split the pi value calculation workloadinto multiple nodes Then it starts up on multiple workersof the Hadoop cluster Our approach is different in terms oftask parallelism and not data parallelism Typically previousresearches in the field of big data processing on Hadoopcluster usually focus on data parallelism distributing the dataof 16 megabytes to 64 megabytes (MB) per piece throughthe Hadoop cluster slowast(slowast2) One of the workers (the workersrun on nodes called DataNodes or slaves interchangeably)has a special purpose It is a master node The master nodereduces tasks to be assigned The master picks idle workersand assigns to each one a map task or a reduce task The restare slave workers The slaves are configured in confslavesof the Hadoop configuration They initially join into theframework on system bootup Once they have joined theframework the master node sends a short heartbeat messageto every worker periodically If there is no response from aworkerwithin a certain amount of time themaster checks theworker as failed slowast(slowast3) After completion of the distributedworkload calculation the Reduce worker iterates over thesorted intermediate data and for each unique intermediatekey encountered passes the key and the corresponding

4 Journal of Applied Mathematics

set of intermediate values to the userrsquos Reduce function[1] In this work we eliminate data dependency throughworkload parallelization if any exists between the workloadsof slaves This is because the data dependency leads toperformance degradation severely resulting in sequentialexecution slowast(slowast4) Map phase generates computation resultas a form of key-value pairs into log files (eg ltpartialpigt lt105721gt) The Map function takes a log line pullsout the timestamp field when the server finished processingthe request converts it into a minute-in-week slot and thenwrites out in file systems Reduce phase reads and sorts allintermediate data so that all occurrences of the same keyare grouped together resulting in the final result which isnumerically added for all the same keys This is the reasonwhy we can see the final pi value as 3141592 in Figure 2

32 Task Parallelization Phase In this section we show adevelopment procedure of the cloud-based applications ona mobile platform especially 120587 calculation The first stepin this procedure is to identify sets of tasks that can runconcurrently andor partitions of data that can be processedconcurrently The second step is to eliminate dependencyif any exists between every computational phase in thealgorithmThe dependency limit of the degree of parallelismresults in performance degradation 120587 is a mathematicalconstant whose value is the ratio of any Euclidean planecirclersquos circumference to its diameter this is the same valueas the ratio of a circlersquos area to the square of its radius Manyformulas frommathematics science and engineering involve120587 which makes it one of the most important mathematicalconstants The simplest method to calculate 120587 is circum-ference divided by diameter [24] However it is difficult toget the exact circumference using this simple method As aresult there are other formulas to calculate 120587 These includeseries products geometric constructions limits special val-ues and pi iterations To calculate 120587 through mobile cloudconvergence we first need to convert the algorithm into aparallelized version We present a 120587 calculation with infiniteseries that puts forth a parallelization method for ease ofapplication on the mobile cloud convergence To calculate 120587we first show the procedure of parallelizing the pi calculationas follows

119875119899(119909) = 119891 (119888) + 119891

1015840

(119888) (119909 minus 119888)

+

11989110158401015840

(119888)

2

(119909 minus 119888)2

+ sdot sdot sdot +

119891(119899)

(119888)

119899

(119909 minus 119888)119899

(1)

where 119875119899(119909) is defined by the Taylor series 119875

119899(119909) =

suminfin

119896=0(119891119896

(0)119896) especially on 119888 = 0 is known as theMaclaurinseries So we compute the Maclaurin series generated by119891(119909) = tanminus1(119909) Since we need the 119899th order derivative of119891(119909) = tanminus1(119909) we apply this expression to the Maclaurinseries Consider

119875119899(119909) = 0 + 119909 + 0 +

1199093

3

+ 0 +

1199095

5

+ sdot sdot sdot

= 119909 minus

1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot

(2)

Finally we get the following expression from 119875119899(119909) =

tanminus1(119909)

tanminus1 (119909) = 119909 minus 1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot + (minus1)1198991199092119899+1

2119899 + 1

+ sdot sdot sdot

(3)

But there is still another problem such that a function tocompute this based on the above form is not appropriatefor parallelization This is because each computed value isdependent on previously computed values Assuming wedistribute this workload on eight nodes they should not bedependent on the previous iteration and the next iterationThat means the next term calculation requires the result ofprevious term calculation resulting in serialized executionin a parallelized environment For example considering thefollowing expression

tanminus1 (119909) = 1205874

(4)

it is necessary to calculate the following expression

tanminus1 (119909) = 1 minus 13

3

+

15

5

minus

17

7

+ sdot sdot sdot (5)

But for computing (minus177) the partial term of 1minus133+155should be calculated a priori Again for computing (+155)the partial term of 1 minus 133 should be calculated a prioriThus we need to come up with a parallelized solution for the120587 calculation

In this paper we propose such a parallelized solutionto distribute the heavy workloads to multiple nodes Anindependent form of this equation should be providedTherefore we convert the equation into an integral formthat is suitable for parallelized execution on MapReduceframework We first take the derivative from the expression(3) with respect to 119909

119889

119889119909

tanminus1 (119909) = 1 minus 1199092 + 1199094 minus 1199096 + sdot sdot sdot + (minus1)1198991199092119899 + sdot sdot sdot (6)

We replace the variable 119909 with 119905 for the sake of convenience

119889

119889119905

tanminus1 (119905) = 1 minus 1199052 + 1199054 minus 1199056 + sdot sdot sdot + (minus1)1198991199052119899 + sdot sdot sdot (7)

At this time expression (7) can be simplified by

1

1 + 1199052

= 1 minus 1199052

+ 1199054

minus 1199056

+ sdot sdot sdot + (minus1)119899

1199052119899

+ sdot sdot sdot (8)

to119889

119889119905

tanminus1 (119905) = 11 + 1199052

(9)

Integrate this formula to infinite

int

119887

119886

119905

119889119905

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (10)

Integrating this equation for the interval 119886 to 119887 yields theintegral form of tanminus1(119905) By substituting 1205874 = tanminus1(119905) into

Journal of Applied Mathematics 5

this formula we get the parallelized form that is executableon the MapReduce platform

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (11)

By tanminus1(tan(1205874)) = tanminus1(1) we get1205874 = tanminus1(1) Finallywe make use of (11) in this expression to get the followingexpression

120587 = 4 tanminus1 (119905) = 4int119887

119886

1

1 + 1199052

= int

119887

119886

4

1 + 1199052

(forall119886 119887 isin 119877)

(12)

We approximately get the 120587 value by integrating this equationfor the interval minus12 to 12

Unlike an infinite series representation the integral formis fully parallelizable and it is easy to divide the probleminto chunksparts of the work We distribute and map thesetasks onto multiple clouding nodes However this equationcannot be executed on cloud computing which is highlyparallelized and distributed in a computing environmentThis is an example of task parallelization and partitioning andcan be run on a mobile cloud convergence platform

4 REST Application Interface

41 Persistent Storage In this section we examine localstorages on HTML5 web applications Usually we make useof cookie and session for keeping information on desktopwhen network connection is not available HTML5 providesmore options than conventional web development methodsLocalStorage sessionStorage andWebDB are like thatWhileall of these functionalities are applicable to both the mobileand desktop worlds in the world of desktops you generallyhave a lower rate of adoption However any mobile devicereleased in the last 2-3 years will support most of thesespecs Moreover the explosive use of mobile devices such assmartphones requires the demand of using HTML5 due toone source multiuse (OSMU) development So there are bigdemands of persistent storage using HTML5 The persistentstorage support was in demand in the world of desktopsbut with the rise of the mobile web and edge connectionssupport for offline capability has exploded Everything fromoffline data storage to the actual application startup is alreadyavailable and supported on a wide range of mobile plat-forms The HTML5 brings us to the three storage mediumslocalStorage sessionStorage andWebDB Luckily the SenchaTouch data package offers awesome wrappers around allthree We can use these persistent storages regardless of thenetwork connection status SessionStorage is not a persistentstorage meaning it gets wiped whenever the user leaves thepage or closes the application However in case of one-pageweb apps where you stay on the same page the entire timesessionStorage can be a perfect candidate for offline dataaccess especially in data-sensitive scenarioswhere you do notwant the data persisted on the device after the user is doneusing the app SessionStorage is generally limited to 5MB insize and when that is exceeded depending on the platform

HTML5 (Sencha Touch) based platform independent application

REST-MapReduce

request processor

SNFR node 1

SNFR node 2

SNFR node 3

SNFR node 4

In-mem DB

In-mem DB

In-mem DB

In-mem DB

REST Open API interface

Figure 3 System integration and interactions between the compo-nents

either a JavaScript error might be thrown or a popup ispresented to the user asking for permission to increase theavailable storage

LocalStorage is essentially the same thing as sessionStor-age except that it is persistent In other words if you closethe app and return the data will still be there localStorage ismore suited for data that you want to be available when usedin combination with the offline startup techniques discussedearlier However the localStorage still has a problem for beinga perfect persistency If you clean and delete your web cachefrom your browser it will be removed from then on So wehave to prepare a work around for compensating the casesSencha Touch configuration for localStorage looks almostidentical to that of sessionStorage

Finally the web database is supported by almost everybrowser Though specs call for 5MB limit per origin iOS hasbeen known to allowup to 50MBaftermultiple user promptsBehind the scenes it is an SQL database with a query-basedlanguage that many of us know and love When it comes toconfiguring it in Sencha Touch it is just as easy as with theother storage mediums

42 System Components We implemented our applicationexploiting 3 cutting edge technologies Figure 3 shows thesystem architecture of our acquisition tax analysis appli-cation Our system architecture consists of the followingcomponents REST Open API server HTML5 based Plat-form Independent Client Application and Database ServerFigure 3 shows the system architecture of our platform inde-pendent application design and implementation for checkingcapital gain tax relief due to one house by one household

In-Memory Database For the high performance of databasewe make use of the in-memory database in this projectBecause of toomany representative requests we cameupwitha state-of-the-art technology for processing this type of shortand high frequency requests The best way to service theserequests is the in-memory databaseREST Open API Web Service The REST is a platformindependent architectural style REST ignores the details of

6 Journal of Applied Mathematics

Object1 obj1

String strSearchKeyword = getParameter(STR PARAM SEARCHKEYWORD)

String strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword + amptarget=adult

URL text = new URL(strWebSvcQuery)

XmlObjectConversionFactory objCreator = XmlObjectConversionFactorynewInstance()

XmlObjectConverter xoConverter = objCreatornewConverter()

obj1 = xoConvertersetInput( textopenStream() null )

if (obj1getbAdult())

return

else

try

strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword +

ampdisplay=10ampstart=1amptarget=webkr

URL text = new URL(strWebSvcQuery)

String test = texttoString()

XmlPullParserFactory parserCreator =

XmlPullParserFactorynewInstance()

XmlPullParser parser = parserCreatornewPullParser()

parsersetInput( textopenStream() null )

String tag

int parserEvent = parsergetEventType()

while (parserEvent = XmlPullParserEND DOCUMENT )

switch(parserEvent)

case XmlPullParserTEXT

tag = parsergetName()

break

case XmlPullParserEND TAG

tag = parsergetName()

break

case XmlPullParserSTART TAG

tag = parsergetName()

break

catch( Exception e )

Loge(dd Error in network call+ e)

Algorithm 1 Open API parser

component implementation and protocol syntax in order tofocus on the roles of components the constraints upon theirinteraction with other components and their interpretationof significant data elements

Sencha Touch (HTML5) Application Sencha Touch is arepresentative HTML5 UI Framework in these days SenchaTouch is a well-known user interface (UI) JavaScript libraryor framework specifically built for the Mobile Web It can beused byWeb developers to develop user interfaces for mobileweb applications that look and feel like native applicationson supported mobile devices As shown in Algorithm 1 it

is fully based on web standards such as HTML5 CSS3 andJavaScript SenchaTouch aims to enable developers to quicklyand easily create HTML5 based mobile apps that work onAndroid iOS Windows Tizen and BlackBerry devices andproduce a native-app-like experience inside a browser

43 System Implementation Using these techniques wedeveloped our system and application which is platformindependent one as shown in Figure 3The applicationmakesuse of the AJAX request to the REST Open API web serviceas shown in Algorithm 2

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

Journal of Applied Mathematics 3

Platform as a service

JerseyREST Open API web server

MapReduce library based on Hadoop

HDFS

Job executionand tracking

Resource configuration and management

REST-MapReduce request processor

Schedulersmanagement toolsapplications

SNFR node

Figure 1 REST-MapReduce framework architecture

31 Architecture Figure 1 depicts the architecture of ourREST-MapReduce framework It has five core componentsapplications Jersey platform as service MapReduce libraryand HDFSS3 First REST-MapReduce Request Processoracts as the role of a service differentiator in this frameworkIt determines whether the incoming request is for RESTOpen API or MapReduce Then it sends to Hadoop orJersey depending on the request type Second Jersey is theopen source JAX-RS (JSR 311) Reference Implementation [6]for building RESTful Web services Jersey provides an APIso that developers may extend Jersey to suit their needsWe make use of both Tomcat and Jersey to implement oursystems Platform as a Service is achieved by Hadoop TheMapReduce library job execution job tracker and resourcemanagement schemes are from the Hadoop Third HDFSstands for Hadoop distributed file system whereas SNFRstands for special node for fast responses [23]

The general concept is that a user submits a job to ourREST-MapReduce framework Then the REST-MapReducerequest processor determines whether the request is for RESTOpen API or MapReduce Then it sends it to either Hadoopor Jersey depending on the request type Information aboutthe type of the incoming request is necessary for the initial jobplacement to maximize resource utilization and also that ofthe entire system This is because the most appropriate nodeto execute the task is determined by the type of request Ifit is a REST API call it is better to be forwarded to Jerseyserver due to its performance whereas if it is a MapReducerequest it should be forwarded to Hadoop server becauseof its nature of the parallel execution The user client cancommunicate with the PaaS components such as ResourceConfigurationampManager using the client tool to first acquirea new connection and then submit the application to berun via ClientRMProtocolsubmitApplication As part of theClientRMProtocolsubmitApplication call the client needsto provide sufficient information to the ResourceManagerto ldquolaunchrdquo the applicationrsquos first container that is theApplicationMaster You need to provide information such asthe details about the local filesjars that need to be availablefor your application to run the actual command that needs tobe executed (with the necessary command line arguments)any Unix environment settings (optional) and so forthEffectively you need to describe the Unix process(es) that

Map

Reduce

Worker 1 Worker 2 Worker 3

f(t) =a

4

1 + t2(foralla b isinR)

a x1 x2 x3t

f(t)

120587 3141592⟩⟨

intb

⟨partial 120587 104513⟩ ⟨partial 120587 103925⟩ ⟨partial 120587 105721⟩

Figure 2 MapReduce computation process on our framework

needs to be launched for your ApplicationMaster Due to theintegration there are somewhat different features in requeststhrough REST Open API from smartphones Almost allrequests are usually simple data lookup whereas the rest ofthem are taskdata parallel operations Therefore we focuson differentiating those two operations to increase responsetime

Figure 2 shows the overall flow of a MapReduce compu-tation process in our REST-MapReduce architectureWhen anew job is submitted to a system a global job scheduler selectsthe most preferable node for the job to be executed (mappingstrategy) Then the Hadoop JobTracker monitors the job bykeeping track of change of job resource usage during theexecution Let us take a look at the procedure in detail Whenthe user program calls the REST Open API the followingsequence of actions occurs slowast(slowast1) The job execution andMapReduce module split the pi value calculation workloadinto multiple nodes Then it starts up on multiple workersof the Hadoop cluster Our approach is different in terms oftask parallelism and not data parallelism Typically previousresearches in the field of big data processing on Hadoopcluster usually focus on data parallelism distributing the dataof 16 megabytes to 64 megabytes (MB) per piece throughthe Hadoop cluster slowast(slowast2) One of the workers (the workersrun on nodes called DataNodes or slaves interchangeably)has a special purpose It is a master node The master nodereduces tasks to be assigned The master picks idle workersand assigns to each one a map task or a reduce task The restare slave workers The slaves are configured in confslavesof the Hadoop configuration They initially join into theframework on system bootup Once they have joined theframework the master node sends a short heartbeat messageto every worker periodically If there is no response from aworkerwithin a certain amount of time themaster checks theworker as failed slowast(slowast3) After completion of the distributedworkload calculation the Reduce worker iterates over thesorted intermediate data and for each unique intermediatekey encountered passes the key and the corresponding

4 Journal of Applied Mathematics

set of intermediate values to the userrsquos Reduce function[1] In this work we eliminate data dependency throughworkload parallelization if any exists between the workloadsof slaves This is because the data dependency leads toperformance degradation severely resulting in sequentialexecution slowast(slowast4) Map phase generates computation resultas a form of key-value pairs into log files (eg ltpartialpigt lt105721gt) The Map function takes a log line pullsout the timestamp field when the server finished processingthe request converts it into a minute-in-week slot and thenwrites out in file systems Reduce phase reads and sorts allintermediate data so that all occurrences of the same keyare grouped together resulting in the final result which isnumerically added for all the same keys This is the reasonwhy we can see the final pi value as 3141592 in Figure 2

32 Task Parallelization Phase In this section we show adevelopment procedure of the cloud-based applications ona mobile platform especially 120587 calculation The first stepin this procedure is to identify sets of tasks that can runconcurrently andor partitions of data that can be processedconcurrently The second step is to eliminate dependencyif any exists between every computational phase in thealgorithmThe dependency limit of the degree of parallelismresults in performance degradation 120587 is a mathematicalconstant whose value is the ratio of any Euclidean planecirclersquos circumference to its diameter this is the same valueas the ratio of a circlersquos area to the square of its radius Manyformulas frommathematics science and engineering involve120587 which makes it one of the most important mathematicalconstants The simplest method to calculate 120587 is circum-ference divided by diameter [24] However it is difficult toget the exact circumference using this simple method As aresult there are other formulas to calculate 120587 These includeseries products geometric constructions limits special val-ues and pi iterations To calculate 120587 through mobile cloudconvergence we first need to convert the algorithm into aparallelized version We present a 120587 calculation with infiniteseries that puts forth a parallelization method for ease ofapplication on the mobile cloud convergence To calculate 120587we first show the procedure of parallelizing the pi calculationas follows

119875119899(119909) = 119891 (119888) + 119891

1015840

(119888) (119909 minus 119888)

+

11989110158401015840

(119888)

2

(119909 minus 119888)2

+ sdot sdot sdot +

119891(119899)

(119888)

119899

(119909 minus 119888)119899

(1)

where 119875119899(119909) is defined by the Taylor series 119875

119899(119909) =

suminfin

119896=0(119891119896

(0)119896) especially on 119888 = 0 is known as theMaclaurinseries So we compute the Maclaurin series generated by119891(119909) = tanminus1(119909) Since we need the 119899th order derivative of119891(119909) = tanminus1(119909) we apply this expression to the Maclaurinseries Consider

119875119899(119909) = 0 + 119909 + 0 +

1199093

3

+ 0 +

1199095

5

+ sdot sdot sdot

= 119909 minus

1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot

(2)

Finally we get the following expression from 119875119899(119909) =

tanminus1(119909)

tanminus1 (119909) = 119909 minus 1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot + (minus1)1198991199092119899+1

2119899 + 1

+ sdot sdot sdot

(3)

But there is still another problem such that a function tocompute this based on the above form is not appropriatefor parallelization This is because each computed value isdependent on previously computed values Assuming wedistribute this workload on eight nodes they should not bedependent on the previous iteration and the next iterationThat means the next term calculation requires the result ofprevious term calculation resulting in serialized executionin a parallelized environment For example considering thefollowing expression

tanminus1 (119909) = 1205874

(4)

it is necessary to calculate the following expression

tanminus1 (119909) = 1 minus 13

3

+

15

5

minus

17

7

+ sdot sdot sdot (5)

But for computing (minus177) the partial term of 1minus133+155should be calculated a priori Again for computing (+155)the partial term of 1 minus 133 should be calculated a prioriThus we need to come up with a parallelized solution for the120587 calculation

In this paper we propose such a parallelized solutionto distribute the heavy workloads to multiple nodes Anindependent form of this equation should be providedTherefore we convert the equation into an integral formthat is suitable for parallelized execution on MapReduceframework We first take the derivative from the expression(3) with respect to 119909

119889

119889119909

tanminus1 (119909) = 1 minus 1199092 + 1199094 minus 1199096 + sdot sdot sdot + (minus1)1198991199092119899 + sdot sdot sdot (6)

We replace the variable 119909 with 119905 for the sake of convenience

119889

119889119905

tanminus1 (119905) = 1 minus 1199052 + 1199054 minus 1199056 + sdot sdot sdot + (minus1)1198991199052119899 + sdot sdot sdot (7)

At this time expression (7) can be simplified by

1

1 + 1199052

= 1 minus 1199052

+ 1199054

minus 1199056

+ sdot sdot sdot + (minus1)119899

1199052119899

+ sdot sdot sdot (8)

to119889

119889119905

tanminus1 (119905) = 11 + 1199052

(9)

Integrate this formula to infinite

int

119887

119886

119905

119889119905

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (10)

Integrating this equation for the interval 119886 to 119887 yields theintegral form of tanminus1(119905) By substituting 1205874 = tanminus1(119905) into

Journal of Applied Mathematics 5

this formula we get the parallelized form that is executableon the MapReduce platform

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (11)

By tanminus1(tan(1205874)) = tanminus1(1) we get1205874 = tanminus1(1) Finallywe make use of (11) in this expression to get the followingexpression

120587 = 4 tanminus1 (119905) = 4int119887

119886

1

1 + 1199052

= int

119887

119886

4

1 + 1199052

(forall119886 119887 isin 119877)

(12)

We approximately get the 120587 value by integrating this equationfor the interval minus12 to 12

Unlike an infinite series representation the integral formis fully parallelizable and it is easy to divide the probleminto chunksparts of the work We distribute and map thesetasks onto multiple clouding nodes However this equationcannot be executed on cloud computing which is highlyparallelized and distributed in a computing environmentThis is an example of task parallelization and partitioning andcan be run on a mobile cloud convergence platform

4 REST Application Interface

41 Persistent Storage In this section we examine localstorages on HTML5 web applications Usually we make useof cookie and session for keeping information on desktopwhen network connection is not available HTML5 providesmore options than conventional web development methodsLocalStorage sessionStorage andWebDB are like thatWhileall of these functionalities are applicable to both the mobileand desktop worlds in the world of desktops you generallyhave a lower rate of adoption However any mobile devicereleased in the last 2-3 years will support most of thesespecs Moreover the explosive use of mobile devices such assmartphones requires the demand of using HTML5 due toone source multiuse (OSMU) development So there are bigdemands of persistent storage using HTML5 The persistentstorage support was in demand in the world of desktopsbut with the rise of the mobile web and edge connectionssupport for offline capability has exploded Everything fromoffline data storage to the actual application startup is alreadyavailable and supported on a wide range of mobile plat-forms The HTML5 brings us to the three storage mediumslocalStorage sessionStorage andWebDB Luckily the SenchaTouch data package offers awesome wrappers around allthree We can use these persistent storages regardless of thenetwork connection status SessionStorage is not a persistentstorage meaning it gets wiped whenever the user leaves thepage or closes the application However in case of one-pageweb apps where you stay on the same page the entire timesessionStorage can be a perfect candidate for offline dataaccess especially in data-sensitive scenarioswhere you do notwant the data persisted on the device after the user is doneusing the app SessionStorage is generally limited to 5MB insize and when that is exceeded depending on the platform

HTML5 (Sencha Touch) based platform independent application

REST-MapReduce

request processor

SNFR node 1

SNFR node 2

SNFR node 3

SNFR node 4

In-mem DB

In-mem DB

In-mem DB

In-mem DB

REST Open API interface

Figure 3 System integration and interactions between the compo-nents

either a JavaScript error might be thrown or a popup ispresented to the user asking for permission to increase theavailable storage

LocalStorage is essentially the same thing as sessionStor-age except that it is persistent In other words if you closethe app and return the data will still be there localStorage ismore suited for data that you want to be available when usedin combination with the offline startup techniques discussedearlier However the localStorage still has a problem for beinga perfect persistency If you clean and delete your web cachefrom your browser it will be removed from then on So wehave to prepare a work around for compensating the casesSencha Touch configuration for localStorage looks almostidentical to that of sessionStorage

Finally the web database is supported by almost everybrowser Though specs call for 5MB limit per origin iOS hasbeen known to allowup to 50MBaftermultiple user promptsBehind the scenes it is an SQL database with a query-basedlanguage that many of us know and love When it comes toconfiguring it in Sencha Touch it is just as easy as with theother storage mediums

42 System Components We implemented our applicationexploiting 3 cutting edge technologies Figure 3 shows thesystem architecture of our acquisition tax analysis appli-cation Our system architecture consists of the followingcomponents REST Open API server HTML5 based Plat-form Independent Client Application and Database ServerFigure 3 shows the system architecture of our platform inde-pendent application design and implementation for checkingcapital gain tax relief due to one house by one household

In-Memory Database For the high performance of databasewe make use of the in-memory database in this projectBecause of toomany representative requests we cameupwitha state-of-the-art technology for processing this type of shortand high frequency requests The best way to service theserequests is the in-memory databaseREST Open API Web Service The REST is a platformindependent architectural style REST ignores the details of

6 Journal of Applied Mathematics

Object1 obj1

String strSearchKeyword = getParameter(STR PARAM SEARCHKEYWORD)

String strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword + amptarget=adult

URL text = new URL(strWebSvcQuery)

XmlObjectConversionFactory objCreator = XmlObjectConversionFactorynewInstance()

XmlObjectConverter xoConverter = objCreatornewConverter()

obj1 = xoConvertersetInput( textopenStream() null )

if (obj1getbAdult())

return

else

try

strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword +

ampdisplay=10ampstart=1amptarget=webkr

URL text = new URL(strWebSvcQuery)

String test = texttoString()

XmlPullParserFactory parserCreator =

XmlPullParserFactorynewInstance()

XmlPullParser parser = parserCreatornewPullParser()

parsersetInput( textopenStream() null )

String tag

int parserEvent = parsergetEventType()

while (parserEvent = XmlPullParserEND DOCUMENT )

switch(parserEvent)

case XmlPullParserTEXT

tag = parsergetName()

break

case XmlPullParserEND TAG

tag = parsergetName()

break

case XmlPullParserSTART TAG

tag = parsergetName()

break

catch( Exception e )

Loge(dd Error in network call+ e)

Algorithm 1 Open API parser

component implementation and protocol syntax in order tofocus on the roles of components the constraints upon theirinteraction with other components and their interpretationof significant data elements

Sencha Touch (HTML5) Application Sencha Touch is arepresentative HTML5 UI Framework in these days SenchaTouch is a well-known user interface (UI) JavaScript libraryor framework specifically built for the Mobile Web It can beused byWeb developers to develop user interfaces for mobileweb applications that look and feel like native applicationson supported mobile devices As shown in Algorithm 1 it

is fully based on web standards such as HTML5 CSS3 andJavaScript SenchaTouch aims to enable developers to quicklyand easily create HTML5 based mobile apps that work onAndroid iOS Windows Tizen and BlackBerry devices andproduce a native-app-like experience inside a browser

43 System Implementation Using these techniques wedeveloped our system and application which is platformindependent one as shown in Figure 3The applicationmakesuse of the AJAX request to the REST Open API web serviceas shown in Algorithm 2

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

4 Journal of Applied Mathematics

set of intermediate values to the userrsquos Reduce function[1] In this work we eliminate data dependency throughworkload parallelization if any exists between the workloadsof slaves This is because the data dependency leads toperformance degradation severely resulting in sequentialexecution slowast(slowast4) Map phase generates computation resultas a form of key-value pairs into log files (eg ltpartialpigt lt105721gt) The Map function takes a log line pullsout the timestamp field when the server finished processingthe request converts it into a minute-in-week slot and thenwrites out in file systems Reduce phase reads and sorts allintermediate data so that all occurrences of the same keyare grouped together resulting in the final result which isnumerically added for all the same keys This is the reasonwhy we can see the final pi value as 3141592 in Figure 2

32 Task Parallelization Phase In this section we show adevelopment procedure of the cloud-based applications ona mobile platform especially 120587 calculation The first stepin this procedure is to identify sets of tasks that can runconcurrently andor partitions of data that can be processedconcurrently The second step is to eliminate dependencyif any exists between every computational phase in thealgorithmThe dependency limit of the degree of parallelismresults in performance degradation 120587 is a mathematicalconstant whose value is the ratio of any Euclidean planecirclersquos circumference to its diameter this is the same valueas the ratio of a circlersquos area to the square of its radius Manyformulas frommathematics science and engineering involve120587 which makes it one of the most important mathematicalconstants The simplest method to calculate 120587 is circum-ference divided by diameter [24] However it is difficult toget the exact circumference using this simple method As aresult there are other formulas to calculate 120587 These includeseries products geometric constructions limits special val-ues and pi iterations To calculate 120587 through mobile cloudconvergence we first need to convert the algorithm into aparallelized version We present a 120587 calculation with infiniteseries that puts forth a parallelization method for ease ofapplication on the mobile cloud convergence To calculate 120587we first show the procedure of parallelizing the pi calculationas follows

119875119899(119909) = 119891 (119888) + 119891

1015840

(119888) (119909 minus 119888)

+

11989110158401015840

(119888)

2

(119909 minus 119888)2

+ sdot sdot sdot +

119891(119899)

(119888)

119899

(119909 minus 119888)119899

(1)

where 119875119899(119909) is defined by the Taylor series 119875

119899(119909) =

suminfin

119896=0(119891119896

(0)119896) especially on 119888 = 0 is known as theMaclaurinseries So we compute the Maclaurin series generated by119891(119909) = tanminus1(119909) Since we need the 119899th order derivative of119891(119909) = tanminus1(119909) we apply this expression to the Maclaurinseries Consider

119875119899(119909) = 0 + 119909 + 0 +

1199093

3

+ 0 +

1199095

5

+ sdot sdot sdot

= 119909 minus

1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot

(2)

Finally we get the following expression from 119875119899(119909) =

tanminus1(119909)

tanminus1 (119909) = 119909 minus 1199093

3

+

1199095

5

minus

1199097

7

+ sdot sdot sdot + (minus1)1198991199092119899+1

2119899 + 1

+ sdot sdot sdot

(3)

But there is still another problem such that a function tocompute this based on the above form is not appropriatefor parallelization This is because each computed value isdependent on previously computed values Assuming wedistribute this workload on eight nodes they should not bedependent on the previous iteration and the next iterationThat means the next term calculation requires the result ofprevious term calculation resulting in serialized executionin a parallelized environment For example considering thefollowing expression

tanminus1 (119909) = 1205874

(4)

it is necessary to calculate the following expression

tanminus1 (119909) = 1 minus 13

3

+

15

5

minus

17

7

+ sdot sdot sdot (5)

But for computing (minus177) the partial term of 1minus133+155should be calculated a priori Again for computing (+155)the partial term of 1 minus 133 should be calculated a prioriThus we need to come up with a parallelized solution for the120587 calculation

In this paper we propose such a parallelized solutionto distribute the heavy workloads to multiple nodes Anindependent form of this equation should be providedTherefore we convert the equation into an integral formthat is suitable for parallelized execution on MapReduceframework We first take the derivative from the expression(3) with respect to 119909

119889

119889119909

tanminus1 (119909) = 1 minus 1199092 + 1199094 minus 1199096 + sdot sdot sdot + (minus1)1198991199092119899 + sdot sdot sdot (6)

We replace the variable 119909 with 119905 for the sake of convenience

119889

119889119905

tanminus1 (119905) = 1 minus 1199052 + 1199054 minus 1199056 + sdot sdot sdot + (minus1)1198991199052119899 + sdot sdot sdot (7)

At this time expression (7) can be simplified by

1

1 + 1199052

= 1 minus 1199052

+ 1199054

minus 1199056

+ sdot sdot sdot + (minus1)119899

1199052119899

+ sdot sdot sdot (8)

to119889

119889119905

tanminus1 (119905) = 11 + 1199052

(9)

Integrate this formula to infinite

int

119887

119886

119905

119889119905

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (10)

Integrating this equation for the interval 119886 to 119887 yields theintegral form of tanminus1(119905) By substituting 1205874 = tanminus1(119905) into

Journal of Applied Mathematics 5

this formula we get the parallelized form that is executableon the MapReduce platform

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (11)

By tanminus1(tan(1205874)) = tanminus1(1) we get1205874 = tanminus1(1) Finallywe make use of (11) in this expression to get the followingexpression

120587 = 4 tanminus1 (119905) = 4int119887

119886

1

1 + 1199052

= int

119887

119886

4

1 + 1199052

(forall119886 119887 isin 119877)

(12)

We approximately get the 120587 value by integrating this equationfor the interval minus12 to 12

Unlike an infinite series representation the integral formis fully parallelizable and it is easy to divide the probleminto chunksparts of the work We distribute and map thesetasks onto multiple clouding nodes However this equationcannot be executed on cloud computing which is highlyparallelized and distributed in a computing environmentThis is an example of task parallelization and partitioning andcan be run on a mobile cloud convergence platform

4 REST Application Interface

41 Persistent Storage In this section we examine localstorages on HTML5 web applications Usually we make useof cookie and session for keeping information on desktopwhen network connection is not available HTML5 providesmore options than conventional web development methodsLocalStorage sessionStorage andWebDB are like thatWhileall of these functionalities are applicable to both the mobileand desktop worlds in the world of desktops you generallyhave a lower rate of adoption However any mobile devicereleased in the last 2-3 years will support most of thesespecs Moreover the explosive use of mobile devices such assmartphones requires the demand of using HTML5 due toone source multiuse (OSMU) development So there are bigdemands of persistent storage using HTML5 The persistentstorage support was in demand in the world of desktopsbut with the rise of the mobile web and edge connectionssupport for offline capability has exploded Everything fromoffline data storage to the actual application startup is alreadyavailable and supported on a wide range of mobile plat-forms The HTML5 brings us to the three storage mediumslocalStorage sessionStorage andWebDB Luckily the SenchaTouch data package offers awesome wrappers around allthree We can use these persistent storages regardless of thenetwork connection status SessionStorage is not a persistentstorage meaning it gets wiped whenever the user leaves thepage or closes the application However in case of one-pageweb apps where you stay on the same page the entire timesessionStorage can be a perfect candidate for offline dataaccess especially in data-sensitive scenarioswhere you do notwant the data persisted on the device after the user is doneusing the app SessionStorage is generally limited to 5MB insize and when that is exceeded depending on the platform

HTML5 (Sencha Touch) based platform independent application

REST-MapReduce

request processor

SNFR node 1

SNFR node 2

SNFR node 3

SNFR node 4

In-mem DB

In-mem DB

In-mem DB

In-mem DB

REST Open API interface

Figure 3 System integration and interactions between the compo-nents

either a JavaScript error might be thrown or a popup ispresented to the user asking for permission to increase theavailable storage

LocalStorage is essentially the same thing as sessionStor-age except that it is persistent In other words if you closethe app and return the data will still be there localStorage ismore suited for data that you want to be available when usedin combination with the offline startup techniques discussedearlier However the localStorage still has a problem for beinga perfect persistency If you clean and delete your web cachefrom your browser it will be removed from then on So wehave to prepare a work around for compensating the casesSencha Touch configuration for localStorage looks almostidentical to that of sessionStorage

Finally the web database is supported by almost everybrowser Though specs call for 5MB limit per origin iOS hasbeen known to allowup to 50MBaftermultiple user promptsBehind the scenes it is an SQL database with a query-basedlanguage that many of us know and love When it comes toconfiguring it in Sencha Touch it is just as easy as with theother storage mediums

42 System Components We implemented our applicationexploiting 3 cutting edge technologies Figure 3 shows thesystem architecture of our acquisition tax analysis appli-cation Our system architecture consists of the followingcomponents REST Open API server HTML5 based Plat-form Independent Client Application and Database ServerFigure 3 shows the system architecture of our platform inde-pendent application design and implementation for checkingcapital gain tax relief due to one house by one household

In-Memory Database For the high performance of databasewe make use of the in-memory database in this projectBecause of toomany representative requests we cameupwitha state-of-the-art technology for processing this type of shortand high frequency requests The best way to service theserequests is the in-memory databaseREST Open API Web Service The REST is a platformindependent architectural style REST ignores the details of

6 Journal of Applied Mathematics

Object1 obj1

String strSearchKeyword = getParameter(STR PARAM SEARCHKEYWORD)

String strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword + amptarget=adult

URL text = new URL(strWebSvcQuery)

XmlObjectConversionFactory objCreator = XmlObjectConversionFactorynewInstance()

XmlObjectConverter xoConverter = objCreatornewConverter()

obj1 = xoConvertersetInput( textopenStream() null )

if (obj1getbAdult())

return

else

try

strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword +

ampdisplay=10ampstart=1amptarget=webkr

URL text = new URL(strWebSvcQuery)

String test = texttoString()

XmlPullParserFactory parserCreator =

XmlPullParserFactorynewInstance()

XmlPullParser parser = parserCreatornewPullParser()

parsersetInput( textopenStream() null )

String tag

int parserEvent = parsergetEventType()

while (parserEvent = XmlPullParserEND DOCUMENT )

switch(parserEvent)

case XmlPullParserTEXT

tag = parsergetName()

break

case XmlPullParserEND TAG

tag = parsergetName()

break

case XmlPullParserSTART TAG

tag = parsergetName()

break

catch( Exception e )

Loge(dd Error in network call+ e)

Algorithm 1 Open API parser

component implementation and protocol syntax in order tofocus on the roles of components the constraints upon theirinteraction with other components and their interpretationof significant data elements

Sencha Touch (HTML5) Application Sencha Touch is arepresentative HTML5 UI Framework in these days SenchaTouch is a well-known user interface (UI) JavaScript libraryor framework specifically built for the Mobile Web It can beused byWeb developers to develop user interfaces for mobileweb applications that look and feel like native applicationson supported mobile devices As shown in Algorithm 1 it

is fully based on web standards such as HTML5 CSS3 andJavaScript SenchaTouch aims to enable developers to quicklyand easily create HTML5 based mobile apps that work onAndroid iOS Windows Tizen and BlackBerry devices andproduce a native-app-like experience inside a browser

43 System Implementation Using these techniques wedeveloped our system and application which is platformindependent one as shown in Figure 3The applicationmakesuse of the AJAX request to the REST Open API web serviceas shown in Algorithm 2

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

Journal of Applied Mathematics 5

this formula we get the parallelized form that is executableon the MapReduce platform

tanminus1 (119905) = int119887

119886

1

1 + 1199052

(forall119886 119887 isin 119877) (11)

By tanminus1(tan(1205874)) = tanminus1(1) we get1205874 = tanminus1(1) Finallywe make use of (11) in this expression to get the followingexpression

120587 = 4 tanminus1 (119905) = 4int119887

119886

1

1 + 1199052

= int

119887

119886

4

1 + 1199052

(forall119886 119887 isin 119877)

(12)

We approximately get the 120587 value by integrating this equationfor the interval minus12 to 12

Unlike an infinite series representation the integral formis fully parallelizable and it is easy to divide the probleminto chunksparts of the work We distribute and map thesetasks onto multiple clouding nodes However this equationcannot be executed on cloud computing which is highlyparallelized and distributed in a computing environmentThis is an example of task parallelization and partitioning andcan be run on a mobile cloud convergence platform

4 REST Application Interface

41 Persistent Storage In this section we examine localstorages on HTML5 web applications Usually we make useof cookie and session for keeping information on desktopwhen network connection is not available HTML5 providesmore options than conventional web development methodsLocalStorage sessionStorage andWebDB are like thatWhileall of these functionalities are applicable to both the mobileand desktop worlds in the world of desktops you generallyhave a lower rate of adoption However any mobile devicereleased in the last 2-3 years will support most of thesespecs Moreover the explosive use of mobile devices such assmartphones requires the demand of using HTML5 due toone source multiuse (OSMU) development So there are bigdemands of persistent storage using HTML5 The persistentstorage support was in demand in the world of desktopsbut with the rise of the mobile web and edge connectionssupport for offline capability has exploded Everything fromoffline data storage to the actual application startup is alreadyavailable and supported on a wide range of mobile plat-forms The HTML5 brings us to the three storage mediumslocalStorage sessionStorage andWebDB Luckily the SenchaTouch data package offers awesome wrappers around allthree We can use these persistent storages regardless of thenetwork connection status SessionStorage is not a persistentstorage meaning it gets wiped whenever the user leaves thepage or closes the application However in case of one-pageweb apps where you stay on the same page the entire timesessionStorage can be a perfect candidate for offline dataaccess especially in data-sensitive scenarioswhere you do notwant the data persisted on the device after the user is doneusing the app SessionStorage is generally limited to 5MB insize and when that is exceeded depending on the platform

HTML5 (Sencha Touch) based platform independent application

REST-MapReduce

request processor

SNFR node 1

SNFR node 2

SNFR node 3

SNFR node 4

In-mem DB

In-mem DB

In-mem DB

In-mem DB

REST Open API interface

Figure 3 System integration and interactions between the compo-nents

either a JavaScript error might be thrown or a popup ispresented to the user asking for permission to increase theavailable storage

LocalStorage is essentially the same thing as sessionStor-age except that it is persistent In other words if you closethe app and return the data will still be there localStorage ismore suited for data that you want to be available when usedin combination with the offline startup techniques discussedearlier However the localStorage still has a problem for beinga perfect persistency If you clean and delete your web cachefrom your browser it will be removed from then on So wehave to prepare a work around for compensating the casesSencha Touch configuration for localStorage looks almostidentical to that of sessionStorage

Finally the web database is supported by almost everybrowser Though specs call for 5MB limit per origin iOS hasbeen known to allowup to 50MBaftermultiple user promptsBehind the scenes it is an SQL database with a query-basedlanguage that many of us know and love When it comes toconfiguring it in Sencha Touch it is just as easy as with theother storage mediums

42 System Components We implemented our applicationexploiting 3 cutting edge technologies Figure 3 shows thesystem architecture of our acquisition tax analysis appli-cation Our system architecture consists of the followingcomponents REST Open API server HTML5 based Plat-form Independent Client Application and Database ServerFigure 3 shows the system architecture of our platform inde-pendent application design and implementation for checkingcapital gain tax relief due to one house by one household

In-Memory Database For the high performance of databasewe make use of the in-memory database in this projectBecause of toomany representative requests we cameupwitha state-of-the-art technology for processing this type of shortand high frequency requests The best way to service theserequests is the in-memory databaseREST Open API Web Service The REST is a platformindependent architectural style REST ignores the details of

6 Journal of Applied Mathematics

Object1 obj1

String strSearchKeyword = getParameter(STR PARAM SEARCHKEYWORD)

String strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword + amptarget=adult

URL text = new URL(strWebSvcQuery)

XmlObjectConversionFactory objCreator = XmlObjectConversionFactorynewInstance()

XmlObjectConverter xoConverter = objCreatornewConverter()

obj1 = xoConvertersetInput( textopenStream() null )

if (obj1getbAdult())

return

else

try

strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword +

ampdisplay=10ampstart=1amptarget=webkr

URL text = new URL(strWebSvcQuery)

String test = texttoString()

XmlPullParserFactory parserCreator =

XmlPullParserFactorynewInstance()

XmlPullParser parser = parserCreatornewPullParser()

parsersetInput( textopenStream() null )

String tag

int parserEvent = parsergetEventType()

while (parserEvent = XmlPullParserEND DOCUMENT )

switch(parserEvent)

case XmlPullParserTEXT

tag = parsergetName()

break

case XmlPullParserEND TAG

tag = parsergetName()

break

case XmlPullParserSTART TAG

tag = parsergetName()

break

catch( Exception e )

Loge(dd Error in network call+ e)

Algorithm 1 Open API parser

component implementation and protocol syntax in order tofocus on the roles of components the constraints upon theirinteraction with other components and their interpretationof significant data elements

Sencha Touch (HTML5) Application Sencha Touch is arepresentative HTML5 UI Framework in these days SenchaTouch is a well-known user interface (UI) JavaScript libraryor framework specifically built for the Mobile Web It can beused byWeb developers to develop user interfaces for mobileweb applications that look and feel like native applicationson supported mobile devices As shown in Algorithm 1 it

is fully based on web standards such as HTML5 CSS3 andJavaScript SenchaTouch aims to enable developers to quicklyand easily create HTML5 based mobile apps that work onAndroid iOS Windows Tizen and BlackBerry devices andproduce a native-app-like experience inside a browser

43 System Implementation Using these techniques wedeveloped our system and application which is platformindependent one as shown in Figure 3The applicationmakesuse of the AJAX request to the REST Open API web serviceas shown in Algorithm 2

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

6 Journal of Applied Mathematics

Object1 obj1

String strSearchKeyword = getParameter(STR PARAM SEARCHKEYWORD)

String strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword + amptarget=adult

URL text = new URL(strWebSvcQuery)

XmlObjectConversionFactory objCreator = XmlObjectConversionFactorynewInstance()

XmlObjectConverter xoConverter = objCreatornewConverter()

obj1 = xoConvertersetInput( textopenStream() null )

if (obj1getbAdult())

return

else

try

strWebSvcQuery = httpopenapinavercomsearchkey=testampquery=

strWebSvcQuery += strSearchKeyword +

ampdisplay=10ampstart=1amptarget=webkr

URL text = new URL(strWebSvcQuery)

String test = texttoString()

XmlPullParserFactory parserCreator =

XmlPullParserFactorynewInstance()

XmlPullParser parser = parserCreatornewPullParser()

parsersetInput( textopenStream() null )

String tag

int parserEvent = parsergetEventType()

while (parserEvent = XmlPullParserEND DOCUMENT )

switch(parserEvent)

case XmlPullParserTEXT

tag = parsergetName()

break

case XmlPullParserEND TAG

tag = parsergetName()

break

case XmlPullParserSTART TAG

tag = parsergetName()

break

catch( Exception e )

Loge(dd Error in network call+ e)

Algorithm 1 Open API parser

component implementation and protocol syntax in order tofocus on the roles of components the constraints upon theirinteraction with other components and their interpretationof significant data elements

Sencha Touch (HTML5) Application Sencha Touch is arepresentative HTML5 UI Framework in these days SenchaTouch is a well-known user interface (UI) JavaScript libraryor framework specifically built for the Mobile Web It can beused byWeb developers to develop user interfaces for mobileweb applications that look and feel like native applicationson supported mobile devices As shown in Algorithm 1 it

is fully based on web standards such as HTML5 CSS3 andJavaScript SenchaTouch aims to enable developers to quicklyand easily create HTML5 based mobile apps that work onAndroid iOS Windows Tizen and BlackBerry devices andproduce a native-app-like experience inside a browser

43 System Implementation Using these techniques wedeveloped our system and application which is platformindependent one as shown in Figure 3The applicationmakesuse of the AJAX request to the REST Open API web serviceas shown in Algorithm 2

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

Journal of Applied Mathematics 7

var button = new ExtToolbar(cls ldquocalculator buttonrdquoheight 35items [thistext

xtype lsquospacerrsquohtml new ExtXTemplate(lsquoltimg style=ldquowidth5emheight5emrdquo

src=ldquoresourcesimgsbuttonpngrdquogtrsquo)apply(name lsquobuttonrsquo)handler function ()

ExtAjaxrequest(url lsquolocalhost8080Exampleapisexampleparamsaction lsquocalculationrsquouserid lsquo15rsquousername lsquoMCHOIrsquousername lsquoMCHOIrsquouserDate lsquo20140315rsquo

userEtc lsquoetcrsquoHouseHolds lsquo2rsquoAreaofExcsSpace lsquo5rsquoAcquisitionPrice lsquo25000rsquouserContact lsquo01099695699rsquo

success function(xhr)

var response =Extdecode(xhrresponseText)

)

]

)

Algorithm 2 A portion of our HTML5 application code

Our application supportsWebOSAndroid iOSWindowPhone and BlackBerry The application requires the onlyinformation of acquisition tax the area of exclusive spacehousehold numbers and the location Then the applicationprovides the capital gain tax result which is automaticallycalculated

5 Experimental Results

We describe the experimental result for the REST-MapReduce in this section This is because REST webservice is one of the most convenient methods for accessinginformation through Internet Usually a smartphoneapplication needs information from several sources of (oneor more) REST web services In this experiment we adoptthe Apache Tomcat 70 as a web application server Jersey18 for REST Open API Service Provider and Hadoop204 as MapReduce execution server Apache Tomcat isan open software with Java Servlet and JavaServer Pagestechnologies Apache Tomcat powers numerous large-scaleweb applications across a diverse range of industries andorganizations Jersey is the open source JAX-RS (JSR311) Reference Implementation [14] for building RESTfulWeb services Jersey provides an API so that developersmay extend Jersey to suit their needs We make use of both

Tomcat and Jersey to implement our systemsWe constructedeight-node Linux cluster of Core i5 machines each with4G RAM The machines were connected by network andmanaged by Hadoop [4] Figure 4 shows an overview of ourREST-MapReduce framework architecture

Prior to evaluating the performance in detail we presentsystemmodel as a queueing networkThe evaluationmodel ofour REST-MapReduce architecture is presented in Figure 4REST Open API Web Service is composed of three compo-nents comprising (1) dedicated node for Jersey REST webservice (2) Hadoop cluster and (3) Job scheduletrackerAs shown in Figure 4 there are a number of components(nodes) comprising several queues Jersey REST web servermanages web services instead of web so as to provideweb server maintenance service especially compositiondeployment and management Request traverses via the newjob submission node and is received by the job schedulerrepresented by the components at the left bottom of Figure 4Our system model is a sort of open queueing network thathas external arrivals and departures The requests enter thesystem at ldquoNew Job Submissionrdquo and exit at ldquoOUTrdquo ofHadoopcluster and dedicated node for REST web server respectivelyThe number of requests in the system varies with time Inanalyzing an open system we assume that the throughput isknown (to be equal to the arrival rate) andwe also assume that

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

8 Journal of Applied Mathematics

New request

OutInA

OutB1

OutB2

Node 1 Node 2 Node 3 Node n

Figure 4 Evaluation model

f(x) f(x)

ta x1 x2 x3

Figure 5 Task parallelization and job distribution among Hadoopclusters

there is no probability of incomplete transfer in this systemso there is no retrial path to go back to Hadoop clusters Theinitialization process for the request is done at the schedulerThen the job proceeds to the component either ldquoHadoopclusterrdquo network or Jersey REST web server depending onthe type of request if the request is for the RESTweb server itgoes to theHadoop cluster If the request is for just web serverit goes to the web server

A request may receive service at one or more queuesbefore exiting the system Jobs departing from the jobscheduler arrive at either the Hadoop cluster or dedicatednode for Jersey REST web service All jobs submitted mustfirst pass through the job schedulertracker for determiningwhether it is REST Open API request or MapReduce serviceRequests arrive at the web server at an average rate of 1000sndash15000s Traffic intensity is calculated by the arrival rate overthe service rate that means how fast the incoming traffic isserviced on the server

The key feature of our design is to separate the Jerseyweb server onto a dedicated node This feature isolate theperformance that is not bound to the MapReduce computa-tionHadoop clusters consist ofmultiple computing nodes Inorder to get benefit from such multiple nodes and to handlethe heavy load of MapReduce we need to transform theproblem into parallelizable form To this end we had the taskparallelization phase in Section 32 Unlike an infinite seriesrepresentation the integral form is fully parallelizable and itis easy to divide the problem into chunksparts of work Asshown in Figure 5 the total workloads is divided into three

05

101520

1000 3000 6000 9000 12000 15000 18000 21000 24000

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

minus15

minus10

minus5

Figure 6 Experimental results by increasing service rates 1

0

5

10

15

20

1000 3000 6000 9000 12000 15000 18000 21000 24000

minus10

minus5

Service utilizationIdle probability

Waiting probability for serviceNumber of jobs in the queue

Figure 7 Experimental results by increasing service rates 2

chunks so that we can integrate the formulae at differentnodes in parallelThus we can easily distribute andmap thesetasks ontomultiple clouding nodesWe can approximately getthe 120587 value by integrating this equation for the interval minus12to 12

Figures 6 and 7 show the service utilization idle prob-ability waiting probability for service and number of jobsin the queue depending on increasing service rate Sincethe service rate of each Hadoop node in this experiment is19000 requestsec the mean number of requests in the queuereaches up to the maximum on the total arrival rate whichis increasing between 18000 and 21000 Then it sharply fallsdown to the bottom right after the total arrival rate of 21000

Figure 8 shows the system utilization depending on thechange of performance of REST web service The graph fromVa10 to Va300 shows the system utilization by increasingworkload on the REST web server As mentioned aboveincoming jobs proceed to the component either ldquoHadoopclusterrdquo network or Jersey RESTweb server depending on thetype of the request if the request is for the REST web serverit goes to the Hadoop cluster

If the request is for just web server it goes to the webserver Thus if there are large requests incoming for RESTweb service then it is natural and there are relatively smallrequests forMapReduceThis is the reasonwhy the utilizationof MapReduce servers gets lower by increasing the serverutilization of REST web server

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 9: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

Journal of Applied Mathematics 9

0

2

4

6

8

10

05 04 03 02 01 005 001 0005 0001 00005

Va300Va300Va200

Va100Va50Va10

Figure 8 System utilization depending on the REST web serverperformance

0

20

40

60

80

100

1 2 3 4 5 6 7

RESTMapReduce

Job scheduler

Figure 9 Utilization of REST web server MapReduce clusters andJob Scheduler

Figure 9 shows the utilization of REST web serverMapReduce clusters and Job scheduler First the utilizationof job schedulertracker is constant because the performancechange of the job schedulertracker is not very high It isnegligible So we did not care about the utilization of jobscheduler But we focus onto the utilization of REST webserver andMapReduce clusters By increasing workloads andthe number of nodes the system utilization of MapReduceclusters improves a lot But REST web server utilization isjust a little bit increased by up to its internal processing limit

6 Conclusion

In this work we proposed a novel concept of REST-MapReduce enabling users to use only the REST interfacewithout using the MapReduce architecture We make bothMapReduce and REST Open API into an integrated serviceas REST-MapReduce It is well known that there is slowerresponse time for accessing simple RDBMS on Hadoop thandirect access to RDMBS The slow response time stemsfrom the fact that MapReduce was originally designed foranalyzing large data not for simple RDBMS lookup Such jobscheduling initiating starting tracking and managementduring MapReduce execution are not necessary tasks for

REST Open API service execution To avoid such a problemREST-MapReduce framework provides an integrated inter-face with high performance that supports both REST OpenAPI and MapReduce At the same time the REST OpenAPI service is provided by a separated architecture Likewisewe can overcome such a slow response time of simpleRDBM invocation on Hadoop by this integrated interfacebut differentiated service Surely we have only focused on thetask parallelism such as pi value calculation But generallywe need to prepare various types of requests for simpleDB lookup So future work of this research involves tryingto make faster DB lookup request on Hadoop frameworkphysically

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This work is supported by the Basic Science Research Pro-gram through the National Research Foundation of Korea(NRF) funded by the Ministry of Education Science andTechnology (2012-0008105)

References

[1] J Dean and S Ghemawat ldquoMapReduce simplied data process-ing on large clustersrdquo in USENIX International Conference onOSDI 2004

[2] A C Murthy C Douglas M Konar et al ldquoArchitecture of nextgeneration apache hadoopMapReduce frameworkrdquo Tech Rep2013

[3] ldquoProcessing and Loading Data from Amazon S3 to the VerticaAnalytic Databaserdquo White Paper Amazon Web Service 2013

[4] Hadoop httphadoopapacheorg[5] Amazon Elastic MapReduce Developer Guide Amazon Web

Service 2009[6] Getting Started with Amazon Elastic MapReduce Amazon Web

Service March 2009[7] I Macdonald ldquoRubyAmazon amp Amazon web servicesrdquo Dr

Dobbs Journal vol 30 no 2 pp 30ndash34 2005[8] R Hussain and H Oh ldquoCooperation-aware VANET clouds

providing secure cloud services to vehicular ad hoc networksrdquoJournal of Information Processing Systems vol 10 no 1 pp 103ndash118 2014

[9] S Islam R Rahman A Roy I Islam and M R AminldquoPerformance evaluation of finite queue switching under two-dimensional MG1(m) trafficrdquo Journal of Information Process-ing Systems vol 7 no 4 pp 679ndash690 2011

[10] R Pan G Xu B Fu P Dolog Z Wang and M LeginusldquoImproving recommendations by the clustering of tag neigh-boursrdquo Journal of Convergence vol 3 no 1 pp 13ndash20 2012

[11] H Zhao and P Doshi ldquoTowards automated RESTful Webservice compositionrdquo in Proceedings of the IEEE InternationalConference on Web Services (ICWS rsquo09) pp 189ndash196 July 2009

[12] X Zhao E Liu G J Clapworthy N Ye and Y Lu ldquoRESTful webservice composition extracting a process model from linear

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 10: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

10 Journal of Applied Mathematics

logic theorem provingrdquo in Proceedings of the 7th InternationalConference on Next Generation Web Services Practices (NWeSPrsquo11) pp 398ndash403 October 2011

[13] Z Li and L OrsquoBrien ldquoTowards effort estimation for web servicecompositions using classification matrixrdquo 2010

[14] C Pautasso O Zimmermann and F Leymann ldquoRESTful webservices vs ldquoBigrdquo web services making the right architecturaldecisionrdquo in Proceedings of the 17th International Conference onWorld Wide Web (WWW 08) pp 805ndash814 April 2008

[15] R Alarcon EWilde and J Bellido ldquoHypermedia-drivenREST-ful service compositionrdquo Service-Oriented Computing Springervol 6568 pp 111ndash120 2011

[16] M Yoon Y K Kim and J W Jang ldquoAn energy-efficientrouting protocol using message success rate in wireless sensornetworksrdquo Journal of Convergence vol 4 no 1 2013

[17] ldquoThe Internet of Things In action The Next Webrdquohttpthenextwebcominsider20130519the-internet-of-things-in-action

[18] J Rao and X Su ldquoA survey of automated Web service compo-sition methodsrdquo in Proceedings of the 1st International Work-shop on Semantic Web Services and Web Process Composition(SWSWPC rsquo04) pp 43ndash54 July 2004

[19] J Dean and S Ghemawa ldquoMapReduce simplified data pro-cessing on large clustersrdquo in Proceedings of the 6th USENIXSymposium on Operating System Design and Implementation2004

[20] C Pautasso ldquoRESTful web service composition with BPEL forRESTrdquo Data and Knowledge Engineering vol 68 no 9 pp 851ndash866 2009

[21] F O Catak and M E Balaban ldquoCloudSVM training an SVMclassifier in cloud computing systemsrdquo in Pervasive Computingand the Networked World pp 57ndash68 2013

[22] IBM Smart Cloud httpwwwibmcomcloud-computingusen

[23] M de Kruijf and K Sankaralingam MapReduce for the CellBE Architecture Vertical Research Group Department ofComputer Sciences University of Wisconsin-Madison 2010

[24] M Choi J Park and Y-S Jeong ldquoMobile cloud computingframework for a pervasive and ubiquitous environmentrdquo TheJournal of Supercomputing vol 64 no 2 pp 331ndash356 2013

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 11: Research Article REST-MapReduce: An Integrated Interface ...downloads.hindawi.com/journals/jam/2014/170723.pdfservices [ ]. So, we need to utilize two or more REST web services composition

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of