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.
Megalayer 商家我们还算是比较熟悉的,商家主要业务方向是CN2优化带宽、国际BGP和全向带宽的独立服务器和站群服务器,且后来也有增加云服务器(VPS主机)业务。这次中秋节促销活动期间,有发布促销活动,这次活动力度认为还是比较大的,有提供香港、美国、菲律宾的年付VPS主机,CN2优化方案线路的低至年付159元。这次活动截止到10月30日,如果我们有需要的话可以选择。第一、特价限量年付VPS主...
Sharktech(鲨鱼服务器商)我们还是比较懂的,有提供独立服务器和高防服务器,而且性价比都还算是不错,而且我们看到有一些主机商的服务器也是走这个商家渠道分销的。这不看到鲨鱼服务器商家洛杉矶独立服务器纷纷促销,不限制流量的独立服务器起步99美元,这个还未曾有过。第一、鲨鱼机房服务器方案洛杉矶机房,默认1Gbps带宽,不限流量,自带5个IPv4,免费60Gbps / 48Mpps DDoS防御。C...
PacificRack最近促销上瘾了,活动频繁,接二连三的追加便宜VPS秒杀,PacificRack在 7月中下旬已经推出了五款秒杀VPS套餐,现在商家又新增了三款更便宜的特价套餐,年付低至7.2美元,这已经是本月第三波促销,带宽都是1Gbps。PacificRack 7月秒杀VPS整个系列都是PR-M,也就是魔方的后台管理。2G内存起步的支持Windows 7、10、Server 2003\20...
nofollow为你推荐
getIntjava勒索病毒win7补丁怎么删除 防勒索病毒 打的补丁ipadwifiIpad怎么用移动无线上网tcpip上的netbios网络连接详细信息上的netbios over tcpip是什么意思?x-router思科路由器有线端无法上网,而无线段却可以,用的是PPPOE拨号上网,一开始两种方法都不可以,检查宽css选择器CSS中选择器包括 A,超文本标记选择器 B,类选择器 C,标签选择器 D,ID选择器google分析google分析里的数据包括搜索引擎爬虫的数据吗?卡巴斯基好用吗卡巴斯基好吗ios8.1.3苹果手机现在是ios8.41版本要是恢复出厂版本也会降低吗小说ios7
北京vps主机 域名解析服务器 vmsnap3 免费名片模板 双12活动 魔兽世界台湾服务器 秒杀预告 jsp空间 ntfs格式分区 linux服务器维护 中国电信网络测速 监控服务器 游戏服务器出租 学生服务器 群英网络 登陆qq空间 免费稳定空间 大化网 rewritecond windowsserver2012r2 更多