smallnofollow
nofollow 时间:2021-05-23 阅读:(
)
LinkingDatafromRESTfulServicesRosaAlarconDepartamentodeCienciadelaComputacionPonticiaUniversidadCatolicadeChileralarcon@ing.
puc.
clErikWildeSchoolofInformationUCBerkeleydret@berkeley.
eduABSTRACTOneofthemaingoalsoftheSemanticWebistoextendcur-renthuman-readableWebresourceswithsemanticinforma-tionencodedinamachine-processableform.
OneofitsmostsuccessfulapproachesistheWebofDatawhichbyfollow-ingtheprinciplesofLinkedDatahavemadeavailableseveraldatasourcescompliantwiththeSemanticWebtechnologies,suchas,RDFtriplestores,andSPARQLendpoints.
Ontheotherhand,thesetofthearchitecturalprinciplesthatunder-liethehuman-readableWebhasbeenconceptualizedastheRepresentationalStateTransfer(REST)architecturalstyle.
Inthispaper,wedistillRESTconceptsinordertopro-videamechanismfordescribingREST(i.
e.
human-readableWeb)resourcesandtransformthemintosemanticresources.
ThestrategyallowedustoharvestalreadyexistingWebre-sourceswithoutrequiringchangesontheoriginalsources,orad-hocinterfaces.
Thepresentedstrategyaimstocontributetotheavailabilityofmoresemanticdatasetsandbecomeafurthersteptolowertheentrybarriertosemanticresourcespublishing.
CategoriesandSubjectDescriptorsH.
3.
5[InformationStorageandRetrieval]:OnlineIn-formationServices—Web-basedservices,DatasharingGeneralTermsDesign,Documentation,LanguagesKeywordsREST,WebData,Crawling1.
INTRODUCTIONThereisanincreasinginterestintherelationshipofRep-resentationalStateTransfer(REST)[13],andtheSemanticWeb,whichhasresultedinvariousapproachesvaryingfromthesemanticannotationofWebresources,tomiddlewarethatmediatesresourcehandling.
Followedapproaches,re-semblethestrategiesofmoretraditionalSOAP/WSDLse-manticservicesandneglectbasicRESTproperties.
RESTprinciplesaresomehowrelatedtoLinkedDataprinciplesinthesensethatresourceshaveauniqueidentier(URI),thatmustbedereferenceablethroughHTTP;resourcesareinter-linked,andbyfollowingthoselinksnewresourcescanbedis-covered.
However,dierencesarisewhengettingdeeperintoCopyrightisheldbytheauthor/owner(s).
LDOW2010,April27,2010,Raleigh,NorthCarolina.
.
theprinciplesandrationaleofbothelds.
Forinstance,ontheLinkedDataside,researchprojectsaimtocreatelargecollectionsofRDFdatabytransformingstructureddatasourcesintoRDFusingspecializedmappings,andexposingthegeneratedRDFdatasetasRDFtriplestores,oftenwithSPARQLendpoints.
AlthoughthisstrategymakeavailablelargecollectionsofRDFdata,theyresultalsoincentralisticapproacheswhereaccessistypicallymediatedthroughasin-gle"endpoint"(e.
g.
adumpofthewholesite,anSPARQLendpoint,aTabulator-likeinterface,etc.
)andduetotheheterogeneousnatureofthedatasourcesinterfaces,theyrequiresophisticatedmechanismstoretrieve,process,andpublishtheinformation[9],whichchallengesthescalabilityandaccuracyoftheexposedatasinceitcanbeoutdated.
OneofthemaintenetsofRESTistheprimacyofre-sourcesthatareuniquelyidentiedbyopaqueURIs,thatis,inordertoavoidcouplingbetweenclientsandservers,noassumptionsmustbemadeaboutthestructureoftheURI[26].
RESTrequiresauniforminterface,thatis,asetofoperationsormethodswithknownsemanticsthatchangesthestateoftheresources.
TheinterfacedependsontheURIscheme,forHTTP,thestandardmethodsareGET,PUT,POST,DELETE,andOPTIONS.
Methodsareexternaltothere-sources,andareinvokedbysendingstandardmessagestotheWebserverindicatingtheURIoftherequestedresource,themethod,thepayloadofthemessageandmetadata.
Aresourcecanhavemultiple"representations"thatfol-lowastandardizedformatormediatype(e.
g.
,text/html,application/xml,etc.
)andcanbenegotiatedwiththeWebserver.
Representationsconveythestateoftheclient'sinteractionwithintheapplicationandcontainhyperlinksthatallowclientstodiscoverotherresourcesorchangethestateoftherepresentedresource.
Mostimportantly,RESTserviceshaveno"endpoints",instead,theyconsistsofacollectionofresourceURIsandasetofstandardopera-tions.
ThisapproachdiersgreatlyfrommoretraditionalSOAP/WSDL,whereaservicepublishanendpointthatex-posesthesetofavailableoperations(i.
e.
URIs,encoding,parameters).
Suchoperationshaveparticularsemanticsthatmustbeknowninadvance,inordertobeproperlyinvokedbytheclient(coupling).
RESTyieldlooselycoupleddesign[26],wherearchitec-turalconcernsareseparatedamongvariousstandardizedcomponentssuchasrouters,WebserversandWebbrowsers,resultinginaexible,extensibleanddecentralizedsystemsimpletomaintainandcapableofmassivescalability.
Un-likedistributedsystem,thathidedistribution,decentralizedsystemsmakeitexplicitwiththeeventualgoalofarchitect-ingasystemofsystems.
BasedontheseRESTprinciples,wepresenttheResourceLinkingLanguage(ReLL),thatdescribesRESTfulWebser-vicesandprovidesanaturalmappingfromthegraph-orientedworldofRESTfulservices(resourcesinterlinkedbylinksfoundinresourcerepresentations)tothegraph-basedmodelofRDF.
BymeansofaReLLdescription,asetofRESTre-sourcesaredescribedandexposed.
Threeapplicationsweredescribedandtheresourcesharvestedintoatriplestore.
Section2brieydiscussrelatedapproaches,andsection3describestheproposedlanguage.
2.
RELATEDWORKSemanticWebServices(SWS)forRESTaremainlyfo-cusedonprovidingasemanticdescriptionofaRESTser-vice.
SA-REST[21]andhREST/MicroWSMO[20]providealistofinputandoutputparameters,methods,andURIsexposedbyaRESTservicebymeansofpropertyvaluepairsorRDFa[1]annotations.
Thedescriptionitselfcanbetrans-formedtoRDFusingaGRDDL-based[12]strategyforgen-eratingadomainontologyinRDF,butnoinformationabouttheRESTresourcesthemselvesareretrieved.
TheWebApplicationDescriptionLanguage(WADL)[16]describeRESTfulservicesandplaceresources,identiedbypredenedURIpatterns,asrst-classobjectsinadescrip-tion.
WADLonlysupportsHTTPmethodswithrequestandresponseelements.
Theseelementscontainrepresenta-tionswithamediatypeand(possibly)anotherURI.
Rep-resentationscontaintypiedparametersthatinturncon-tainlinkstoanotherresources'URI.
Generallyspeaking,WADLattemptstocompletelydescribeallpossibleaspectsofaRESTfulservice,downtopredenedURIpatternsandthewaysinwhichqueryparametershavetobecomposedforcertaintypesofrequests,introducingahigherlevelofcouplingforclientsusingsuchdescriptions.
Inthesameline,BattleandBenson[6]proposesemanticannotations,similartoSA-REST,andextensionstoSPARQLinordertosupportanHTTPRESTuniforminterface.
TheyalsoproposeextensionstothepayloadoftheHTTPRESTmethods(e.
g.
,PUT,DELETEandGET)formaintainingconsis-tencybetweenaRESTresourceanditssemanticequivalent(atriple)insometriplestore.
ThemainproblemoftheseapproachesisthattheyfollowtheWSDL/SOAPservicemodel;theydonotalignwellwiththeprinciplesofRESTfulservicedesign,sincetheydisre-gardfundamentalpropertiessuchasthehypermedianatureofREST,andthepossibilityofmultiplerepresentationsfortheresources.
TheyalsointroducecouplingintheirdesignbyadheringtoURItemplatesfordescribingtheURIsofre-sources,input,andoutputparameters[25],orinthecaseofBattleandBenson,theyintroducenewsemanticstothestandardRESTinterface.
EXPRESS[4]isaSWSmodelthatexplicitlyavoidstheRPC-orientationoftheapproachesmentionedsofar.
ItstartsfromHTTP'suniforminterface,andthendescribestheavailableresourcesinanOWLontology.
However,themodelofEXPRESSisacentralizedoneaswell,becauseitisassumedthatthereisacompletedescriptionofaWebSer-vice'savailableresources,andthenthisdescriptionisusedtogenerateURIsforclasses,instances,andproperties.
OntheLinkeddataside,theVocabularyOfInterlinkedDatasets(voiD)[3],describesdatasets(setsofRDFtriples)aswellasthesetsofLinksets,thatis,tripleswherethesub-jectbelongtoadatasetdierentthantheobject'sdataset.
Directionalityofthelinkscanbemodeled,andotherprop-ertiessuchaslicensing(dcterms:license),thenumberoftriplesavailableinthedataset(void:statItem),thevocab-ulariesusedinthedataset,andaSPARQLendpoint,arealsoprovided.
voiDisaccompaniedofaSitemapprotocolextensionthatindicatesthelocation(URI)ofthevoiDde-scriptionsothat(semantic)webcrawlerscannditandusevoiD'sinformationtoindexthedataset.
TheSilk-LSL(LinkSpecicationLanguage)[30]isanXML-basedlanguagethatallowstodenetherules(e.
g.
similaritymetrics)andtondcertaintypesoflinks(e.
g.
owl:sameAs)betweentwodatasourcesautomatically(thatis,todiscoverLinksetsinthetermsofvoiD).
voiD'sfocusisonprovidingaccessanddiscoveryforal-readyexistingdatasetsbypublishingmetadata,butamoregranularapproach(i.
e.
informationabouttheretrievedre-sourcesthemselves)isnotconsidered.
Silk,allowtobetterindexlargecentralizedcollectionsofRDFdata,anddis-coveringdependenciesbetweenthesedatasets.
WhiletheseapproachesarecentraltoincreasingtheamountoflinkeddataontheWeb,theyareratherexpensivebecausetheyarebasedonalotofspecializedmappingandpublishingworkforjusttransformingonedataset[9].
LDDR,theLink-basedResourceDescriptorDiscovery[17]isaproposalsubmittedtoIETFthatfocusesonthere-sourcesratherthanthedatasets.
Itallowsresourcestoindicatetheirdescriptor'slocationbyusinglinksinthreemodes,theelementavailableinmarkuprepresen-tationsthatsupporttyped-relationssuchas(X)HTMLandAtom;theHTTPLinkHeader;andaLink-patterncon-tainedintheresource'sdescriptiondocumentlocatedat{host}/.
well-known/directory.
Inallthreecases,thede-scriptoritselfdependsontheresource'sURI,intheformof{resourceuri};about.
Unlikethelastapproach,thefor-mertwowouldrequiretomodifytheresourcesinordertoincludetheelementseitherintheresource'scodeorintheserversideinordertoprocesstheHTTPHeader.
Asforthedescriptoritself,XRD1,theExtensibleRe-sourceDescriptordenesasmallsetofelementsdescribingtheresource'sURI(andURItemplate),anXMLsignature,theexpirationdate,andlinkstootherresources.
LinksarealsoannotatedwithmetadatasuchasthetargetresourceURI(anditsURItemplate),mediatype,andthepropertyasdenedbytheHTTPHeaderLinkRelation-shipTypes.
Thisapproach,impliesthattheremustexistanXDRdocumentperresource(sincethesetoflinksisoftendierentforeachresource)whichintroduceshighcouplingandmaybeimpracticalforaWeb-scaleapplication.
IfXRDfocusesonindividualresources,POWDER,theProtocolforWebDescriptionResources2recommendedbyW3CaimstofacilitatethedescriptionofgroupsofresourcesidentiedbyInternationalizedResourceIdentiers(IRIs).
Aniriset(asetofIRIs,notasetofresources)canbedenedintermsofthepropertiesofsuchIRIs,thatis,theacceptedschemes(e.
g.
http,https),hosts,paths,andportsdenedviaregularexpressions.
Theirisetpropertiesaredescribedbyadescriptorsetelementthatgroupsrestrictionattributessuchascertified(indicatesifthedescriptioncertiesan-otherresource)andsha1sum(providingaSHA-1sumof1http://docs.
oasis-open.
org/xri/xrd/v1.
0/xrd-1.
0.
html2http://www.
w3.
org/TR/2009/REC-powder-dr/thedescribedresource);andannotationproperties,suchas,displaytext(adescriptivetext),displayicon(animageURI)andseealso,label,commentthatprovidearelatedresourceURI,adescriptionandacommentrespectively.
Bothrestrictionattributesandannotationpropertieshavewell-denedsemanticsandcanbetranslatedautomaticallytoOWL,thought,theydescribehighlevelattributes.
Anadditionalproperty,typeofisalsotranslatedintordf:typeandallowstospecifyaclassforalltheelementsofaniriset.
Forinstance,wecoulddenethehttp:\twitter.
comirisetandindicatelaterthatalltheelementsidentiedbysuchURIbelongtotheclasstwitterPublicTimeLine.
Prove-nanceinformationdescribingauthor,dateandvaliditype-riod(attribution)isalsoprovided.
UnlikeXDR,POWDERreferstogroupofresourcesiden-tiedbyURIpatterns(notURItemplates)withoutrequir-ingchangesintheresources,furthermore,POWDERmakespossibletoassignaclasstothegroupofresourcesfacilitat-inglatercomplexoperationssuchasSPARQLqueries.
Onthenegativeside,POWDERfacilitatesthedescriptionofgroupresourcesbutnotitdoesnotprovidesupportfortheresourcesdiscoveryoranautomaticharvestingprocess.
IntheapproachdescribedbyFutrelle[14],RDFisusedasthe"integrationlayer"inascenarioofheterogeneousdatasources,andthemainfocusisonharvestingwell-knownandcooperatingdatasources.
Thisapproachcanbeappliedtoavarietyofdatasources,buttheyhavetobecooperatinginthesensethattheyexposeRDFthemselves.
Thehar-vester'smainroleistobenotiedofnewandupdateddata,andtopullitinfromthesesources.
WhilethisscenariousesRDF'spowertounifyheterogeneousdatasourcesonthemetamodellevel,itisonlyapplicableinclosedandco-operatingsettings.
Inourapproach,datasourcesarenotre-quiredtopublishRDFthemselves.
AslongasaccesstodataisprovidedthroughRESTfulservices,theycanbeharvestedandusedasRDF.
Aweaknessofthecurrentimplementa-tionisthatupdatingisnotsupportedinawaythatallowsecientincrementalupdates,butweplantoaddressthisissueinourfutureworkmentionedinSection6,wherewedescribeextensionstoourlanguagethatrepresentupdateservices(andthustheabilitytousethoseforincrementalupdates)onthelanguagelevel.
SOFIE[29]focusesoninformationextractionfromWebresources,andANGIE[27]onusingbothextractedinfor-mationandWebservicesendpoints,forbuildingamorein-teractivesystemthatdoesnotrequireanexhaustivecrawlofdata,butretrievesinformationondemand.
SOFIEthusfallsintothecategoryofapproachesthatstartfromresourcerepresentations,anduseinformationretrievalmethodstoextractRDFfromthem.
ThecurrentimplementationofANGIEfocusonthedynamicsofqueryprocessingintheRDFdatamanagedbythesystem,andusesahardwiredsetofWebservicesastheback-end.
SimilartoSA-REST,itusesasetoflowering/liftingtransformationstotranslatetheresultsoffunctioncallsfromandtoRDF.
ANGIEfo-cusesonSPARQLprocessing(theframeworkisabletouseWebserviceswhileprocessingSPARQLqueries),andlessontheabilitytoeasilyaccommodatealargevarietyofRESTfulservices.
Deimos[5]isanothersystemthatstartswithinformationfoundonWebpagesorthroughWebforms,andthenusessemanticanalysistomapthesyntaxoftheserepresentationstosemanticallyricherinformation.
Insteadofrelyingontherichnessoflinksdiscoveredinknownresources,though,theapproachtakeninDeimosusestaggingservicestodiscovernewresources.
Finally,anotherattempttoprovideabridgebetweenRESTandthesemanticWebistheW3CworkinprogressofanRDFvocabularyrepresentingtheHTTPprotocol3.
Theap-proachcapturespropertiessuchasthemessageexchanged(includingtheHTTPheaders),therequest(includingthemethodandURI)andtheresponse(includingtheHTTPstatuscodenumber)withthegoaloffacilitatingrelevanttaskssuchascontentnegotiation,aswellasadditionalHTTPheadersregisteredbytheInternetAssignedNumbersAu-thority(IANA).
3.
RESOURCELINKINGLANGUAGEConsideringtherelatedwork,wederivedasetofrequire-mentsforaRESTresourcedescriptionlanguagethatcon-siderRESTconstraints.
Forinstance,inordertoavoidcou-plingURIsmustbeopaque,theymustsupportmultiplerepresentations,andmustconsiderlinkingamongresourcesasafundamentalproperty.
Inordertoconsidercurrentinstalledinfrastructure,itmustrequireminimalornoin-terventionforexistingWebresources;inordertoscaleitmustsupportapartialdescriptionoftheresourcesthatcanbelatercompletedand/ormodied,itmustdescribebothsingleresourcesandgroupsofresourcesaswellastherela-tionshipsamongthem,andnallyitmustbesimpleinordertolowertheentrybarrierforfuturedevelopersandfosteritsadoption.
ThemainconstraintsfordesigningRESTfulservicesareresourceidentication,linking,andauniforminterfacethroughwhichlinkedresourcescanbeaccessed.
Bylinkingwere-fertooneofthecoreaspectsofRESTfulservices,thatistheuseofhypermediaastheengineofapplicationstate(HA-TEOAS),whichmeansthatserviceinteractionsthatinnon-RESTapproachesresultinserverstate,areactuallyimple-mentedasclientsfollowinglinkstoresourcesrepresentingthatstate.
Thisresultsinservicesthatareresource-andlink-centric,andthusadescriptionlanguageforRESTfulservicesshouldfocusonthesetwoaspects.
TheothertwomainconstraintsofREST,self-describingmessagesandstatelessinteractions,aremoreaquestionofhowresourcerepresentationsareretrieved,andhowstateishandledwheninteractingwithservices.
ForthepurposeofdesigningRESTfulservices,allofthesedesignissuesarerelevant.
ForthepurposeofdescribingaRESTfulserviceinterface,themostimportantaspectsaretheresourcesrep-resentationsthatcanberetrieved,thewaysinwhichthesecanlinktootherresources,andtheprotocolinteractionsthatmayberequiredtoaccessthoseresources.
Theservicesemanticsalsorequireanunderstandingofthesemanticsoftherepresentationsinvolvedintheinteractionswiththeservice,butforthemeredescriptionofaservice'sinterface,thesesemanticsarenotrequired.
Figure1showstheschemaofReLL.
Elementsareshownasrectanglesandattributesasdashedrectangles.
Sequencesaredepictedasacirclewiththecharacter"S".
Aserviceexposesasetofoneormoreresourcesthathaveauniqueidentier(xml:id),namesanddescriptions(human-readablelabels)andoptionallyaURIpatternwhichdescribestheconstraintsfortheidentiersexpectedtobeusedforspe-3http://www.
w3.
org/TR/HTTP-in-RDF10/Figure1:ReLLDescriptionSchemacicresources(match).
Aresourcemayhaverepresenta-tions,whicharetheserializationoftheresourceinsomesyntax.
Thisdesignnaturallysupportsmultiplerepresen-tationsforresources,butitdoesnotsupport,perse,thecommonpracticeofsomeWebservicesthatusedierentURIsfordierentrepresentationsofthesameresource(suchastwoURIswith.
xmland.
jsonsuxes,ifthesearetwosupportedrepresentationformats).
4Wediscussthisissuefurtherdown,whenwearediscussinglinktypes.
Representationscanbeassociatedwithschemasforpos-siblevalidation(ifschemasexist).
Representationscanalsobedenedaspartoftheservicedirectly,inwhichcasetheyareabstract,whichmeansthattheyarenotassociatedwithanyconcreteresources.
Themostimportantusecasesforabstractrepresentationsareconventionsformediaordataformatsthatshouldbedescribed,sothattheycanbereusedasafoundationfordescribingconcreteresourcerepresenta-tions.
Areal-worldusecaseforthisscenarioisanabstractrepresentationdescribingthemediatypeapplication/xml,thatservesasthebasisfortheabstractrepresentationde-scribingtheapplication/atom+xmlmediatypeforfeedsac-cordingtoAtom[24],whichinturnservesasthebasisfortheabstractrepresentationdescribingthepagedfeedsmediatype(i.
e.
,feedsimplementingfeedpaging[22]).
Eventually,aconcreteserviceprovidingaresourcemayusepagedfeedsandthustheresourcetypesitsrepresentationwiththeab-stract"pagedfeed"representation.
Therationalebehindthisdesignisthatvariousrepresentationsinthischainofrepresentationsdenedierentlinkingmechanisms(paged4Suchvariationsintherepresentation'sURIscouldeasilybecoveredbyaURIpatternfortheresourceendingwith.
(xml|json),butthevariationofthesuxalonewouldnotimplythatitdoesnotactuallyrefertoadierentresource,butonlytoadierentrepresentation.
feedsextendAtomwithnewlinkrelationships),andtheeectivesetoflinktypesthatcanappearinaconcretere-sourceusingthepagedfeedrepresentationthusistheunionofthesedierentlinktypes.
Representationscanbebasedonotherrepresentations,butonlyonabstractrepresenta-tions.
Theotherusecaseofabstractrepresentationsisrepresentationsthatarederivedfromconcreterepresenta-tions,suchasacollectionofrepresentationsthatisavailablethroughapagingmechanisminrepresentationformats.
Eachrepresentationcancontainanynumberoflinks.
Alinkisretrievedfromtherepresentationbyusingselectors.
Selectorsdependontherepresentationformat,andthustheirdenitionandinterpretationmaydependonalan-guage(selectortype)thatisappropriatedforacertainrepre-sentation.
Forinstance,forXMLrepresentations,themostpopularexampleforaselectormechanismistheXMLPathLanguage(XPath)[11,7],whichallowsstructuredselectionswithinXMLdocumenttrees.
Alinkdenesapossibleasso-ciationleadingfromtheresource'srepresentationcontainingthelinktoanotherresourceasdeterminebythetarget.
In-steadaresourceURI,thetargetcontainsavalidresourceidinordertoavoidcouplingwiththeresources'namingscheme.
Alinkhasalinktypewhichrepresentsthesemanticsofthelink,butReLLdoesnotmakeanyattempttoformalizethesemantics;linktypeshaveanameandadescriptionandthuscanbedocumentedinaservicedescription,buttheirsemanticsareoutsideofthescopeofthedescriptionlan-guage.
Linkscanalsocontainprotocoldescriptionswhichforeachlinkspecifytherulesthatgoverntheinteractionwiththelinkedresource.
ThisisimportantbecauselinksinRESTfulservicesnotonlyhaveapplication-specicseman-tics,followingthelinksalsomayrequiredierentwaysofusingtheuniforminterfaceprovidedbyacertainprotocol.
Figure2:GeneratingRDFtriplesfromReLLdescriptionsThus,itispossibleforeachlinktospecifyhowthislinkhastobetraversedusingaspecicprotocol.
Practicallyspeaking,thismeansthatafteralink'sURIhasbeendeter-mined(forexamplebyextractingtheURIusingaselector),theprotocolisdeterminedbyinspectingtheURI'sscheme,andthentheprotocoldescriptionmightgiveadditionalhintsabouthowtousemethodsorcomposeentitiesforinvokingtheuniforminterface.
Thusprotocoldescriptionsarejustone(theinterface-specic)partofdescribinglinksemantics.
4.
FROMRELLTORDFReLLmainelementssuchasresource,representation,andlinkserveasthecoreelementsforaRDF/OWLminimalvocabularyshowninFigure2underthe"rell"namespace.
Resource,andrepresentationareconceptswhilelink,andrepresentsarepredicates.
SinceReLLdescribesaRESTapplication,itisusedtogenerateadomainontologyfortheapplication.
TheresourceidannotatedinReLLisusedastheresource'stypeandthelinktypeasthepredicatethatrelatestworesources.
Domainspecicresourcesarealsosubclassesoftherell:resourceentity,andcurrentlyformadomain-specicvocabularybyusingtheReLLservice'sattributebase.
WearemaintainingtheactualRESTresources'URIstoidentifythemintherealmoftheSemanticWeb,howevertheyareconsideredinstancesofthedomain-specicclassesdiscussedbefore.
RESTresourcesarelinkedtogetherwithalinkidinsteadofalinktype.
RESTresources'themselvescanbetransformedtoRDFfollowingaGRDDLapproach.
Forinstance,inFigure2,aresourceisannotatedwithprop-ertiesdenedinthevCardvocabulary,includingsimple(lit-erals)andcomplexattributes(e.
g.
theEMAILisgeneratedasaninternalblanknode).
Naturally,thepropervocabu-lariesdependontheresources.
Withthisapproach,itispossibletoretrieveagraphoftriplesdescribingaRESTresource(URIandattributes)anditsrelationtoanotherRESTresource,asshownbythedashedrectangleinFigure2.
Theresultinggraph[10]isnamedwithanIDortimestamp(e.
g.
,base:r123456789)thatreferstothesourceorrepresentationfromwherethegraphinformationwascollected.
TherepresentationisaninstanceoftherepresentationtypedenedintheReLLde-scriptionfortheretrievedRESTresource.
Representationsaresubclassesofaconcretemediatypethatcanbederivedfromabstractrepresentationsorab-stractmediatypesasannotatedintheReLLdescriptions.
Abstractrepresentationsaresupportedasclassesthatserveasthebasisforotherabstractorconcreterepresentations.
Forrepresentations,theupperontologycontainsallstan-dardizedmediatypesfromtheIANAregistryasclasses.
Therepresentationisthenpartoftheprovenanceinfor-mationobtainedwhenretrievedtheRESTresources(seedashedelementsinFigure2).
OtherinformationsuchastheETagpropertyservedbytheWebserverwhenretriev-ingtheRESTresourceisalsocollectedifavailable;thedatewhentheinformationwasretrieved(andhencethenamedgraphwascreated)isalsoannotated.
Otherinformationasindicatedby[18]couldalsobeincludedinfuturedevelop-ments.
5.
IMPLEMENTATIONAsaproofofconcept,wehaveimplementedRESTler[2],acrawlerthatfollowstherulesdenedbyReLLdescriptionsinordertoharvestRESTresources.
Acomplementarycom-ponent(aTranslator)transformstheretrievedresourcesintoRDF.
Figure3describestheprincipalcomponentsoftheapproach.
Rectanglesrepresentsoftwarecomponents,UMLnoteguresareusedtorepresentles,straightlinesrepre-sentinformationowrequiredinthecongurationphaseoftheprocess(static),whiledashedlinesrepresentinforma-tionowthattakeplacewhilethecrawlingprocessisbeingexecuted(dynamic).
RESTler,isacrawlerthatparsesandusesReLLdescrip-tionsasinstructionsforretrievingRESTservices'resources.
ThecrawlertakesasinputanXMLdocumentwhichisaReLLdescription,andasetofseedURIs(Figure3),andFigure3:RESTlerArchitectureproducesasoutputatypedgraphofthecrawledresourcesandthelinksconnectingthem.
Thecrawleralsotakesasinputauthenticationinformation,onlybasicauthenticationissupported(usernameandpasswordsentintheHTTPrequest)currently,butweplantoextendthecrawlerinor-dertosupportotherauthenticationschemes(e.
g.
,OAuth,AuthSub).
Thecrawlerparsesthedescriptionle,dereferencestheinitialURI(seeds),andretrievestheresourcerepresentationconsideringtheprotocol,requestmethod,andresourceme-diatypeprovided.
CurrentlywesupportHTTP(anHTTPclient),andHTML,XHTML,Atom,JSON,RSS,andXMLasmediatypes,andonlytheGETmethod.
Butthecrawlercanbeextendedtosupportothermediatypes,protocolsandrequestmethods.
TheresourceURIismatchedagainstaregularexpres-sionthatdenestheresourcetypeorid.
Fromtheretrievedrepresentation,thecrawlerobtainsthelistofembeddedlinkstootherrepresentationsbyapplyinganXPathex-pression(selector).
Thelink'stargetindicatestheex-pectedresourcetypeandrequiresadditionalinformationsuchastheprotocol,andrequestmethodtofollowandtheexpectedmediatype.
Ifthetargetisnotpresentinthelinkelement,a"nofollow"conditionisimplied,sinceitisnotpossibletocrawlthelinkedresource(i.
e.
,thereisnoin-formationaboutthemediatype,protocol,requestmethodorexpectedresourcetype).
Itispossibleaswelltosupportcomputedlinks,thatis,linksthatarecalculated.
5Thecrawleralsoevaluateswhethertheresourcefulllscertainrestrictionssuchasthetypeofthelinkedresources(targetattribute),andthecar-dinalityoftheretrievedlinks(minOccursandmaxOccursattributesfortheselectorelement).
Theserestrictionsareoptionalandallowthecrawlertodeterminewhetherthere-sourceiswell-formedandsatisesthepreconditionsgivenintheservicedescription.
Foreachgraphretrieved,aTranslatorisinvokedforgener-atingRDFtriplesbasedontheReLLdescription,thatis,thesubjects(resources'URIs),properties(rdf:type,base:linkid)andobjects(linkedresources'URIsorvalues),aswell5BasedontheongoingworkontheURITemplate[15]lan-guage,itmightinthefuturebepossibletodeneadditionalwaysinwhichaURIcanbecomposedbasedoninputvaluesobtainedfromthecurrentrepresentation.
asprovenanceinformation(base:timestamp).
AdditionalinformationisobtainedtroughXSLTlestransformingre-sourcesintoRDFsentences,asindicatedforthecorrespond-ingmappingle.
EachReLLdocumentistransformedintoRDFwithagenericXSLTgeneratinganontologyspecictoeachapplicationdomain.
Generatednamedgraphsarestoredinatriplestore.
WeuseSesame2.
0astriplestoreandthesystemisimplementedinJava.
Sesamesupportsnamedgraphsasquads,andweusethefourthcomponentforstoringprovenanceinformation.
Finally,foreachretrievedresource,thecrawlerrecursivelyrepeatsthewholeprocess.
5.
1School/Twitter/FlickrandUserMatchingWeappliedRESTlertofourscenarios:asubsetoftheWebsiteoftheInformationSchoolatUCBerkeley,andtwowellknownREST-basedapplications,TwitterandFlickr.
Thefourthserviceprovidemappingsamongtheusersineachofthesedomainssothatwecanestablishusefulequiv-alencesbymeansofanowl:sameAsproperty.
ReLLdescrip-tionswherecreatedforeachscenarioandweretrieved11,353resources,22,309linksamongthemwhichgenerated55,548triples.
Figure4presentstheontologythatwasgeneratedaf-tertransformingReLLdescriptionsintoRDFthroughagenericXSLTdenition.
TheimagewasgeneratedusingOntoViz6andwaslaterrenedforreadability.
Theupperleftcornerpresentstherepresentationclassesandtheircorrespondingianamedia-types(e.
g.
iana-app:xhtml+xml,iana-app:atom+xml,iana-app:xml,iana-txt:htmlandim-agesmediatypes).
Theright-handsidepresentstheclassesthatmodeltheUCBerkeleyschooldomain'sresources(e.
g.
school:person,school:course,etc)andtherelationshipsamongresources(e.
g.
school:person-course).
Theleft-handsideshowstheclassescorrespondingtotheFlickrdomain(e.
g.
flickr:photostream,flickr:photo,etc)andtheirrelationships(e.
g.
flickr:photo-sizes).
Atthebottomofthegure,asubgraphdescribestheclassesthatmodeltheTwitterdomain(e.
g.
twitter:follower,twitter:user,etc)andthehyperlinksorrelationshipsamongthem(e.
g.
twitter:status-reply).
Atthecenteroftheg-uretheminimalontologydescribedinFigure2ishighlightedinboldanditalics.
6AProtegepluginthatgenerates.
dotlesFigure4:ResultingontologiesgeneratedfromReLLdescriptionsFigure5:Describinganinstanceofaschool:personresourceusingN3notationCollectionsofresourcescanbealsoidentied.
Forin-stance,atthebottomofthegure,thearcsbetweentwore-sourcesaredepicted,thetwitter:user-timeline,andthetwitter:paged-user-timelinedescribedapaginationrela-tionships,thatis,13pagesofthetwitter:user-timelinewerecollectedandthepaginationschemeisdescribeaslinksthatleadtoanumberedpage(e.
g.
twitter:timeline-page2,twitter:timeline-page3,etc).
ForthecaseofFlickrandtheInformationSchoolthepaginationschemeconsiderslinkssuchastherst,last,nextandpreviouspage.
ThefourthRESTfulservice,theUsermapisshowasasingleclassnearthecenterofthegure.
ThisisbecausetheReLLlecontainsonlyoneclassofresource(theusermap),thatis,anXMLlistmappingtheusers'URIsbetweentheotherthreeapplications.
TheRESTresourcesthemselvesaretransformedtoRDFfollowingaGRDDLapproach.
Figure5showstheattributesobtainedforindividualsoftypeschool:person.
NoticethatitispossibletoannotatetherelationshipsbetweentheRESTresource(erikwilde)anditsattributes.
Intheg-uretheserelationshipsareannotatedwithvCard,butotherinformationmodelscanbeused.
6.
CONCLUSIONSTheRESTcommunityisstilldiscussingwhetherRESTfulservicesevenshouldbedescribed,andhowsuchadescrip-tionlanguagecouldincreasethecouplingbetweenaserviceproviderandaserviceconsumer,sothatREST'sgoaloflooselycoupledservicescouldbecompromised.
Wearetak-ingapragmaticpositionandclaimthatitisimportanttokeepinmindthatanykindofcontractwillintroducesomecoupling,thatevenlooselycoupledservicesneedasharedsetofassumptions,andthatamoreformalwayofdescrib-ingthoseassumptionswillhelpserviceprovidersandcon-sumersinservicedocumentationandconsumption.
ArecentupswingofdiscoverablelinksbetweenWebresources(suchasanuptakeofmicroformats[19])hasledtotheideaofacentralregistryforlinkrelationshipsintherealmofWeblinking[23],butthisactivityisstillunderactivedevelop-ment.
OurmodelisyetastaticdescriptionofRESTfulservicesthatdoesnotcoverthecasesinwhichnewresourcesoridenticationandaccessschemesareintroduced.
However,suchadescriptionallowstodescribethestatusquoandthecaseswhichaclientshouldexpect,andthereforetheyalsoallowtoreliablydiscovercasesinwhichtheseconstraintsarenotsatisedanymore,forexamplewhennewrepresentationsornewidenticationandaccessschemesareused.
Furthermore,thiskindofRESTfulservicedescriptioncanalsoincludethesetofpreconditionsthatmustbesatisedbyaclienttobeabletoconsumeaservice.
Shouldthesepreconditionschange(becausetheservicechanges),thenananalysisofthedescriptionofthepreconditionsusedbytheclientallowstheclienttodetectthechange(forexample,anewrepresentationformathasbeenintroduced),andtoreactinanappropriateway(forexample,alertingtheclientmanager,attemptingafallback,orabort).
Bysupportingthedescriptionofasetofpreconditions,thedescriptionlan-guagecanachieveloosecoupling[26]andstillallowclientstodetectwhentheyencountersomethingthattheyhavenotbeendesignedfor.
Asforfuturework,weareplanningonconsideringmorecomplexdatamodelsthatsupportalsomethodssuchasPUT,DELETEandPOSTallowingustomodelresourcesthatcanbemodied,anditsrelationwiththeSPARQLproposalsforsupportingsuchoperations[31].
Ourmintingprocessconsistofselectingtheappropriatednameforthenamespace(base),resourceIDs,linkIDs,linktypes,andrepresentationIDs.
IntheexamplepresentedinFigure5,theresourceinstance'snamespaceandpredicateschosenforthisdescriptioncorrespondtothevCard,butotherproperties(e.
g.
foaf)couldbealsoused.
WebelievethattheselectionofsuchpropertiesmustberesponsibilityoftheReLLdesigner.
Furthermore,thepropertiesusedintheReLLdescriptionitself(e.
g.
school:person)couldbealsodescribedusingLinkedDatavocabularies.
ByfollowingthisapproachtheresultsofRESTler(e.
g.
triplesdatasets)couldbebetterintegratedwithotherLinkedDatasourcesandtheLinkedOpenDatacloudByconsideringtheURIscorrespondingtoRESTresources,anaturalcontentnegotiationwiththeWebserverwillbepossibleinordertoretrieveanRDF-friendlymediatype(e.
g.
application/rdf+xml)orthehuman-readableWebversionofthesameresource.
Asforlimitations,werequiretoprepareaReLLdocumentforeachRESTservice.
ThisapproachhasbeensuccessfullyfollowedbyotherssuchasVirtuoso'sSponger,thatpreparesSpongesorCartridgestailoredforanapplicationinterfacesuchasRESTAPIs,knownmetadatasuchasMSOce,orknownWebsitessuchasYouTube.
RDB2RDF7isalsoanad-hocapproach7http://www.
w3.
org/2005/Incubator/rdb2rdf/thattransformsRDBMStoRDFrepresentations.
WebelievethatbychoosingWebtechnologiessuchasXPATH,XSLTandXMLasathebasisforReLLdocu-ments,weareloweringtheentrybarriertothesemanticresourcespublishing,sincemostWebdevelopershavetheknowledgeandtoolsrequiredtocreatetheirownReLLde-scription.
Thisapproachalsoallowsdeveloperstocontroltheinformationtheyarecollecting.
OurnextchallengeistofurtherfacilitatethecreationofReLLdocumentsbysup-portingthedynamicandautomaticgenerationofReLLde-scriptions.
OneofthechallengesofthisgoalisthefactthatweneedtodesignanspecicXSLTforeachresourcetypeinordertoharvestspecicinformation.
Afullyautomaticapproachwouldrequireinformationretrieval,textminingandprobablymachinelearningtechniqueswhichgreatlyin-creasesthecostsofthetransformationanrisestheentrybarrierfortechnologyadopters.
HavingadocumentsuchasReLLmayserveasanin-termediatelayerthatautomaticagentscanusealsoasacontractdescribingthecapacitiesofaRESTserviceandtranslatingthemintoRDFtriples,byfollowingtheseman-tics(types)madeexplicitinthedocument.
OurapproachcanbeseenasacomplementtoproposalssuchasvoiD,sincevoiDdescribestheresultingdatasetsbutdoesnotsupportthetriplesharvestingprocess.
OurapproachwillallowanyWebcontentprovidertopublishReLLdescriptionsforoth-erstocrawltheirWebsites,orthird-partiestodevelopaWebsite'sdescriptionthataccommodatestheirneeds.
Thecrawler'sresultisadatasetthatcanbethendescribedusingvoiD.
Silk,canbealsousedforthedenitionofadditionallinkpatternssuchastheusermappingthatwecreatedman-uallyinthisversion;andLDDR'slinkingtechniquescanbealsoapplied,sinceitmayallowresourcestolinktotheirdescriptions.
Wehaveplacedstrongemphasisinadecoupledapproach,wherethecomponentsofthearchitecturemaintaincertaindegreeofindependence,andrequireknowledgeandtoolsalreadyavailableandfamiliartomostWebdevelopers,andprovideasimplemodelthatmayresultfamiliaragaintoWebdevelopers.
Ournalgoalistocontributeinmakingavailablemoresemanticinformationwhilekeepingalowerentrybarrierfordevelopers.
7.
ACKNOWLEDGMENTSThisworkwaspartiallyfundedbyCONICYT/BicenntenialBecas-Chile2009.
8.
REFERENCES[1]BenAdida,MarkBirbeck,ShaneMcCarron,andStevenPemberton.
RDFainXHTML:SyntaxandProcessing—ACollectionofAttributesandProcessingRulesforExtendingXHTMLtoSupportRDF.
WorldWideWebConsortium,RecommendationREC-rdfa-syntax-20081014,October2008.
[2]RosaAlarconandErikWilde.
RESTler:CrawlingRESTfulServices.
In19thInternationalWorldWideWebConferencePosters,Raleigh,NorthCarolina,April2010.
ACMPress.
[3]KeithAlexander,RichardCyganiak,MichaelHausenblas,andJunZhaox.
DescribingLinkedDatasets.
In2ndWorkshoponLinkedDataontheWeb,Madrid,Spain,April2009.
[4]AreebAlowisheq,DavidE.
Millard,andThanassisTiropanis.
EXPRESS:EXPressingREstfulSemanticServicesUsingDomainOntologies.
InBernsteinetal.
[8],pages941–948.
[5]JoseLuisAmbite,SirishDarbha,AmanGoel,CraigA.
Knoblock,KristinaLerman,RahulParundekar,andThomasRuss.
AutomaticallyConstructingSemanticWebServicesfromOnlineSources.
InBernsteinetal.
[8],pages17–32.
[6]RobertBattleandEdwardBenson.
BridgingtheSemanticWebandWeb2.
0withRepresentationalStateTransfer(REST).
JournalofWebSemantics,6(1),2008.
[7]AndersBerglund,ScottBoag,DonaldD.
Chamberlin,MaryF.
Fernandez,MichaelKay,JonathanRobie,andJeromeSimeon.
XMLPathLanguage(XPath)2.
0.
WorldWideWebConsortium,RecommendationREC-xpath20-20070123,January2007.
[8]AbrahamBernstein,DavidR.
Karger,TomHeath,LeeFeigenbaum,DianaMaynard,EnricoMotta,Krishnaprasad,andThirunarayan,editors.
8thInternationalSemanticWebConference,volume5823ofLectureNotesinComputerScience,Chantilly,Virginia,October2009.
Springer-Verlag.
[9]UldisBojars,JohnG.
Breslin,VassiliosPeristeras,GiovanniTummarello,andStefanDecker.
InterlinkingtheSocialWebwithSemantics.
IEEEIntelligentSystems,23(3):29–40,May2008.
[10]JeremyJ.
Carroll,ChristianBizer,PatHayes,andPatrickStickler.
NamedGraphs,ProvenanceandTrust.
InAllanEllisandTatsuyaHagino,editors,14thInternationalWorldWideWebConference,pages613–622,Chiba,Japan,May2005.
ACMPress.
[11]JamesClarkandStevenJ.
DeRose.
XMLPathLanguage(XPath)Version1.
0.
WorldWideWebConsortium,RecommendationREC-xpath-19991116,November1999.
[12]DanConnolly.
GleaningResourceDescriptionsfromDialectsofLanguages(GRDDL).
WorldWideWebConsortium,RecommendationREC-grddl-20070911,September2007.
[13]RoyThomasFieldingandRichardN.
Taylor.
PrincipledDesignoftheModernWebArchitecture.
ACMTransactionsonInternetTechnology,2(2):115–150,May2002.
[14]JoeFutrelle.
HarvestingRDFTriples.
InLucMoreauandIanFoster,editors,InternationalProvenanceandAnnotationWorkshop(IPAW2006),volume4145ofLectureNotesinComputerScience,pages64–72,Chicago,Illinois,May2006.
Springer-Verlag.
[15]JoeGregorio.
URITemplate.
InternetDraftdraft-gregorio-uritemplate-04,March2010.
[16]MarcHadley.
WebApplicationDescriptionLanguage.
WorldWideWebConsortium,MemberSubmissionSUBM-wadl-20090831,August2009.
[17]EranHammer-Lahav.
Link-basedResourceDescriptorDiscovery.
InternetDraftdraft-hammer-discovery-03,March2009.
[18]OlafHartigandJunZhao.
UsingWebDataProvenanceforQualityAssessment.
InFirstInternationalWorkshopontheRoleofSemanticWebinProvenanceManagement,Washington,D.
C.
,October2009.
[19]RohitKhareandTantekCelik.
Microformats:APragmaticPathtotheSemanticWeb.
In15thInternationalWorldWideWebConferencePosters,Edinburgh,UK,May2006.
ACMPress.
[20]JacekKopecky,KarthikGomadam,andTomasVitvar.
hRESTS:AnHTMLMicroformatforDescribingRESTfulWebServices.
In2008IEEE/WIC/ACMInternationalConferenceonWebIntelligence,pages619–625,Sydney,Australia,December2008.
[21]JonLathem,KarthikGomadam,andAmitP.
Sheth.
SA-RESTand(S)mashups:AddingSemanticstoRESTfulServices.
InFirstIEEEInternationalConferenceonSemanticComputing(ICSC2007),pages469–476,Irvine,California,September2007.
[22]MarkNottingham.
FeedPagingandArchiving.
InternetRFC5005,September2007.
[23]MarkNottingham.
WebLinking.
InternetDraftdraft-nottingham-http-link-header-08,March2010.
[24]MarkNottinghamandRobertSayre.
TheAtomSyndicationFormat.
InternetRFC4287,December2005.
[25]CesarePautasso.
ComposingRESTfulserviceswithJOpera.
InAlexandreBergelandJohanFabry,editors,InternationalConferenceonSoftwareComposition2009,volume5634ofLectureNotesinComputerScience,pages142–159,Z¨urich,Switzerland,July2009.
Springer-Verlag.
[26]CesarePautassoandErikWilde.
WhyistheWebLooselyCoupledAMulti-FacetedMetricforServiceDesign.
InQuemadaetal.
[28],pages911–920.
[27]NicoletaPreda,FabianM.
Suchanek,GjergjiKasneci,ThomasNeumann,MayaRamanath,andGerhardWeikum.
ANGIE:ActiveKnowledgeforInteractiveExploration.
In35thInternationalConferenceonVeryLargeDataBases(VLDB2009),pages1570–1573,Lyon,France,August2009.
ACMPress.
[28]JuanQuemada,GonzaloLeon,Yo¨elleS.
Maarek,andWolfgangNejdl,editors.
18thInternationalWorldWideWebConference,Madrid,Spain,April2009.
ACMPress.
[29]FabianM.
Suchanek,MauroSozio,andGerhardWeikum.
SOFIE:ASelf-OrganizingFrameworkforInformationExtraction.
InQuemadaetal.
[28],pages911–920.
[30]JuliusVolz,ChristianBizer,MartinGaedke,andGeorgiKobilarov.
DiscoveringandMaintainingLinksontheWebofData.
InBernsteinetal.
[8],pages650–665.
[31]ErikWildeandMichaelHausenblas.
RESTfulSPARQLYouNameIt!
—AligningSPARQLwithRESTandResourceOrientation.
InWalterBinderandErikWilde,editors,4thWorkshoponEmergingWebServicesTechnology(WEWST2009),pages39–43,Eindhoven,Netherlands,November2009.
前几天看到网友反馈到PacificRack商家关于处理问题的工单速度慢,于是也有后台提交个工单问问,没有得到答复导致工单自动停止,不清楚商家最近在调整什么。而且看到有网友反馈到,PacificRack 商家的之前年付低价套餐全部下架,而且如果到期续费的话账单中的产品价格会涨价不少。所以,如果我们有需要续费产品的话,谨慎选择。1、特价产品下架我们看到他们的所有原来发布的特价方案均已下架。如果我们已有...
ParkInHost主机商是首次介绍到的主机商,这个商家是2013年的印度主机商,隶属于印度DiggDigital公司,主营业务有俄罗斯、荷兰、德国等机房的抗投诉虚拟主机、VPS主机和独立服务器。也看到商家的数据中心还有中国香港和美国、法国等,不过香港机房肯定不是直连的。根据曾经对于抗投诉外贸主机的了解,虽然ParkInHost以无视DMCA的抗投诉VPS和抗投诉服务器,但是,我们还是要做好数据备...
整理一下CloudCone商家之前推送的闪购VPS云服务器产品,数量有限,活动推出可能很快机器就售罄了,有需要美国便宜VPS云服务器的朋友可以关注一下。CloudCone怎么样?CloudCone服务器好不好?CloudCone值不值得购买?CloudCone是一家成立于2017年的美国服务器提供商,国外实力大厂,自己开发的主机系统面板,CloudCone主要销售美国洛杉矶云服务器产品,优势特点是...
nofollow为你推荐
glucanotransferasechrome蓝牙itunes支持ipad支持ipad支持ipad支持ipad支持ipad请务必阅读正文之后的免责条款部分windows键是哪个Windows键是哪个键啊?css下拉菜单如何使用HTML和CSS制作下拉菜单
域名转让 com域名价格 美国vps 新秒杀 photonvps 韩国俄罗斯 便宜域名 免备案cdn 腾讯云数据库 174.127.195.202 godaddy优惠券 iis安装教程 密码泄露 天猫双十一秒杀 青果网 ev证书 三拼域名 好看qq空间 seednet 阿里校园 更多