Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Amazon Neptuneに入門してみる

Amazon Neptuneに入門してみる

NDS 長岡 IT開発者 勉強会 第55回勉強会(2018/03/17)

Yu Watanabe

March 17, 2018
Tweet

More Decks by Yu Watanabe

Other Decks in Programming

Transcript

  1. άϥϑߏ଄σʔλ ˙ σʔλߏ଄ͷछྨ • ഑ྻ <ελοΫΩϡʔ> • ࿈૝഑ྻ <ϋογϡςʔϒϧϧοΫΞοϓςʔϒϧ> •

    ઢܗϦετ • ໦ߏ଄ • άϥϑ ˙ ਎ۙʹ͋Δάϥϑߏ଄ • మಓ࿏ઢ • ίϯϐϡʔλωοτϫʔΫ • Ոܥਤʢ໦ߏ଄ʣ • 4/4ͷGPMMPXGPMMPXJOHͷؔ܎ Կ͔ͷωοτϫʔΫ ·ͨ͸ Կ͔ͷ૬ؔؔ܎
  2. ʢͪΐͬͱدΓಓʣطଘͷάϥϑσʔλϕʔε ˙ ϓϩύςΟάϥϑϞσϧɾɾɾͦΕͧΕಠࣗͷΫΤϦจ๏Λ࣋ͭ • /FPK IUUQTOFPKDPN FUDʜ ˙ 3%'Ϟσϧɾɾɾ8$ඪ४ͷ3%'Ϟσϧͱ41"32-ΫΤϦΛ࢖͏ •

    7JSUVPTP IUUQTWJSUVPTPPQFOMJOLTXDPN • 'VTFLJ IUUQTKFOBBQBDIFPSHEPDVNFOUBUJPOTFSWJOH@EBUB https://neo4j.com/developer/guide-data-modeling/ Apache TinkerPop / Gremlin
  3. "NB[PO/FQUVOFͷಛ௃ ˙ ϓϩύςΟάϥϑɾ3%'ͷ྆ํ͕࢖͑Δ άϥϑͷදݱͱ໰͍߹ΘͤͷͨΊʹɺͭͷΦʔϓϯͳۀքඪ४Λαϙʔτ͠·͢ɻ (SFNMJOʹΑͬͯ໰߹ͤՄೳͳ"QBDIF5JOLFS1PQޓ׵ͷϓϩύςΟάϥϑɻ (SFNMJO͸ϊʔυ ௖఺ ʹͭͳ͕ΔΤοδ ล ΛݸผʹͨͲΔ୳ࡧΛ࣮ݱ͢Δάϥ

    ϑ୳ࡧݴޠͰ͢ɻ41"32-ʹΑͬͯ໰߹ͤՄೳͳ 3%' 3FTPVSDF%FTDSJQUJPO 'SBNFXPSL ɻ ˙ ૝ఆ͍ͯ͠Δ༻్ 4/4ɺϨίϝϯσʔγϣϯΤϯδϯɺܦ࿏Ҋ಺ɺ෺ྲྀ࠷దԽɺࣗಈ਍அɺ৵ೖݕ஌ ΍ήϊϜ഑ྻܾఆͳͲͷΞϓϦέʔγϣϯ͕ྫʹڍ͛ΒΕ·͢ɻ https://aws.amazon.com/jp/blogs/news/amazon-neptune-a-fully-managed-graph-database-service/
  4. ࣗ෼ͷσʔλͰ΍ͬͯΈͨ  3%'Ϟσϧ Q13952 P23511 Activation 2,721 nodes 43,228 edges

    • ໿ ߦͷ3%'ϑΝΠϧ .# Λ4ʹΞοϓϩʔυ • &$ίϯιʔϧ͔Βɺ4্ͷσʔλΛ/FQUVOFʹϩʔυͤ͞Δ • ඵҎԼͰ/FQUVOFʹΠϯαʔτ׬ྃ
  5. ࣗ෼ͷσʔλͰ΍ͬͯΈͨ  41"32-ΫΤϦ curl -X POST --data-binary 'query=PREFIX uniprot: <http://www.uniprot.org/uniprot/>

    SELECT (COUNT(DISTINCT ?prot2) as ?count) WHERE {uniprot:P00533 uniprot:activate ?prot1. ?prot1 uniprot:activate ?prot2 .}' http://neptuneinstance-cluster.cluster-cumqwp3crwyp.us-east-1- beta.rds.amazonaws.com:8182/sparql ˙ ͋Δϊʔυ *%1 ͷ࣍ͷ࣍ͷϊʔυΛશͯऔಘʢͯ͠Χ΢ϯτʣ ΤϯυϙΠϯτʹ41"32-ΫΤϦΛ౤͛Δ ϊʔυ͕ඵҎԼͰฦ͖ͬͯͨɻ
  6. ·ͱΊ • άϥϑߏ଄σʔλ͸άϥϑσʔλϕʔεʹೖΕͯΈΔ • طଘͷπʔϧ͸ಋೖͷϋʔυϧ͕ߴ͍PS҆ఆ͠ͳ͍ɻʢݸਓͷҙݟͰ͢ʣ • ͦ͜Ͱ"NB[PO/FQUVOF !όʔδχΞ๺෦ • ϑϧϚωʔδυ

    • εέʔϧͰ͖ΔʢεϞʔϧελʔτՄೳʣ • ϓϩύςΟάϥϑͱ3%'ͷ྆Ϟσϧ͕࢖͑Δ • े෼࣮༻ϨϕϧʂʢݸਓͷҙݟͰ͢ʣ