2015 7th International Conference on Information Technology and Electrical Engineering (ICITEE), Chiang Mai, Thailand
Querying Ontology Through HTTP Protocol to Bridge Interoperability and Platform Difference Sri Suning Kusumawardani, Robertus Sonny Prakoso, Paulus Insap Santosa Department of Electrical Engineering and Information Technology Faculty of Engineering, Universitas Gadjah Mada Yogyakarta, Indonesia
[email protected],
[email protected],
[email protected]
Abstract—Ontology is one of semantic web implementation and knowledge representation that can be implemented and consumed by any kind of application. Therefore, it will face the interoperability issue, as there are lots of application platform nowadays, and developers can’t restrict usage of ontology only in the application with same platform. As ontology is part of semantic web, the most suitable method to solve the interoperability issue is using web environment. One of solution that can be used is serving ontology through HTTP protocol and accessing the ontology by S PARQL. This paper expl ain one alternative of S PARQL implementation over HTTP protocol by using S PARQL endpoint to store and serve the ontology.
Language) to retrieve and update information in ontology. By building SPARQL endpoint based on the ontology, applications could retrieve and update information in ontology using SPARQL by HTTP protocol, just like web service. Th is will provide common way for every application to access the ontology, regardless of platforms that the application based on. This research use learning style and content recommendation ontology that will be implemented in Moodlebased e-Learning [2]. Platform used for build ontology and Moodle-based e-Learning are different, hence there are some mechanism needed to bridge the platform difference. Also, there are some works that adapt and extend Moodle-based eLearning to the mobile device [3] [4]. Therefore, mechanism for handling interoperability is likely needed.
Keywords—ontology; interoperability; query; semantic web
I. INT RODUCT ION
II. QUERYING ONT OLOGY THROUGH HTTP
Interoperability is now being one of important issue in information and communication technology. Variety of devices and gadgets brings variety of technology used on each of them, and gives impact on application that run on top of them. From web to native client, desktop to mobile device, there are various platforms that used by applications. Thus, if some applications with different platforms need to access same resource, they need to access the resource in same way, regardless of platform they used.
A. Basic Concept SPARQL has ability to perform query to RDF graph using HTTP protocol. With this ability, users or applications could perform searching query to a RDF document, as well as perform update query. This will allow users or applications perform SPARQL query using basic HTTP methods as explained below [5]. 1) GET: usually used for basic search SPARQL query by returning RDF payload from the RDF document that match criteria.
There are many kinds of resource consumed by application. One of these resource is ontology. Ontology is a kind of knowledge representation that capture consensual knowledge by general and standard method, in order to make the knowledge reusable by any kinds of applications [1]. Then, any applications should be able to use the ontology in a common way.
2) POST: usually used for insert some new data to the RDF document. 3) PUT: usually used for update some existing data in the RDF document.
Most of ontology development and deployment tools are built under Java environment. If the ontology were consumed by Java applications, the applications can directly consume the ontology as they built under same platform. But there are lots of application that built under different platform and environment e.g. .NET for desktop and mobile application and PHP for website or web applications. These applications can’t directly communicate with the ontology due to different methods and standards used.
4) DELETE: usually used for deleting whole RDF document. B. Implementation Jena, framework for developing semantic web [6] has implementation on SPARQL over HTTP. Fuseki, SPARQL endpoint based on Jena, brings the ability of performing SPARQL query [7]. Fuseki acts as SPARQL server that provide ability to perform SPARQL query in REST-style. There are some service available in Fuseki as detailed below.
This research focus on creating common way to access ontology for every applications. We used a query language for semantic data represented in RDF (Resource Description Framework) called SPARQL (Simple Protocol and RDF Query
978-1-4673-7863-5/15/$31.00 ©2015 IEEE
1) Perform basic search query using SPARQL.
126
2015 7th International Conference on Information Technology and Electrical Engineering (ICITEE), Chiang Mai, Thailand
exported to new ontology, and SPARQL query must be performed on the new ontology.
2) Perform update query using SPARQL Update 3) Directly upload file to Fuseki.
IV. IMPLEMENT AT ION IN THE W EB
4) Managing multiple RDF graph. III. ONT OLOGY DEVELOPMENT The ontology for content recommendation inside eLearning is developed using Protégé. It consists of some main component of ontology i.e. class, relation (object property and data property), function, attribute, and instance [1]. The ontology contains some information needed for giving content recommendation based on learning style i.e. student information, learning style category, learning style questionnaire, and related course and module information in Moodle [2]. This ontology is represented in Web Ontology Language (OWL), a standardized language for semantic web based on RDF [8]. This will be implemented in engineering education environment, alongside with previous ontology research for final assessment in engineering education [9]. To complete the definition of ontology, there are some rules that added to it. Rules that added to the ontology are rules for classifying student to its learning style and rules for giving content recommendation based on learning style. We use reasoner for performing reasoning and inference information based on the rules. Thus, information resulted from the rules are automatically generated and inferred, instead of man ually defined by user.
On the ontology side, there are SPARQL server that handle communication between ontology and the applications. The ontology itself is stored in a persistent storage to maintain its availability and consistency across the related applications. In this research, this scenario achieved by using Fuseki as SPARQL server. For the storage, we choose to use persistent storage in Fuseki, as it has built-in storage called TDB to store the ontology in RDF [10] [11]. On the application side, there are another server that host the website and service used for Moodle-based e-Learning. There are also database that store all data and information related with the e-Learning. The server and database are located in completely different environment with the SPARQL server and storage used for the ontology. Platform difference between e-Learning and ontology, which used Fuseki that built on top of Java environment, makes both side couldn’t directly communicate using codes or scripts.
After ontology was completely defined, mechanism for obtaining information from the ontology is also considered. We choose to use SPARQL to query information from the ontology, as it is the standardized query language for RDF [8]. SPARQL can be used for performing search query from the ontology. However, we find that SPARQL can’t directly get information from the reasoner. To enable querying information from the reasoner, the inferred ontology from reasoner must be Ontology Storage
A. Main Scenario This is implementation scenario of ontology to the application using HTTP protocol. We take example of implementing ontology to Moodle-based e-Learning website that built on top of PHP environment. Nevertheless, the scenario will be similar for other implementation in different platform.
To communicate both side, the servers use SPARQL query through HTTP protocols as shown on Fig. 1. The e-Learning server sends SPARQL query to search some desired information in the ontology e.g. recommended learning content for the particular student. SPARQL server then replies with the information from the ontology in RDF format or another format that usually used for data exchange over HTTP e.g.
SPARQL Server
E-Learning Server
Communication using SPARQL query through HTTP protocols
E-Learning Development Tools
Ontology Development Tools Fig. 1. Scenario for ontology implementation over HTTP protocol
127
E-Learning Database
2015 7th International Conference on Information Technology and Electrical Engineering (ICITEE), Chiang Mai, Thailand
Incoming Query
Reasoner Query Response Ontology Storage
Inferred Ontology Model
Ontology Model from Storage
SPARQL Server
Fig. 2. Reasoning process in ontology server
XML or JSON. The e-Learning server can also send SPARQL query to insert new data, update existing data, or deleting data in the ontology. SPARQL server then performs the update query to the ontology and sends back the update status, success or failed, to the e-Learning server. B. SPARQL Server Configuration Fuseki has two configuration for storing ontology, either in memory or in persistent database. As mentioned above, we choose to store ontology in persistent storage. As Fuseki already has built-in RDF storage, we don’t need to create separated database or data storage to handle this. To populate the storage with initial data and structure already created in the ontology using Protégé, the ontology must be loaded to the storage by uploading the OWL file to the storage. Because our ontology has some rules, the SPARQL server environment should be able to perform reasoning and inference data. In ontology development, this can be done using reasoner. The same tools is also used in the SPARQL server. Fuseki can be configured to use reasoner and automatically perform reasoning and inference data. Thus, SPARQL server will perform query execution to inferred ontology model from the result of reasoner execution, not the original ontology model stored in file storage. Fuseki has built-in reasoner that derives from Jena framework, but it can also use another reasoner such as Pellet, reasoner used on the ontology development process using Protégé. We choose to use Pellet reasoner in order to ensure the result of reasoner in Fuseki will always same as result of reasoner in Protégé.
V. RESULT A. Search Query Search query in Fuseki is called by GET request and put the SPARQL query as the parameter. For testing the search query in Fuseki, given some search query based on certain condition. For example, we have some student with student ID 1, 2, etc. We also have some learning material in Moodle called module, and each module also has module ID. We can construct SPARQL query to ask if a module with particular ID is recommended for a student with particular ID with query below. ASK WHERE { ?student rdf:type elearning:Student. ?student elearning:studentId "1"^^xsd:int. ?module rdf:type elearning:Module. ?module elearning:moduleID "13"^^xsd:int. ?module elearning:recommendedFor ?student. }
This query will return “yes” if the module if recommended for the student, and “no” if the module is not recommended for the student. Application can also request this return value as XML or JSON, which will return Boolean value “true” if the module if recommended for the student, and “false” if the module is not recommended for the student. According to information in the ontology, module with ID 13 has some characteristics that is not appropriate with learning style that student with ID 1 has. Then, this query returns “no”/”false”. If student ID is changed to 2, the query returns “yes”/”true”, because characteristics of module with ID 13 is appropriate with learning style that student with ID 2 has. This results is deduced by infer some rules for giving content recommendation to student [2]. Therefore, by ensuring that the results of this query is correct, it implies that the inference and reasoning performed by reasoned is also working well.
Fig. 2 shown process flow of reasoner process in Fuseki. Fuseki will automatically generate ontology model based on data in the storage. If Fuseki is configured to use reasoner, a new ontology model is generated from the result of inference from the original model from storage by reasoner. This inferred ontology model is used by SPARQL server as the model for any query came to the server. Every search query came to the SPARQL server gives result of desired information from the inferred ontology model. However, update query came to SPARQL server still results in updated information in the original ontology model.
Another kind of query that usually used is select query, which will directly return part of the ontology that appropriate to the desired criteria. Example for this kind of query will be explained above, while selecting all student data in the ontology.
128
2015 7th International Conference on Information Technology and Electrical Engineering (ICITEE), Chiang Mai, Thailand
way to serve semantic information to be consumed by many application.
B. Update Query Update query in Fuseki is called by POST request and put the SPARQL query as the body. For testing the update query in Fuseki, given some update query based on certain condition. For example, we have new student with particular ID and name. We can construct SPARQL update query to insert the student data with query below.
The next work we could do is implementing SPARQL query over HTTP protocol in web and application, starts with implementation in Moodle-based e-learning website. There is speed and performance comparison needed to perform between this method and other implementation of ontology over web protocol. There is also some improvement that could be done to the Fuseki in order to improve the speed and performance of the query processing. There also might be another future research about implementation of ontology in web service to fully implement semantic web service in web service environment such as RESTful web service.
INSERT DATA { elearning:student_5 rdf:type elearning:Student. elearning:student_5 elearning:studentId "5"^^xsd:int. elearning:student_5 elearning:studentName "student"^^xsd:string. }
A CKNOWLEDGMENT This work was supported in part by Semantic Web and Ontology Research Group (SWORG UGM).
This query will return information of the update process whether success or failure. The new data is directly added to the ontology storage, not the inference model of the ontology. Therefore, the data is being persistent, like any other data that is already stored in the storage. Once data is successfully saved, this data can be subjected to any search query, even query that the result is deduced by inference.
REFERENCES [1] A. Gomez-Perez, M. Fernandez-Lopez and M. Corcho, Ontological Engineering: with examples from the areas of knowledge management, ecommerce and the semantic web, London: Springer-Verlag, 2004. [2] S. S. Kusumawardani, R. S. Prakoso and P. I. Santosa, "Using Ontology for Providing Content Recommendation Based on Learning Styles inside E-learning," in Second International Conference on Artificial Intelligence, Modelling and Simulation, Madrid, 2014.
This mechanism is useful when application need to add new data or updating existing data based on user input, application process, or another reason. As application can’t reach the ontology directly, sending update query through Fuseki is one of the alternative. Application also can use this update query to save back some result from search query that can’t be directly saved to the ontology, such as counting number of student or counting number of correct answer.
[3] B. Cheung, B. Stewart and R. McGreal, "Going Mobile with MOODLE: First steps," in IADIS International Conference Mobile Learning, Dublin, 2006. [4] M. J. C. Guerrero, M. A. Forment, M. A. C. Gonzalez and F. J. G. Penalvo, "SOA Initiatives for eLearning: A Moodle Case," in International Conference on Advanced Information Networking and Applications Workshops, Bradford, 2009.
In this case, execution of the query returns success information. For further checking, another search query is performed to get all students data. The result of this query shows that new student data is already included in student list, then the update query is working well and successfully. The query for getting all students list is shown below.
[5] C. Ogbuji, "SPARQL 1.1 Graph Store HTTP Protocol," 21 March 2013. [Online]. Available: http://www.w3.org/TR/2013/REC-sparql11-http-rdfupdate-20130321/. [Accessed 11 July 2015]. [6] I. Diaconescu, S. Lukichev and A. Giurca, "Semantic Web and Rule Reasoning Inside of E-Learning System," in International Symposium on Intelligent and Distributed Computing, Craiova, 2007.
SELECT DISTINCT ?student WHERE { ?student rdf:type elearning:Student. }
[7] T he Apache Software Foundation, "Fuseki: serving RDF data over HT T P," [Online]. Available: http://jena.apache.org/documentation/serving_data/. [Accessed 12 July 2015].
VI. CONCLUSION AND FUT URE W ORKS
[8] T . Segaran, C. Evans and J. T aylor, Programming the Semantic Web, Sebastopol: O'Reilly, 2009.
SPARQL query through HTTP protocol can be utilized for bridging interoperability issue in semantic web implementation. SPARQL query can be used for searching and updating data from the ontology by the application. Using REST-like method for performing query makes any kind of application can use this method.
[9] S. S. Kusumawardani, L. E. Nugroho, A. Susanto, A. Kumara, H. S. Wasisto and U. Cortes, "Ontology development of semantic e-learning for final project course," Advanced Science Letters, vol. 21, no. 1, pp. 46-51, 2015. [10] T he Apache Software Foundation, "T DB," [Online]. Available: https://jena.apache.org/documentation/tdb/index.html. [Accessed 13 July 2015].
Jena Fuseki makes the implementation of SPARQL query over HTTP protocol is easier. Ability to use reasoner in Fuseki makes the reasoning and inference process could be done in the Fuseki server. Fuseki also can be configured to give result in XML or JSON format, which is more general and lots of application can consume it. This implementation is a simple
[11] M. G. Skjæveland, M. Giese, D. Hovland, E. H. Lian and A. Waaler, "Engineering ontology-based access to real-world data sources," Web Semantics: Science, Services and Agents on the World Wide Web, 2015.
129