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

Evernoteを作る

ninjinkun
September 30, 2012

 Evernoteを作る

YAPC Asia 2012 LTThon

ninjinkun

September 30, 2012
Tweet

More Decks by ninjinkun

Other Decks in Technology

Transcript

  1. EvernoteΛ࡞Δ ninjinkun

  2. ninjinkun • ͸ͯͳ εϚʔτϑΥϯΤΩεύʔτ • Objecitve-C, Java • Perl͸࠷ۙ͸ͪΐͬͱ…

  3. σʔλΛಉظ͍ͨ͠ • ੈ͸ϚϧνσόΠε࣌୅ • σόΠε͕ϩʔΧϧDBΛ࣋ͭ • σόΠεؒͰDBΛಉظ͍ͨ͠ • ϒϩάͷԼॻ͖ͱ͔ಉظ͍ͨ͠

  4. iCloudͷ͜Ε͡Όͳ͍ײ σʔλΛಉظ͍ͨ͠ • αʔόʔ͸AppleͷఏڙͷΈ • Ϋϥ΢υғ͍ࠐΈઓུ • Զͨͪͷཉ͍͠ͷ͸͜Ε͡Όͳ͍Μͩʂʂ

  5. EvernoteΈ͍ͨͳͷ࡞Γ͍ͨ σʔλΛಉظ͍ͨ͠ • ͳΜ͔େมͦ͏ͩͳ… • υΩϡϝϯτ͋ͬͨ • Evernote Synchronization via

    EDAM Evernote Synchronization via EDAM v1.0.5 March 7, 2011
  6. EDAM • Evernote Data Access and Management • σʔλͷ࣋ͪํͱಉظͷ࢓༷ •

    ͻͱͭͷதԝαʔϏεɺෳ਺ͷΫϥΠΞϯτ
  7. EDAM • ϞόΠϧΫϥΠΞϯτͷࣄ৘Λߟྀ • 3GճઢͳͲɺϋʔυͳ؀ڥ΋૝ఆ • ࣌ܭ͕৴༻Ͱ͖ͳ͍ • λΠϜελϯϓʹཔΒͳ͍

  8. ϦϑΝϨϯε࣮૷తͳ΋ͷΛ࡞ͬͯΈ·ͨ͠ σϞ • Amon2::Lite࢖ͬͯ·͢! • https://github.com/ninjinkun/EDAMSync • αʔό • ΫϥΠΞϯτ

    • iPhoneΞϓϦΫϥΠΞϯτ • ΤϯτϦͷ࡟আʹ͸ະରԠ
  9. αʔόʔ EDAM • Update Sequence Number (USN) • ΤϯτϦʔ͝ͱʹ࣋ͭ •

    ߋ৽͞ΕΔͱάϩʔόϧʹΠϯΫϦϝϯτ • create($entryA) # $entryA->usn => 250 • edit($entryA) # $entryA->usn => 251 • edit($entryB) # $entryB->usn => 252 • GUID • ΤϯτϦʔΛࣝผ͢ΔID
  10. ΫϥΠΞϯτ EDAM • dirtyϑϥά • ΤϯτϦʔ͝ͱʹ࣋ͭ • Update Sequence Number

    (USN) • ΤϯτϦʔ͝ͱʹ࣋ͭ • ΫϥΠΞϯτͰ͸ߋ৽͠ͳ͍ • GUID • ΤϯτϦʔΛࣝผ͢ΔID
  11. ͓ΘΓʹ • EDAMΛֶ΂͹Evernote࡞ΕΔ • ΫϥΠΞϯταΠυͷίʔυ͕݁ߏଟ͍ • Ͱ΋Alter Table͍΍ͩͳ… • ࣌ܭ͕৴༻Ͱ͖ΔͳΒλΠϜελϯϕʔεͰ΋Ͱ͖

    Δ͔΋