SlideShare a Scribd company logo
1 of 6
Download to read offline
RDF APIs using .NET Framework

                          SemWeb & dotNetRDF



Mazilu Liviu-Andrei
Pintilie Radu-Stefan
ISS2



       In the following we will compare two .NET Framework APIs for
working with RDF. The two are SemWeb and dotNetRDF.

       We will compare the two frameworks using the following criteria :
IDE integration, triple storage, SPARQL interogation support,
performance, level of documentation and licensing.

SemWeb
URI:http://razor.occams.info/code/semweb/
Author: Joshua Tauberer
Current version : 1.064 (11/05/2009)
License: GNU GPL v2

dotNetRDF
URI: http://www.dotnetrdf.org/
Author: Rob Vesse
Current version: Version 0.1.2 Alpha (27/11/2009)
License: GNU GPL




Why SemWeb and dotNetRDF?

        These two libraries were chosen because both were easy to
integrate in .NET framework. A simple reference to the dynamic libraries
provided in the download package will give the users full acces to the APIs
provided.
Triple Storage

     Both SemWeb and dotNetRDF use similar ways of storing triples.
SemWeb’s type for a RDF triple is defined as Statement, whyle
dotNetRDF uses a Triple type. Each node in a statement is defined by
both APIs as being either a literal or an entity although the types used
differ for each implementation.

SemWeb
    Entity computer = new
    Entity("http://example.org/computer");
    Entity description = new
    Entity("http://example.org/description");
    Entity says = "http://example.org/says";
    Entity wants = "http://example.org/wants";
    Statement assertion = new Statement(computer, says,
    new Literal("Hello world!"));
  Taken from [1]

dotNetRDF
    URINode dotNetRDF = CreateURINode(new
    Uri("http://www.dotnetrdf.org"));
    URINode says = CreateURINode(new
    Uri("http://example.org/says"));
    LiteralNode helloWorld = CreateLiteralNode("Hello
    World");
    LiteralNode bonjourMonde = CreateLiteralNode("Bonjour
    tout le Monde", "fr");
    new Triple(dotNetRDF, says, helloWorld);
    new Triple(dotNetRDF, says, bonjourMonde);
  Taken from [2]



       To store this triples SemWeb uses what they call a MemoryStore,
whyle dotNetRDF uses a Graph, thus the second one has more
resemblance.
SemWeb
  MemoryStore store = new MemoryStore();
  store.Add(new Statement(computer, says, (Literal)"Hello
  world!"));
  store.Add(new Statement(computer, wants, desire));
  store.Add(new Statement(desire, description,
  (Literal)"to be human"));
  store.Add(new Statement(desire, RDF+"type",
  (Entity)"http://example.org/Desire"));
  Taken from [1]

dotNetRDF
  Graph g = new Graph();
  g.Assert(new Triple(dotNetRDF, says, helloWorld));
  g.Assert(new Triple(dotNetRDF, says, bonjourMonde));
  foreach (Triple t in g.Triples) {
    Console.WriteLine(t.ToString());
  }


  Taken from [2]



          Both libraries provide various methods to read RDF from files and
URIs. The main difference is that while with SemWeb the user must select
the parser used for reading a certain file (e.g.: RDF/XML, N-Triples,
Turtle, or Notation 3) while dotNetRDF tries to chose the needed parser if
it isn’t specified manually.
         In order to test the performance of the parsers that the APIs
provide us we parsed a set of large files. We found some large RDF files at
http://chefmoz.org/rdf.html . The licesing of these files allowed us to
modify them, and so we did in order to obtain 3 large RDF files (10MB,
50MB, 100MB). We then used these files to benchmark the RDF/XML
parsers provided by SemWeb and dotNetRDF.
         Tests were run on an Intel®Core™2 Duo CPU T7300 @ 2.00 GHZ
and 2GB Memory(RAM).
         Three tests were run on each API, each test with one of the three
files obtained earlier. You can see the results in Table1 and Figure1.
(Results are displayed using hours:minutes:seconds.milliseconds format as
they are outputed by the internal StopWatch we used).
As you can see in benchmark it is clear that SemWeb has a way
much better implementation of the RDF parser, storage and memory
management. Actually as you can see on the benchmark when it comes to
parsing large RDF files SemWeb is as much as ten times faster than
dotNetRDF.We think that this happenes because of the MemoryStore it
uses that is a type of Sink.
        So we can state that SemWeb has a better performance that
dotNetRDF.

                      10MB                50MB                  100MB
SemWeb           00:00:00.8418498    00:00:04.5484593      00:00:10.7560606
dotNetRDF        00:00:06.6143484    00:00:47.5463143      FATAL ERROR
                          Table 1. Parsing times


   50
   45
   40
   35
   30
                                                                  10MB
   25
                                                                  50MB
   20
                                                                  100MB
   15
   10
    5
    0
                 SemWeb                   dotNetRDF

                 Figure 1. Parsing performance (seconds)


        We also need to mention the surprise we had when we run the
100MB file test on dotNetRDF API. We did expect to take a lot of time
due to the previous test results, but we did not expect to encounter a fatal
error : Unhandled Exception: OutOfMemoryException. This occurred as
the application filled all of the 1,5GB of memory left unused. (see Picture
1).
Picture 1. : dotNetRDF API is a memory hog.




        Besides the libraries own implementation for storing and parsing
RDF data they also use external means of storage.
        Using SemWeb you can back up your RDF data by either a MySql
server, SQL server, Sqlite and PostgreSQL.[3]
        dotNetRDF provides integration with Talis Platform and Virtuoso
Universal Server. Both provide native means of storing RDF data. More
references cand be found at [5] and [6].




SPARQL support

        Both libraries provide full SPARQL support.
        SemWeb uses a fork of Ryan Levering's SPARQL
implementation in Java converted to .Net [3]. This means it has full
SPARQL support with the option to translate SPARQL into SQL
whenever this is available.
        dotNetRDF has it’s own SPARQL implementation to use on local
data. In order to query remote data it uses SPARQL endpoints or other
SPARQL implementations. [4]
Code samples are provided by both authors and can be found at
[3] and [4] for further information.
        In our attempt to benchmark the SPARQL queries performance on
both APIs we weren’t able to query the 10MB file used earlier using the
dotNetRDF API, using a simple "SELECT * WHERE {?s ?p ?o}" . We
don’t know if that was because the nature of the RDF file, our
implementation (we had to load the Graph obtained from parsing the
RDF file into a TripleStore, which was very slow as it took about as much
time as parsing the file) or the SPARQL implementation, though the
queries seem to work fine on much smaller chunks of RDF data.



Level of documentation

         Both libraries are very well documented. Both homepages contain
link to demos, tutorials, “hello world” examples and implementation
issues, although dotNetRDF has a smal edge over SemWeb when it comes
to how the information is organized.
         A downfall of dotNetRDF is that it doesn’t provide any source
code, so we can’t have an insight on the implementation.

Conclusion

        Both SemWeb and dotNetRDF provide good support in working
with RDF data.
        Still if you would have to choose between the two, SemWeb is the
way to go. It is a more mature and complete implementation and it
provides better support for both triple storage and SPARQL interogations.
Of course this would be expected as SemWeb has over 4 years of
development while dotNetRDF has only 3 months since it’s first release,
hence we think dotNetRDF has a great potential of becoming a reliable
option for working with RDF under .NET Framework.

References

[1]:http://razor.occams.info/code/semweb/semweb-current/doc/helloworld.html
[2]:http://www.dotnetrdf.org/content.asp?pageID=Hello%20World
[3]:http://razor.occams.info/code/semweb/
[4]:http://www.dotnetrdf.org/content.asp?pageID=Querying%20with%20SPARQL
[5]:http://www.dotnetrdf.org/content.asp?pageID=Using%20the%20Talis%20Platform
[6]:http://www.dotnetrdf.org/content.asp?pageID=Using%20Virtuoso%20Universal%20Server

More Related Content

What's hot

Apache Flink Stream Processing
Apache Flink Stream ProcessingApache Flink Stream Processing
Apache Flink Stream ProcessingSuneel Marthi
 
JRuby with Java Code in Data Processing World
JRuby with Java Code in Data Processing WorldJRuby with Java Code in Data Processing World
JRuby with Java Code in Data Processing WorldSATOSHI TAGOMORI
 
Introducing JDBC for SPARQL
Introducing JDBC for SPARQLIntroducing JDBC for SPARQL
Introducing JDBC for SPARQLRob Vesse
 
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...Data Con LA
 
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!MongoDB
 
Fluentd - road to v1 -
Fluentd - road to v1 -Fluentd - road to v1 -
Fluentd - road to v1 -N Masahiro
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to gitolberger
 
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Ahmed El-Arabawy
 
Dynamic Hadoop Clusters
Dynamic Hadoop ClustersDynamic Hadoop Clusters
Dynamic Hadoop ClustersSteve Loughran
 
How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?Hiroshi SHIBATA
 
20140419 oedo rubykaigi04
20140419 oedo rubykaigi0420140419 oedo rubykaigi04
20140419 oedo rubykaigi04Hiroshi SHIBATA
 
[231] the simplicity of cluster apps with circuit
[231] the simplicity of cluster apps with circuit[231] the simplicity of cluster apps with circuit
[231] the simplicity of cluster apps with circuitNAVER D2
 
20140425 ruby conftaiwan2014
20140425 ruby conftaiwan201420140425 ruby conftaiwan2014
20140425 ruby conftaiwan2014Hiroshi SHIBATA
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensCitus Data
 

What's hot (20)

Python at Facebook
Python at FacebookPython at Facebook
Python at Facebook
 
Apache Flink Stream Processing
Apache Flink Stream ProcessingApache Flink Stream Processing
Apache Flink Stream Processing
 
JRuby with Java Code in Data Processing World
JRuby with Java Code in Data Processing WorldJRuby with Java Code in Data Processing World
JRuby with Java Code in Data Processing World
 
Swoole Love PHP
Swoole Love PHPSwoole Love PHP
Swoole Love PHP
 
Docker.io
Docker.ioDocker.io
Docker.io
 
Introducing JDBC for SPARQL
Introducing JDBC for SPARQLIntroducing JDBC for SPARQL
Introducing JDBC for SPARQL
 
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
Big Data Day LA 2016/ Big Data Track - Fluentd and Embulk: Collect More Data,...
 
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
MongoDB World 2019: Becoming an Ops Manager Backup Superhero!
 
Fluentd - road to v1 -
Fluentd - road to v1 -Fluentd - road to v1 -
Fluentd - road to v1 -
 
An introduction to git
An introduction to gitAn introduction to git
An introduction to git
 
Getting modern with my sql
Getting modern with my sqlGetting modern with my sql
Getting modern with my sql
 
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
Embedded Systems: Lecture 12: Introduction to Git & GitHub (Part 3)
 
Dynamic Hadoop Clusters
Dynamic Hadoop ClustersDynamic Hadoop Clusters
Dynamic Hadoop Clusters
 
How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?
 
20140419 oedo rubykaigi04
20140419 oedo rubykaigi0420140419 oedo rubykaigi04
20140419 oedo rubykaigi04
 
[231] the simplicity of cluster apps with circuit
[231] the simplicity of cluster apps with circuit[231] the simplicity of cluster apps with circuit
[231] the simplicity of cluster apps with circuit
 
Three Ruby usages
Three Ruby usagesThree Ruby usages
Three Ruby usages
 
20140425 ruby conftaiwan2014
20140425 ruby conftaiwan201420140425 ruby conftaiwan2014
20140425 ruby conftaiwan2014
 
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig KerstiensWhats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
Whats wrong with postgres | PGConf EU 2019 | Craig Kerstiens
 
Cloning 2
Cloning 2Cloning 2
Cloning 2
 

Viewers also liked

Public Transportation Path Finder
Public Transportation Path FinderPublic Transportation Path Finder
Public Transportation Path Findervchircu
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010vchircu
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperRob Vesse
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperRob Vesse
 
CouchDB JP & BigCouch
CouchDB JP & BigCouchCouchDB JP & BigCouch
CouchDB JP & BigCouchYohei Sasaki
 
Development in chhattisgarh
Development in chhattisgarhDevelopment in chhattisgarh
Development in chhattisgarhakshita sharma
 
Creesenlascasualidades
CreesenlascasualidadesCreesenlascasualidades
Creesenlascasualidadeschucho sanga
 
Ponderacion de materias_madrid_2011-2012
Ponderacion de materias_madrid_2011-2012Ponderacion de materias_madrid_2011-2012
Ponderacion de materias_madrid_2011-2012Cristina Orientacion
 
Stop Ego. Start Xtra. - Die Gewinner.
Stop Ego. Start Xtra. - Die Gewinner.Stop Ego. Start Xtra. - Die Gewinner.
Stop Ego. Start Xtra. - Die Gewinner.StartXtra
 
Parapersonasespeciales
ParapersonasespecialesParapersonasespeciales
Parapersonasespecialeschucho sanga
 

Viewers also liked (20)

Introduction to dotNetRDF
Introduction to dotNetRDFIntroduction to dotNetRDF
Introduction to dotNetRDF
 
Public Transportation Path Finder
Public Transportation Path FinderPublic Transportation Path Finder
Public Transportation Path Finder
 
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web Developer
 
Everyday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web DeveloperEveryday Tools for the Semantic Web Developer
Everyday Tools for the Semantic Web Developer
 
CouchDB JP & BigCouch
CouchDB JP & BigCouchCouchDB JP & BigCouch
CouchDB JP & BigCouch
 
Presentation
PresentationPresentation
Presentation
 
Belleza Nocturna
Belleza NocturnaBelleza Nocturna
Belleza Nocturna
 
El clic
El clicEl clic
El clic
 
Cultura
CulturaCultura
Cultura
 
Munchen 2014
Munchen 2014Munchen 2014
Munchen 2014
 
Buenamigo(Music)
Buenamigo(Music)Buenamigo(Music)
Buenamigo(Music)
 
Abrazodeoso
AbrazodeosoAbrazodeoso
Abrazodeoso
 
Development in chhattisgarh
Development in chhattisgarhDevelopment in chhattisgarh
Development in chhattisgarh
 
Creesenlascasualidades
CreesenlascasualidadesCreesenlascasualidades
Creesenlascasualidades
 
Geohumanities ewvrt @ dhd2014
Geohumanities ewvrt @ dhd2014Geohumanities ewvrt @ dhd2014
Geohumanities ewvrt @ dhd2014
 
Ponderacion de materias_madrid_2011-2012
Ponderacion de materias_madrid_2011-2012Ponderacion de materias_madrid_2011-2012
Ponderacion de materias_madrid_2011-2012
 
Ortega Y Gasset
Ortega Y GassetOrtega Y Gasset
Ortega Y Gasset
 
Stop Ego. Start Xtra. - Die Gewinner.
Stop Ego. Start Xtra. - Die Gewinner.Stop Ego. Start Xtra. - Die Gewinner.
Stop Ego. Start Xtra. - Die Gewinner.
 
Parapersonasespeciales
ParapersonasespecialesParapersonasespeciales
Parapersonasespeciales
 

Similar to .NET RDF APIS

User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network ProcessingRyousei Takano
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2markleeuw
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Bhupesh Bansal
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop User Group
 
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...In-Memory Computing Summit
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails FinalRobert Postill
 
[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf
[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf
[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdfMukundThakur22
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking systemJesse Vincent
 
Ruby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby MeRuby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby MePanagiotis Papadopoulos
 
Multi-threaded web crawler in Ruby
Multi-threaded web crawler in RubyMulti-threaded web crawler in Ruby
Multi-threaded web crawler in RubyPolcode
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Servicesroyans
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Servicesroyans
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the restgeorge.james
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and SchedulingAmazon Web Services
 

Similar to .NET RDF APIS (20)

First Day With J Ruby
First Day With J RubyFirst Day With J Ruby
First Day With J Ruby
 
Ruby openfest
Ruby openfestRuby openfest
Ruby openfest
 
.NET RDF APIs
.NET RDF APIs.NET RDF APIs
.NET RDF APIs
 
User-space Network Processing
User-space Network ProcessingUser-space Network Processing
User-space Network Processing
 
ODF Mashups
ODF MashupsODF Mashups
ODF Mashups
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2
 
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
Voldemort & Hadoop @ Linkedin, Hadoop User Group Jan 2010
 
Hadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedInHadoop and Voldemort @ LinkedIn
Hadoop and Voldemort @ LinkedIn
 
Concurrency in ruby
Concurrency in rubyConcurrency in ruby
Concurrency in ruby
 
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
IMCSummit 2015 - Day 2 IT Business Track - 4 Myths about In-Memory Databases ...
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf
[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf
[ACNA2022] Hadoop Vectored IO_ your data just got faster!.pdf
 
SD, a P2P bug tracking system
SD, a P2P bug tracking systemSD, a P2P bug tracking system
SD, a P2P bug tracking system
 
Ruby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby MeRuby On Google App Engine 2nd Athens Ruby Me
Ruby On Google App Engine 2nd Athens Ruby Me
 
Multi-threaded web crawler in Ruby
Multi-threaded web crawler in RubyMulti-threaded web crawler in Ruby
Multi-threaded web crawler in Ruby
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
 
Flickr Services
Flickr ServicesFlickr Services
Flickr Services
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
Scaling PHP apps
Scaling PHP appsScaling PHP apps
Scaling PHP apps
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

.NET RDF APIS

  • 1. RDF APIs using .NET Framework SemWeb & dotNetRDF Mazilu Liviu-Andrei Pintilie Radu-Stefan ISS2 In the following we will compare two .NET Framework APIs for working with RDF. The two are SemWeb and dotNetRDF. We will compare the two frameworks using the following criteria : IDE integration, triple storage, SPARQL interogation support, performance, level of documentation and licensing. SemWeb URI:http://razor.occams.info/code/semweb/ Author: Joshua Tauberer Current version : 1.064 (11/05/2009) License: GNU GPL v2 dotNetRDF URI: http://www.dotnetrdf.org/ Author: Rob Vesse Current version: Version 0.1.2 Alpha (27/11/2009) License: GNU GPL Why SemWeb and dotNetRDF? These two libraries were chosen because both were easy to integrate in .NET framework. A simple reference to the dynamic libraries provided in the download package will give the users full acces to the APIs provided.
  • 2. Triple Storage Both SemWeb and dotNetRDF use similar ways of storing triples. SemWeb’s type for a RDF triple is defined as Statement, whyle dotNetRDF uses a Triple type. Each node in a statement is defined by both APIs as being either a literal or an entity although the types used differ for each implementation. SemWeb Entity computer = new Entity("http://example.org/computer"); Entity description = new Entity("http://example.org/description"); Entity says = "http://example.org/says"; Entity wants = "http://example.org/wants"; Statement assertion = new Statement(computer, says, new Literal("Hello world!")); Taken from [1] dotNetRDF URINode dotNetRDF = CreateURINode(new Uri("http://www.dotnetrdf.org")); URINode says = CreateURINode(new Uri("http://example.org/says")); LiteralNode helloWorld = CreateLiteralNode("Hello World"); LiteralNode bonjourMonde = CreateLiteralNode("Bonjour tout le Monde", "fr"); new Triple(dotNetRDF, says, helloWorld); new Triple(dotNetRDF, says, bonjourMonde); Taken from [2] To store this triples SemWeb uses what they call a MemoryStore, whyle dotNetRDF uses a Graph, thus the second one has more resemblance.
  • 3. SemWeb MemoryStore store = new MemoryStore(); store.Add(new Statement(computer, says, (Literal)"Hello world!")); store.Add(new Statement(computer, wants, desire)); store.Add(new Statement(desire, description, (Literal)"to be human")); store.Add(new Statement(desire, RDF+"type", (Entity)"http://example.org/Desire")); Taken from [1] dotNetRDF Graph g = new Graph(); g.Assert(new Triple(dotNetRDF, says, helloWorld)); g.Assert(new Triple(dotNetRDF, says, bonjourMonde)); foreach (Triple t in g.Triples) { Console.WriteLine(t.ToString()); } Taken from [2] Both libraries provide various methods to read RDF from files and URIs. The main difference is that while with SemWeb the user must select the parser used for reading a certain file (e.g.: RDF/XML, N-Triples, Turtle, or Notation 3) while dotNetRDF tries to chose the needed parser if it isn’t specified manually. In order to test the performance of the parsers that the APIs provide us we parsed a set of large files. We found some large RDF files at http://chefmoz.org/rdf.html . The licesing of these files allowed us to modify them, and so we did in order to obtain 3 large RDF files (10MB, 50MB, 100MB). We then used these files to benchmark the RDF/XML parsers provided by SemWeb and dotNetRDF. Tests were run on an Intel®Core™2 Duo CPU T7300 @ 2.00 GHZ and 2GB Memory(RAM). Three tests were run on each API, each test with one of the three files obtained earlier. You can see the results in Table1 and Figure1. (Results are displayed using hours:minutes:seconds.milliseconds format as they are outputed by the internal StopWatch we used).
  • 4. As you can see in benchmark it is clear that SemWeb has a way much better implementation of the RDF parser, storage and memory management. Actually as you can see on the benchmark when it comes to parsing large RDF files SemWeb is as much as ten times faster than dotNetRDF.We think that this happenes because of the MemoryStore it uses that is a type of Sink. So we can state that SemWeb has a better performance that dotNetRDF. 10MB 50MB 100MB SemWeb 00:00:00.8418498 00:00:04.5484593 00:00:10.7560606 dotNetRDF 00:00:06.6143484 00:00:47.5463143 FATAL ERROR Table 1. Parsing times 50 45 40 35 30 10MB 25 50MB 20 100MB 15 10 5 0 SemWeb dotNetRDF Figure 1. Parsing performance (seconds) We also need to mention the surprise we had when we run the 100MB file test on dotNetRDF API. We did expect to take a lot of time due to the previous test results, but we did not expect to encounter a fatal error : Unhandled Exception: OutOfMemoryException. This occurred as the application filled all of the 1,5GB of memory left unused. (see Picture 1).
  • 5. Picture 1. : dotNetRDF API is a memory hog. Besides the libraries own implementation for storing and parsing RDF data they also use external means of storage. Using SemWeb you can back up your RDF data by either a MySql server, SQL server, Sqlite and PostgreSQL.[3] dotNetRDF provides integration with Talis Platform and Virtuoso Universal Server. Both provide native means of storing RDF data. More references cand be found at [5] and [6]. SPARQL support Both libraries provide full SPARQL support. SemWeb uses a fork of Ryan Levering's SPARQL implementation in Java converted to .Net [3]. This means it has full SPARQL support with the option to translate SPARQL into SQL whenever this is available. dotNetRDF has it’s own SPARQL implementation to use on local data. In order to query remote data it uses SPARQL endpoints or other SPARQL implementations. [4]
  • 6. Code samples are provided by both authors and can be found at [3] and [4] for further information. In our attempt to benchmark the SPARQL queries performance on both APIs we weren’t able to query the 10MB file used earlier using the dotNetRDF API, using a simple "SELECT * WHERE {?s ?p ?o}" . We don’t know if that was because the nature of the RDF file, our implementation (we had to load the Graph obtained from parsing the RDF file into a TripleStore, which was very slow as it took about as much time as parsing the file) or the SPARQL implementation, though the queries seem to work fine on much smaller chunks of RDF data. Level of documentation Both libraries are very well documented. Both homepages contain link to demos, tutorials, “hello world” examples and implementation issues, although dotNetRDF has a smal edge over SemWeb when it comes to how the information is organized. A downfall of dotNetRDF is that it doesn’t provide any source code, so we can’t have an insight on the implementation. Conclusion Both SemWeb and dotNetRDF provide good support in working with RDF data. Still if you would have to choose between the two, SemWeb is the way to go. It is a more mature and complete implementation and it provides better support for both triple storage and SPARQL interogations. Of course this would be expected as SemWeb has over 4 years of development while dotNetRDF has only 3 months since it’s first release, hence we think dotNetRDF has a great potential of becoming a reliable option for working with RDF under .NET Framework. References [1]:http://razor.occams.info/code/semweb/semweb-current/doc/helloworld.html [2]:http://www.dotnetrdf.org/content.asp?pageID=Hello%20World [3]:http://razor.occams.info/code/semweb/ [4]:http://www.dotnetrdf.org/content.asp?pageID=Querying%20with%20SPARQL [5]:http://www.dotnetrdf.org/content.asp?pageID=Using%20the%20Talis%20Platform [6]:http://www.dotnetrdf.org/content.asp?pageID=Using%20Virtuoso%20Universal%20Server