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.

RackNerd 黑色星期五5款年付套餐

RackNerd 商家从2019年上线以来争议也是比较大的,一直低价促销很多网友都认为坚持时间不长可能会跑路。不过,目前看到RackNerd还是在坚持且这次黑五活动也有发布,且活动促销也是比较多的,不过对于我们用户来说选择这些低价服务商尽量的不要将长远项目放在上面,低价年付套餐服务商一般都是用来临时业务的。RackNerd商家这次发布黑五促销活动,一共有五款年付套餐,涉及到多个机房。最低年付的套餐...

特网云(1050元),IP数5 个可用 IP (/29) ,美国高防御服务器 无视攻击

特网云特网云为您提供高速、稳定、安全、弹性的云计算服务计算、存储、监控、安全,完善的云产品满足您的一切所需,深耕云计算领域10余年;我们拥有前沿的核心技术,始终致力于为政府机构、企业组织和个人开发者提供稳定、安全、可靠、高性价比的云计算产品与服务。官方网站:https://www.56dr.com/ 10年老品牌 值得信赖 有需要的请联系======================特网云美国高防御...

青云互联:洛杉矶CN2弹性云限时七折,Cera机房三网CN2gia回程,13.3元/月起

青云互联怎么样?青云互联是一家成立于2020年6月份的主机服务商,致力于为用户提供高性价比稳定快速的主机托管服务,目前提供有美国免费主机、香港主机、香港服务器、美国云服务器,让您的网站高速、稳定运行。目前,美国洛杉矶cn2弹性云限时七折,美国cera机房三网CN2gia回程 13.3元/月起,可选Windows/可自定义配置。点击进入:青云互联官网青云互联优惠码:七折优惠码:dVRKp2tP (续...

nofollow为你推荐
proprietaryios11Max163支持ipad支持ipadipad连不上wifiiPad mini WiFi开关成灰色无法连接,怎么办iphone连不上wifi苹果手机为什么突然连不上家里的wifi?itunes备份怎样用itunes备份iphonegoogle中国地图强大的谷歌地图,为什么中国不用起来google分析google分析里的数据包括搜索引擎爬虫的数据吗?morphvoxpro教程morphvox是什么 morphvox怎么使用 morphvox设置方法
新加坡虚拟主机 绍兴服务器租用 n点虚拟主机管理系统 openv raksmart godaddy优惠码 新世界电讯 网页背景图片 云图标 地址大全 申请个人网页 cdn联盟 百度云1t 酷番云 免费dns解析 常州联通宽带 最漂亮的qq空间 中国电信测速器 湖南idc 广州虚拟主机 更多