MICE: An Efficient Grid Scheme for Mathematical Computing

Yi Yang1,2, Li Liu1,2, Lian Li 1, Zhenfang Li 1, Rui Zhou 1,2 1 Computer Science Department, Lanzhou University, Lanzhou, P. . China [email protected] 2 School Of Mathematics and Statistics Lanzhou University, Lanzhou, P. R. China [email protected]

applications, which combine large dataset, geographic Abstract distribution of users and resources, bring about urgent demands for high performance, more stability and large-capacity storage and processing capability that We designed a Grid Computing model in math can't be satisfied by any single mathematical software, based on current network computing technologies. any single computer, and any existing mathematical MICE is an emerging technology to provide uniform computing infrastructure or technology. The effective programming, task submission, and management mathematical software integration, distributed specifications across the large scale distributed resources organization and management with high computing nodes which deployed some famous performance have become the main problem that many mathematical software. MICE utilizes a three-level applications faced. The Grid Computing[1][2] architecture that shields users from low-level technologies are emerging efforts to solve this problem. computing resource discovery and provides globe Grid Computing can constitute a single virtual uniform view for users. We extended MathML to solve environment for task submission, management and the mathematical semantic objects' expression. CSP processing by integrating all kind of resources (Computing Service Platform) servers are adopted in distributed on the network. It can shield the MICE to provide uniform task access, transfer and heterogeneity of underlying physical resource and management of heterogeneous distributed resources build an infrastructure to provide uniform access, across multiple administrative domains. This storage, transfer, management and service capability architecture enables the mathematical software for large scale distributed resources. resources to be deployed as services on the internet. MICE (Mathematics Internet Computing MICE can achieve good scalability, reliability and can Environment) System is a Grid Computing middleware be flexibly deployed and configured. which is designed and implemented by us. MICE can

integrate many kinds of mathematical software and provide uniform seamless access to distributed 1. Introduction computing nodes. It provides a uniform programming language to communicate with various mathematical In recent years, the kind of mathematical software deployed on distributed computing nodes, and software[13] for scientific computing in modern a submission mechanism to improve computing large-scale scientific researchers, classical algorithms performance. The ordinary task can be distributed to and powerful computing resources is growing several ordinary nodes which deployed some common explosively, such as [15], Mathematica[16], software or programs, such as MatLab, SciLab, etc. Matlab[17], etc. There are many problems with it, the Meanwhile, the special task can be distributed to users who want to analyze and complete their tasks are special nodes which deployed unusual resources, often need more than one of the mathematical software, including both the software and the hardware. but every software has its own characteristic, and Distributed multi-domain federated servers and unluckily they are difficult to communicate with each high-available technology are also adopted in MICE other; meanwhile, the software are often setup system. geographically distributed and the users' tasks The rest of the paper is organized as below. Section performed on those software often go with large 2 introduces the related work. Section 3 presents the dataset and computationally expensive. Such

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply. architecture of the MICE system. Section 4 discusses (i.e. Computer Algebra Systems). But JavaMath can be the design and implementation of MICE. Section 5 used for stand-alone applications. gives the summary and the future work. Unlike the IAMC, who much more likes /S mode which can't provide powerful computational capability. 2. Related Work The goal of MICE is some similar to MONET and RISC. They all have achieved distributed web service Computing Grid in mathematics is a hot topic that accessing, uniform user interface, single sign-on, etc. develops rapidly these days. MONET[3], demonstrate But MICE is much different from them in several the applicability of creating a semantic web to the aspects. Firstly, MICE utilizes an extended MathML world of mathematical software, using sophisticated that describes mathematical problems which could algorithms to match the characteristics of a problem to implement the control of problems' execution. the advertised capabilities of available services and Secondly, all computational node in MICE is deployed then invoking the chosen services through a standard with a famous mathematical software, such as Matlab, mechanism. to achieve high performance. Thirdly, MICE adopts RISC[4], a Framework for Brokering Distributed the multi-domain federated server technology and Mathematical Services. In this project the broker requests optimizing technology to achieve better determines the suitable services and returns them to the scalability and availability. Fourthly, role-based client for invocation. The project is based on Web multi-level access control policy is used to implement Service, and puts forward Mathematical Services the access control of the system. Description Language. RIACA[5], has developed a sort of tools, through 3. Architecture Overview TCP/IP socket port that has been built in Server-side, user can remotely access the mathematical MICE is designed for mathematical web computing. computation on Internet. The protocol in It supports uniform secure access and management of communication is OpenMath[8]. various types of heterogeneous distributed The Internet Accessible Mathematical Computation mathematical software and hardware resources. MICE project IAMC[6][12][13] defines (after the model of can integrate many kind of wide heterogeneous the HyperText Transfer Protocol HTTP) the mathematical software resources, such as Matlab, application layer protocol MCP[14] by which a Maple, and Mathematical web services (e.g. special computational server and a client can communicate algorithm, users' own program) etc. It can organize with each other. A server can be referenced by a client them uniformly and shields the heterogeneity and via a URL; the subsequent client-server dialogue different administrative domains of underlying comprises computation and control requests from the resources. Also it provides visual global views and client, corresponding responses from the server, and convenient, standard access and management APIs and also server requests to the client that solicit information interfaces for users and applications. from the end user. The protocol allows the server to MICE adopts a three-layer architecture, as illustrated offer different data formats and also to send informal in Figure.1. The first layer, Language Layer, is mainly service descriptions. OpenMath[8][11] and MathML[8] for representation of mathematical job. It provides a are emerging standard for representing mathematical GUI, called MBuilder, for users inputing their objects with their semantics. There is close relationship programs. It supplies a uniform programming language between the MathML recommendation and the called Mlanguage for describing users computing job Worldwide Web Consortium, for a large overlap flow, translates the flow to MathML, and then sends it between the two developer communities. MathML to an appropriate second layer's server through MGP deals principally with the presentation of mathematical (Mathematical Grid Protocol). In the end, MBuilder objects, while OpenMath is solely concerned with their receives and displays the result in a suitable format. semantic meaning or content. Though MathML does have some limited facilities for dealing with content, it allows semantic information encoded in OpenMath to be embedded inside a MathML structure. Thus the two technologies may be seen as highly complementary. JavaMath[9] is a free software, which enables mathematical programs written in Java to use the computational capabilities of existing compute engines

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply. computational software and web service are on this layer, they can provide the computational capability to users. The MICE architecture presents the major logical functions which the MICE provides. The detail design and implementation will be shown in the next section.

4. Design and Implementation

The main components of the MICE include client tools (MBuilder), CSP servers and USC, as illustrated in Figure.2. The MICE is implemented in Java. The MBuilder communicates with CSP using MGP (Mathematical Grid Protocol), which is also used to Figure 1. MICE Grid Architecture. transmit messages between CSPs. The web services and CSPs use WSDL to public themselves in MRS. The second layer, i.e. the Virtual Compiler layer, is SOAP is used to access web services from CSPs. the core of the system. We implement it as CSP (Computing Service Platform). It is mainly for scheduling of jobs between different computing resources and computing services. The single CSP consists of six core components, including Uniform Operation Interface, Parse Service, Interpreter Service, WFLM (Web Function List Management), MBottle, and System management. The Uniform Operation Interface mainly provides a uniform access across MBuilder and CSPs through MGP. The Parse Service, an XML parser, is used to parse the MathML based programs to job trees. The Interpreter Service takes charge of analyzing, dispatching the job trees to small pieces of trees, and optimizing the executing sequence of these small trees. The WFLM provides web mathematical function list in the CSP. It provides query and maintenance for CSP's mathematical function list, such as the functions that Matlab or Figure 2. Relationship Between Components. Maple provided. The MBottle is mainly for scheduling the small trees among appropriate CSPs and MWSs 4.1. MBuilder (Math Web Services) by different strategies. The system management service mainly includes the MBuilder provides a user interface which provides creation and deletion of MICE grid system's users, command line tools (for Windows and Linux), and system configuration and deployment, job status portable client GUI which can edit the mathematical monitoring and management for the whole MICE grid computational program by Mlanguage, view all the system. information about CSPs, list and update the The third layer is the Meta-computing Layer. We mathematical functions supplied by the MICE. The also implemented it as a part of our system called UCS Client tool receives the requests from users or (Universal Computation Service). applications and submits them to CSPs. Meanwhile it The important part of UCS is MRS (Math Registry accepts the processed results from CSPs and displays Service). It provides registry and publication of CSPs them to users in suitable format. The Client tool and MWSs in our System. It is the information center maintains a local cache to store temporary information, of the System, which provides developers to register such as the files opened, the results received, and so on. their own mathematical web services, and enables the Now we introduce detailed information about CSP to query and update the new version of WFL Mlanguage and MGP used to communicate between (Web Function List). Developers can register web MBuilder and CSPs. services according to the categories we supply on the UCS, so the registry is very simple. Meanwhile, the

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply. 4.1.1. Mlanguage Confessedly, MathML provides semantically-rich representations of mathematical objects which can be processed by a wide range of mathematical services, so we can use it to describe mathematical problems. But if we want to describe a mathematical program which contains judgment statements or repetition operations, how could we do by using MathML? In Mlanguage we extended MathML to add control elements, which are more similar with those in common programming language, in order to implement judgment and repetition in description of mathematical problems. For example, the Mlanguage specification is shown as Figure.3. Figure 4. MGP based on XML.

4.1.2. MGP (Mathematical Grid Protocol ) For remote access and control of technical and mathematical computations, a protocol is needed to connect MBuilder and CSPs. MGP should be a simple, flexible, and powerful protocol whose primary purpose is to support web mathematical computation. We designed this protocol with XML, and it is modeled after HTTP. Each MGP message consists of a header and a body. The header and body are separated by an XML element. Figure.4 shows the specification of MGP. There are three types of program as indicated by the element in Figure.4, which are calculation, update, and command. The calculation type is to execute the mathematical program and finally return the result to users, and the update type is for users to update their MBuilder's information about mathematical function list and web service list, etc. The last type, command, is used to extend in future.

4.2. CSP

In MICE System, We hope there are more and more CSPs distributed in the internet so that we could provide powerful computation capability. CSP consists of several components. It aims to handle the messages which MBuilder or other CSPs send out and returns the results to MBuilder or other CSPs. Its work flow and framework are shown as Figure.5. The first step is receiving messages from internet anywhere, and then Figure 3. Specification on IF. putting the receiving messages, called mathematical program in our system, in a job pool. The second step is the Parse Service's work, which could fetch the mathematical program described by XML format form job pool and parse it to a program tree as illustrated in Figure.6. The Parse Service also chooses the next component to execute according to the type of the program. For example, if this is an update type, the Parse Service will send this tree to the WFLM component to execute. The Interpreter Service is

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply. mainly for optimizing execution of the program tree. Width First Search. Then it will find all the leafage Finally, the WFLM and MBottle decide which nodes, which are divide and plus nodes indicated in destination the program will go. If it is a simple Figure.6 but not 2 or 3 nodes, of body node by Width operation like two numbers' sum, it will be executed First Search. Now the Interpreter Service initializes immediately by java mathematics lib; if it is a Matlab one thread for each leafage nodes to start computing, operation, it will be send to Matlab connector to so the tree can be parallel computed. The algorithm execute; if it is a mathematical web service operation, description is as below: it will be send to the related web service using SOAP; -Input: mathematical program tree T; or if it is a small program tree which want to be sent to -Output: computational result R; other CSP to execute, it will be there. All the work is -Step 1. Find body nodes by WFS. The child nodes of running automatically, so the CSP is very powerful. body node are A1, A2, ..., AN; When some errors occur in a CSP, system will transmit -Step 2. Check if A1 can execute immediately, i.e. if A1 the program to other CSPs, so the system will have a is a leafage node; high level of reliability. In order to increase the -Step 3. If it is not a leafage node, then B1, B2, ..., BN is computational capability, we can simply increase the the child node of A1, then do step 2; CSP's number and update the mathematical web -Step 4. If it is a leafage node, CSP will initialize a service deployed in the internet. Now we introduce the computational thread to execute this leafage node, detailed mechanisms of CSP. querying from local immediate functions and local resident functions, such as Matlab; -Step 5. If there is a suitable function, either the local immediate function or the local resident function (described in section 4.3), then pack the computational thread and execute, finally put the result to the appropriate node. When this process is done, then the former father node becomes a leafage node, i.e. computational node. CSP will do Step 4 on this new leafage node; -Step 6. If there is not a suitable function, then query the WFLM to find if there have suitable mathematical web services; -Step 7. If there has a suitable web service to solve this computing thread, then pack it by SOAP and finally Figure 5. CSP Work Flow. put the result to appropriate node. Then do Step 4 on the new leafage node; -Step 8. If there has not a web service to solve it, then return a message to tell users that there is not suitable service in the System; -Step 9. By above recursion process, we will find the result is in the root node of this tree, and then we return this result to users, and algorithm stops;

4.2.2. Optimization Algorithm When we do the Algorithm 1, the mathematical program tree will be handled in only one CSP, if we can break up this whole tree to many small pieces of trees which have no computational relativity, which means that these small pieces of trees can be executed alone, and send them to other low load CSPs, we will have a higher level of Figure 6. Program Tree. parallelism. The algorithm description shows below: -Input: mathematical program tree T; 4.2.1. Mechanism of Interpreter Service We use -Output: sets of small pieces of mathematical tree S multi-threads technology to handle this program tree. (every tree can run on one CSP alone); While the Interpreter Service takes a program from job -Step 1. Scan T from the bottom to the top and sign the pool, it will find the body node of this program tree by node that we will separate; -Step 2. Separate the signed node and its child nodes

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply. from T by WFS. Make a variable in the separate MWSs in our System. In fact, it is the layer or place location to instead the separated tree; where all the users' job to be truly executed. The UCS -Step 3. Put the separated tree to sets S;Now we have contains two important parts: Connector and some small pieces but complete trees in sets S, we can MRS. The Connector supports the CSP access to local use our scheduling approach[10] to execute them. mathematic function repository, which contains two type of functions, one is called local immediate 4.2.3. WFLM and MBottle There is a WFL (Web functions which is supplied by the java programming Function List) in the WFLM, so the major task of language, like function add, divide, etc, the other is WFLM is to manage this list. Figure.7 will show you called local resident functions, such as Matlab's the detail of the list, as the figure shown the list is functions which are setup on this CSP. The MRS represented by XML in order to obtain the well provides information services of global mathematical expansibility of XML. CSP utilizes this module to services in the system. It provides query and query the information about the mathematical web maintenance for mathematical services information, services and other CSPs. We can use the XML query access and management of computing service tools to increase WFLM's query speed. resources, security and authorization information. It provides computing services registry and publication services. In that case, there are three types of computational functions all in system, they are local immediate functions, local resident functions and mathematical web services.

5. Summary and Future Work

A mathematical web service which invokes the Matlab numeric scientific computing system has been developed which demonstrates some of the intentions of the MICE project. The MICE is designed and implemented in School of Computer, Lanzhou University. Now a prototype system of MICE has been implemented, which can Figure 7. WFL. support uniform operation and access through TCP/IP. MICE has been tested in local area network and The MBottle is charge for the strategy about wide-area environments. transmission of the small pieces of mathematical The MICE architecture itself is still being program tree. There are three strategies in our system: developed and plans to provide a better facility to use, sequence strategy, load balance strategy and mix meanwhile it will discover and utilize mathematical strategy. We made a CSP ring, which the sequence web services in an intelligent manner. The work has strategy used to schedule the small trees among CSPs. great potential to users of mathematical software and In this situation, the small trees will be sent one by one should be of interest to, and cross-over with, the Grid on this CSP ring. This way is simple but ignore the Computing and Semantic Web communities. Many load of the CSP and if the number of the CSPs become efforts are being made to support WSRF and GT4 in larger and larger the ring become bigger and bigger, it MICE. will cause the system to a low efficiency. The load balance strategy schedules the trees according to the Acknowledgement other CSPs' load, then choose a lower load CSP to send the messages, This will make the system resource have This work was supported by the National Natural a higher efficiency, but the overhead of evaluating the Science Foundation of China through project: load of CSP is much heavier. We advance the third 60473095 and by the Interdisciplinary Innovation strategy, which mix the two strategies mentioned Research Fund For Young Scholars, Lanzhou above. University through grant LZU200511.

4.3. UCS References

It provides registry and publication of CSPs and [1] I. Foster and C. Kesselman, The Grid Blueprint for a New

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply. Computing Infrastructure, Morgan Kaufmann Publishers, 1998. [2] M. Baker, R. Buyya, and D. Laforenza, The Grid: International Efforts in Global Computing. Proc. of International Conference on Advances in Infrastructure for Electronic Business, Science, and Education on the Internet, Rome, Italy, 2000. [3] Marc-Laurent Aird, Walter Barbera Medina and Julian Padget, MONET: service discovery and composition for mathematical problems, Cluster Computing and the Grid, 2003. Proceedings. CCGrid 2003. 3rd ISBN: 0-7695-1919-9, 2003. [4] Bruno Buchberger and Wolfgang Schreiner, CONCERT -- A Software Architecture for Coordinating Education Sessions in Distributed Environments, Technical Report 97-04, RISC-Linz, Johannes Kepler University, Linz, Austria, February 1997. [5] Technical University of Eindhoven, RIACA: OpenMath Library,http://www.riaca.win.tue.nl/products/openmath/lib/in dex.html, Febtuary 2003. [6] Paul S. Wang, The Internet Accessible Mathematical Computation Framework, Science in China Series F-Information Sciences, vol. 47, number 1, February 2004. [7] Simon Gray, Norbert Kajler and Paul Wang, MP: A Protocal for Efficient Exchange of Mathematical Expressions, Proceedings ISSAC, 1994. [8] O.Caprotti and D.Carlisle, OpenMath and MathML: semantic markup for mathematics. Crossroads Volume 6 , Issue 2, Winter 1999. [9] Andrew Solomon and Craig A. Struble, JavaMath: an API for internet accessible mathematical services, Fifth Asian Symposium om Computer Mathematics, 2001. [10] Li Liu, Jian Zhan and Lian Li. A Runtime Scheduling Approach with Respect to Job Parallelism for Computational Grid. GCC2004, LNCS 3251, 2004. [11] S. Dalmas, M. Gaetano and S. Watt, An openmath 1.0 implementation.In Proceedings of the 1997 international symposium on Symbolic and algebraic computation, ACM Press, 1997. [12] Weidong Liao, Dongdai Lin and Paul S. Wang, OMEI: an open mathematical engine interface, Proceedings, Fifth Asian Symposium on Computer Mathematics, 2001. [13] Paul Wang, Design and Protocol for Internet Accessible Mathematical Computation. In Sam Dooley, editor, ISSAC'99 International Symposium on Symbolic and Algebraic Computation, ACM, July 28-31, 1999. [14] Steve Linton and Andrew Solomon. GAP, OpenMath, and MCP. In Workshop on Internet Accessible Mathematical Computation at ISSAC'99, Vancouver, Canada, July 28-31, 1999. [15] Waterloo Maple, Maple 6, February 2001. [16] Wolfram Research, Mathematica 4.1, February 2001. [17] The MathWorks. MATLAB 6, February 2001.

Proceedings of the 2006 IEEE Asia-Pacific Conference on Services Computing (APSCC'06) 0-7695-2751-5/06 $20.00 © 2006

Authorized licensed use limited to: LanZhou University Trial User. Downloaded on September 26, 2009 at 05:02 from IEEE Xplore. Restrictions apply.