Amazon Neptuneに入門してみる

Amazon Neptuneに入門してみる

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

E17a9c4bc784b9c8feb85864e99bdb5c?s=128

Yu Watanabe

March 17, 2018
Tweet

Transcript

  1. "NB[PO/FQUVOFʹೖ໳ͯ͠ΈΔ :V8BUBOBCF !ZVXC /%4௕Ԭ*5։ൃऀษڧձ ୈճษڧձ

  2. ࣗݾ঺հ ඇৗۈΤϯδχΞʴϑϦʔϥϯε ˙ 41"ʴ"1*ʴ%#ͳ8FCαʔϏεͷ੍࡞!ΞΧσϛΞ ϑϩϯτΤϯυɿ+BWB4DSJQU3FBDU όοΫΤϯυɿ/PEFKT 3VCZ1)1 σʔλϕʔεؔ܎ɿ.Z42-/FPK3%' ͦͷଞɿαʔόͷઃఆͱ͔ػցֶशͷ͓ख఻͍ͱ͔ ɾɾɾͳΜͰ΋԰͞ΜͰ͢ɻ

  3. ຊ೔ͷςʔϚ "NB[PO/FQUVOF "GVMMZNBOBHFEHSBQIEBUBCBTF "84ʹ஥ؒೖΓͨ͠άϥϑσʔλϕʔεͰ͢ɻ ݱࡏ͸ϓϨϏϡʔ൛͕࢖͑·͢ɻ

  4. άϥϑɾɾɾʁ γϦʔζɾ य़ͷάϥϑσʔλಛू

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

    ઢܗϦετ • ໦ߏ଄ • άϥϑ ˙ ਎ۙʹ͋Δάϥϑߏ଄ • మಓ࿏ઢ • ίϯϐϡʔλωοτϫʔΫ • Ոܥਤʢ໦ߏ଄ʣ • 4/4ͷGPMMPXGPMMPXJOHͷؔ܎ Կ͔ͷωοτϫʔΫ ·ͨ͸ Կ͔ͷ૬ؔؔ܎
  6. άϥϑཧ࿦ͷ༻ޠΛ͢͜͠ • ϊʔυʢ௖఺ʣͱΤοδʢลʣ • ༗޲άϥϑͱແ޲άϥϑ • Τοδʹ͸ॏΈ෇͚͕Ͱ͖Δ • ୯७άϥϑͱଟॏάϥϑ

  7. "NB[PO/FQUVOF ೥݄຤ʹൃද͞Εͨ"NB[PO71$಺ͰՔಇ͢Δάϥϑσʔλ ϕʔεɻݱࡏ͸ݶఆϓϨϏϡʔ൛͕ެ։͞Ε͍ͯΔɻ

  8. ͓஋ஈ IUUQTBXTBNB[PODPNKQOFQUVOFQSJDJOH 42-4FSWFSͷ΄͏ͱಉ͘͡Β͍ͷՁ֨ઃఆ ˞ϓϨϏϡʔظؒத͸ແྉͰ͢

  9. ʢͪΐͬͱدΓಓʣطଘͷάϥϑσʔλϕʔε ˙ ϓϩύςΟάϥϑϞσϧɾɾɾͦΕͧΕಠࣗͷΫΤϦจ๏Λ࣋ͭ • /FPK IUUQTOFPKDPN FUDʜ ˙ 3%'Ϟσϧɾɾɾ8$ඪ४ͷ3%'Ϟσϧͱ41"32-ΫΤϦΛ࢖͏ •

    7JSUVPTP IUUQTWJSUVPTPPQFOMJOLTXDPN • 'VTFLJ IUUQTKFOBBQBDIFPSHEPDVNFOUBUJPOTFSWJOH@EBUB https://neo4j.com/developer/guide-data-modeling/ Apache TinkerPop / Gremlin
  10. "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/
  11. ͬͦ͘͞࢖ͬͯΈΔ ͜͜ʹ͸͋Γ·ͤΜ खಈͰΞΫηεʂ IUUQTBXTBNB[PODPNKQOFQUVOF ʮϓϨϏϡʔʹαΠϯΞοϓʯ͔Βਃ͠ࠐΈ·͢ɻ ೔͘Β͍Ͱϝʔϧ͕ಧ͖·ͨ͠ɻ

  12. ؀ڥߏங ϢʔβʔΨΠυʢӳޠʣ IUUQTEPDTBXTBNB[PODPNKB@KQOFQUVOFMBUFTUVTFSHVJEFJOUSPIUNM IUUQTEPDTBXTBNB[PODPNKB@KQOFQUVOFMBUFTUVTFSHVJ EFHFUTUBSUFEQSFSFRVJTJUFTIUNM • &$Πϯελϯε͔Β/FQUVOFͷ%#ΫϥελʔʹΞΫηε • σʔλΛϑΝΠϧ͔Βϩʔυ͢ΔͳΒ4΋ඞཁ •

    ͦΕͧΕʹඞཁͳΞΫηεݖݶΛ෇༩ ˞&$΍4͸ແྉͰ͸ͳ͍Ͱ͢
  13. ؀ڥߏஙμΠδΣετ ͱʹ͔͘શ෦ʮόʔδχΞ๺෦ VTFBTU ʯʹ࡞͍ͬͯͩ͘ʂ ͦ͜ʹ͔͠/FQUVOF͋Γ·ͤΜʂʂ 71$ͱ &$Πϯελϯεͷ࡞੒ *".ͰϢʔβʔ࡞Δ

  14. ؀ڥߏஙμΠδΣετ /FQUVOFͷΠϯελϯε͸ /FQUVOFͷίϯιʔϧͰ࡞Δ

  15. ؀ڥߏஙμΠδΣετ

  16. ؀ڥߏஙμΠδΣετ /FQUVOFͷ%#Ϋϥελʔ͕Ͱ͖ͨΑʔ ϓϩϏδϣχϯάʹ͸ʙ෼͘Β͍͔͔Γ·ͨ͠ɻ

  17. )FMMP/FQUVOF &$Πϯελϯεʹ44)ͰϩάΠϯɺ /FQUVOFͷΤϯυϙΠϯτʹΫΤϦΛ1045ͯ͠ΈΔɻ ۭͬΆͳͷͰɺۭͷ഑ྻ͕ฦ͖ͬͯ·ͨ͠ɻ͜ΕͰ0,ʂ

  18. σʔλͷϩʔυ • 4ʹόέοτΛ༻ҙʢόʔδχΞ๺෦ʂʣ • /FQUVOF͔ΒಡΈࠐΊΔΑ͏ʹݖݶ෇༩ • ϑΝΠϧΛ4ʹΞοϓϩʔυ

  19. ࣗ෼ͷσʔλͰ΍ͬͯΈͨ  3%'Ϟσϧ Q13952 P23511 Activation 2,721 nodes 43,228 edges

    • ໿ ߦͷ3%'ϑΝΠϧ .# Λ4ʹΞοϓϩʔυ • &$ίϯιʔϧ͔Βɺ4্ͷσʔλΛ/FQUVOFʹϩʔυͤ͞Δ • ඵҎԼͰ/FQUVOFʹΠϯαʔτ׬ྃ
  20. ࣗ෼ͷσʔλͰ΍ͬͯΈͨ  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-ΫΤϦΛ౤͛Δ ϊʔυ͕ඵҎԼͰฦ͖ͬͯͨɻ
  21. ·ͱΊ • άϥϑߏ଄σʔλ͸άϥϑσʔλϕʔεʹೖΕͯΈΔ • طଘͷπʔϧ͸ಋೖͷϋʔυϧ͕ߴ͍PS҆ఆ͠ͳ͍ɻʢݸਓͷҙݟͰ͢ʣ • ͦ͜Ͱ"NB[PO/FQUVOF !όʔδχΞ๺෦ • ϑϧϚωʔδυ

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