jruby topic maps

19
JRuby Topic Maps Arnim Bleier, Benjamin Bock, Uta Schulze and Lutz Maicher {bleier, bock, uta.schulze, maicher} @informa:k.unileipzig.de topicmapslab.de Fi>h Interna@onal Conference on Topic Maps Research and Applica@ons Talks@TMRA Leipzig, 20091311 Agenda: Java, Ruby and Topic Maps (Re)using Exis@ng Code Scalability and Performance

Upload: tmra

Post on 16-Apr-2017

911 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: JRuby Topic Maps

JRuby  Topic  Maps  Arnim  Bleier,  Benjamin  Bock,    

Uta  Schulze  and  Lutz  Maicher  

{bleier,  bock,  uta.schulze,  maicher}  

@informa:k.uni-­‐leipzig.de  

topicmapslab.de  

Fi>h  Interna@onal  Conference  on    Topic  Maps  Research  and  Applica@ons  Talks@TMRA  Leipzig,  2009-­‐13-­‐11  

Agenda:  

•   Java,  Ruby  and  Topic  Maps  

• (Re)using  Exis@ng  Code  •   Scalability  and  Performance  

Page 2: JRuby Topic Maps

topicmapslab.de  

Introduc@on  

The  Seman@c  Web  is  about  Integra@on  of  Data.  

Java  and  Ruby  equally  have  something  to  offer.  

Why  not  combine  them  and  get  the  best  of  booth  languages?    

Page 3: JRuby Topic Maps

topicmapslab.de  

What  has  Java  to  offer?  

high  performance  

easy  hos@ng  

mul@ple,  fast  TMAPI  Implementa@ons  

reuse  of  exis@ng  Very  Good  Code  

Page 4: JRuby Topic Maps

topicmapslab.de  

…and  What  is  Ruby  for?  

crea@ng  Domain  Specific  Languages  

rapid  Prototyping    

rapid    Web  Development  

rapid  Applica@on  Development  

Page 5: JRuby Topic Maps

topicmapslab.de  

Bringing  booth  together  

So>ware  and  its  development  needs  to  be  integrated,  too.  

Page 6: JRuby Topic Maps

topicmapslab.de  

Goals  of  JRTM  

•   Keeping  the  TMAPI  contract  intact  

•   Suppor@ng  different  engines  in  parallel  •   Each  TMQL  axis  as  one  method  call  

•   A  single  IO  interface  •   Maintaining  the  syntax  from  RTM  

•   Performance  

Page 7: JRuby Topic Maps

topicmapslab.de  

So  …  let’s  connect  

tms = RTM.connect! :implementation => :TINYTIM "

Page 8: JRuby Topic Maps

topicmapslab.de  

So  …  let’s  connect  

tms = RTM.connect (:implementation => :ONTOPIA, "

! ! ! ! ! ! :backend! => :RDBMS,"

! ! ! ! ! ! :properties => “path/to/jdbc.props”) "

Page 9: JRuby Topic Maps

topicmapslab.de  

and  create  a  Topic  

tms = RTM.connect "

tm = tms.create http://example.com/tm/ "

locator = tm.createLocator “http://ex.com/Thing” "

topic = tm.createTopicByItemIdentifier locator "

Page 10: JRuby Topic Maps

topicmapslab.de  

and  create  a  Topic  

tms = RTM.connect "

tm = tms.create “http://example.com/tm/” "

topic = tm.get! “ii:http://ex.com/Thing” "

Topic  Reference:  

subject  iden@fier:   nothing  or  “si:”  

subject  locator:       “=”  or    “sl:”        

item  iden@fier:       “^”  or    “ii:”  

Page 11: JRuby Topic Maps

topicmapslab.de  

and  create  a  Topic  

tms = RTM.connect "

tm = tms.create “http://example.com/tm/” "

topic = tm.get! “^http://ex.com/Thing” "

Topic  Reference:  

subject  iden@fier:   nothing  or  “si:”  

subject  locator:       “=”  or    “sl:”        

item  iden@fier:       “^”  or    “ii:”  

Page 12: JRuby Topic Maps

topicmapslab.de  

Hash  Access  

topic[“-nickname @office”] = “Lutz” "

topic[“email”] = “[email protected]” "

university_of_leipzig = association[“employer”]

Topics[“type  @scope1,  scope2”]  

-Names  are  prefixed  with  “-”        Occurrences  are  not  prefixed  

Associa9ons[“type  @scope1”]  

   Roles  

Page 13: JRuby Topic Maps

topicmapslab.de  

TMQL  -­‐  Naviga@on  

tel_nums = Employee.tmql.reverse_types. "

! characteristics(“Tel_Nr”).atomify.result"

Keywords:  

Enter  &  leave  the  mode:  tmql,  result  The  12  axes:    roles,  traverse,  characteris9cs  ...  

Page 14: JRuby Topic Maps

topicmapslab.de  

JRTM::IO  

tm.from_jtm “path/to/file.jtm” "

tm.to_jtm “path/to/file.jtm”, “http://ex.com/baseIRI” "

Thanks  to  Lars  Heuer’s  

XTM1  

XTM20  

JTM  RDF/N3  

RDF/XML  

TMXML  

LTM  

Page 15: JRuby Topic Maps

topicmapslab.de  

Under  the  hood     …  and  in  the  perspec@ve  

RTM

Your Application

RTMAPI  

Page 16: JRuby Topic Maps

topicmapslab.de  

Under  the  hood     …  and  in  the  perspec@ve  

RTM

ONTOPIA   @nyTiM   …  ?  

Your Application

RTMAPI  TMAPI  

tmapiX  

Page 17: JRuby Topic Maps

topicmapslab.de  

Under  the  hood     …  and  in  the  perspec@ve  

TMAPI  ONTOPIA   @nyTiM   …  ?  

RTM::CoreExtensions tmapiX  

RTM::Sugar RTM::TMQL RTM::IO RTMAPI  

Your Application

Page 18: JRuby Topic Maps

topicmapslab.de  

Under  the  hood     …  and  in  the  perspec@ve  

TMAPI  

RTM::AR ONTOPIA   @nyTiM   …  ?  

RTM::CoreExtensions tmapiX  

RTM::Sugar RTM::TMQL RTM::IO

Your Application

Majana�Musica Migrans�

RTMAPI  

Page 19: JRuby Topic Maps

But  is  it  produc@on  ready?  

Over  600  Test  Cases  

Musica  Migrans  II  

Maiana  

…  when  will  you  start  to  benefit?  

   hjp://rtm.topicmapslab.de