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

gokartのキャッシュ競合防止のロック機能

 gokartのキャッシュ競合防止のロック機能

Daiki Ikeshima

July 11, 2023
Tweet

More Decks by Daiki Ikeshima

Other Decks in Programming

Transcript

  1. ΤϜεϦʔגࣜձࣾ஑ౢେथ
    HPLBSUͷσʔλഁଛճආ
    ʲ4BOTBOºΤϜεϦʔʳHPLBSUͰര଎։ൃʂ.-0QTษڧձ
    dΩϟογϡিಥ๷ࢭϩοΫd

    View Slide

  2. ࣗݾ঺հ
    ஑ౢେथʢ[email protected]ʣ
    ΤϜεϦʔגࣜձࣾ

    "*ɾػցֶशνʔϜɹ.-ΤϯδχΞ
    ೥ೖࣾͰHPLBSUྺ೥
    Ϣʔβʔڵຯʹ͋ͬͨϨίϝϯυγεςϜͳͲͷ
    ։ൃʹHPLBSUΛ࢖༻
    HPLBSUͷػೳ։ൃ΋͍ͯ͠·͢

    View Slide

  3. HPLBSUͰ͸λεΫͷ݁ՌΛΩϟογϡϑΝΠϧʹอଘ
    ෳ਺ͷϓϩμΫτPSฒྻԽͰڞ௨Խͤ͞Δͱޮ཰త
    όον
    λεΫ"
    ΩϟογϡϑΝΠϧΛ࢖ͬͯաڈͷ݁ՌΛ࢖͍ճͤΔ
    ෳ਺όονͰΩϟογϡΛڞ௨Խ͢ΔͱɺλεΫͷ࠶࣮ߦΛආ͚ΒΕΔ
    ґଘ

    View Slide

  4. HPLBSUͰ͸λεΫͷ݁ՌΛΩϟογϡϑΝΠϧʹอଘ
    ෳ਺ͷϓϩμΫτPSฒྻԽͰڞ௨Խͤ͞Δͱޮ཰త
    όον
    λεΫ"
    ΩϟογϡϑΝΠϧΛ࢖ͬͯաڈͷ݁ՌΛ࢖͍ճͤΔ
    ෳ਺όονͰΩϟογϡΛڞ௨Խ͢ΔͱɺλεΫͷ࠶࣮ߦΛආ͚ΒΕΔ
    ґଘ
    ࣮ߦॱ

    View Slide

  5. HPLBSUͰ͸λεΫͷ݁ՌΛΩϟογϡϑΝΠϧʹอଘ
    ෳ਺ͷϓϩμΫτPSฒྻԽͰڞ௨Խͤ͞Δͱޮ཰త
    όον
    λεΫ"
    Ωϟογϡ"
    ґଘ
    ࣮ߦॱ
    ΩϟογϡϑΝΠϧΛ࢖ͬͯաڈͷ݁ՌΛ࢖͍ճͤΔ
    ෳ਺όονͰΩϟογϡΛڞ௨Խ͢ΔͱɺλεΫͷ࠶࣮ߦΛආ͚ΒΕΔ

    View Slide

  6. HPLBSUͰ͸λεΫͷ݁ՌΛΩϟογϡϑΝΠϧʹอଘ
    ෳ਺ͷϓϩμΫτPSฒྻԽͰڞ௨Խͤ͞Δͱޮ཰త
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ
    ࣮ߦॱ
    ΩϟογϡϑΝΠϧΛ࢖ͬͯաڈͷ݁ՌΛ࢖͍ճͤΔ
    ෳ਺όονͰΩϟογϡΛڞ௨Խ͢ΔͱɺλεΫͷ࠶࣮ߦΛආ͚ΒΕΔ

    View Slide

  7. ໰୊ಉ͡ΩϟογϡΛૢ࡞͠Α͏ͱ͢Δͱڝ߹͢ΔՄೳੑ͕͋Δ
    ్தϑΝΠϧ͕ಡΈऔΕͨΓɺফ͑ͯͨΓͯ͠ࠔΔ
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ
    Ωϟογϡ"
    ಉ͡ΩϟογϡΛಉ࣌ʹॻ͖ࠐ΋͏ͱͨ͠Βɺ

    Ωϟογϡ͕ڝ߹ͯ͠͠·ͬͨɻɻɻ

    View Slide

  8. ΩϟογϡΛϩοΫ͢ΔػೳΛ։ൃ
    ॱ൪ʹ࣮ߦ͢Δ͜ͱͰɺΩϟογϡ͕ڝ߹͠ͳ͘ͳͬͨ
    ΩϟογϡಡΈॻ͖࣌ʹϩοΫΛऔΓɺͭͷδϣϒ͔Β͔͠ΞΫηεͰ͖ͳ͍Α͏ʹ͢Δ
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ

    View Slide

  9. ΩϟογϡΛϩοΫ͢ΔػೳΛ։ൃ
    ॱ൪ʹ࣮ߦ͢Δ͜ͱͰɺΩϟογϡ͕ڝ߹͠ͳ͘ͳͬͨ
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ
    ϩοΫͯ͠ॻ͖ࠐΈ
    ΩϟογϡಡΈॻ͖࣌ʹϩοΫΛऔΓɺͭͷδϣϒ͔Β͔͠ΞΫηεͰ͖ͳ͍Α͏ʹ͢Δ

    View Slide

  10. ΩϟογϡΛϩοΫ͢ΔػೳΛ։ൃ
    ॱ൪ʹ࣮ߦ͢Δ͜ͱͰɺΩϟογϡ͕ڝ߹͠ͳ͘ͳͬͨ
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ
    ׬ྃޙϩοΫΛղআ
    ΩϟογϡಡΈॻ͖࣌ʹϩοΫΛऔΓɺͭͷδϣϒ͔Β͔͠ΞΫηεͰ͖ͳ͍Α͏ʹ͢Δ

    View Slide

  11. ΩϟογϡΛϩοΫ͢ΔػೳΛ։ൃ
    ॱ൪ʹ࣮ߦ͢Δ͜ͱͰɺΩϟογϡ͕ڝ߹͠ͳ͘ͳͬͨ
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ
    ϩοΫͯ͠ಡΈࠐΈ
    ΩϟογϡಡΈॻ͖࣌ʹϩοΫΛऔΓɺͭͷδϣϒ͔Β͔͠ΞΫηεͰ͖ͳ͍Α͏ʹ͢Δ

    View Slide

  12. ΩϟογϡΛϩοΫ͢ΔػೳΛ։ൃ
    ॱ൪ʹ࣮ߦ͢Δ͜ͱͰɺΩϟογϡ͕ڝ߹͠ͳ͘ͳͬͨ
    όον όον
    λεΫ" λεΫ"
    Ωϟογϡ"
    ґଘ ґଘ
    ΩϟογϡಡΈॻ͖࣌ʹϩοΫΛऔΓɺͭͷδϣϒ͔Β͔͠ΞΫηεͰ͖ͳ͍Α͏ʹ͢Δ

    View Slide

  13. ໰୊ॱ൪ʹ࣮ߦ͢ΔͷͰ஗͘ͳΔ͕࣌͋Δ
    ฒྻʹσʔλΛಡΈऔΔͱौ଺ʹΑΓ஗Ԇ͢Δ৔߹͕͋ͬͨ
    ࣌ؒ
    ϩ
    Ϋ
    ղ

    ϩ
    Ϋ
    ղ

    ϩ
    Ϋ
    ղ

    όον
    όον
    όον
    ଴ͭ
    ଴ͭ
    ಡΈࠐΈ
    ಡΈࠐΈ
    ಡΈࠐΈ
    ฒྻͰಈ͔ͨ͠όον͕ଞΛͻͨ͢Β଴ͬͯͯ஗͍
    ε
    λ
    τ

    View Slide

  14. ৽ϩοΫΛ։ൃॻ͖ࠐΈ͸࣮ߦதϩοΫɺಡΈࠐΈ͸௚લʹҰॠϩοΫ
    େྔʹฒྻͯ͠ಡΈऔΔ৔߹ͷौ଺͕ղফ͞Εͨ
    ಡΈऔΓ࠷தͣͬͱϩοΫ͢ΔͷͰ͸ͳ͘ɺ௚લʹҰॠ͚ͩϩοΫ͢ΔΑ͏ʹมߋͨ͠
    ࣌ؒ
    ϩ
    Ϋ
    ղ

    όον
    όον
    όον
    ಡΈࠐΈ
    ϩ
    Ϋ
    ղ

    ಡΈࠐΈ
    ϩ
    Ϋ
    ղ

    ಡΈࠐΈ
    ଴ͭ
    ଴ͭ
    ಡΈࠐΈΛฒྻʹ࣮ߦͰ͖ɺ
    ଴ͪ࣌ؒΛ୹ॖ
    ε
    λ
    τ

    View Slide

  15. ͳͥಡΈऔΓ௚લʹҰॠϩοΫ͕ඞཁ͔ʁ
    ॻ͖ࠐΈϩοΫ͕औΒΕ͍ͯͳ͍͜ͱΛ֬ೝ͢ΔͨΊ
    ॻ͖ࠐΈதʹಡΈऔΓΛ։࢝͠ͳ͍Α͏ʹ͢ΔͨΊ
    ࣌ؒ
    όον
    όον
    όον
    ϩ
    Ϋ
    ղ

    ಡΈࠐΈ
    ϩ
    Ϋ
    ղ

    ಡΈࠐΈ
    ଴ͭ
    ଴ͭ ॻ͖ࠐΈ׬ྃ·Ͱ

    ಡΈऔΓ͸଴ͭ
    ϩ
    Ϋ
    ղ

    ॻ͖ࠐΈ

    View Slide

  16. ಡΈࠐΈதʹॻ͖ࠐΉͱ͓͔͘͠ͳΔΜ͡Όʁ
    HPLBSUͷϢʔεέʔεͰ͸͜ͷࣄ৅͸ൃੜ͠ͳ͍
    ಡΈऔΓதʹଞόον͕ಉ͡ΩϟογϡΛॻ͖ࠐΉͱɺϑΝΠϧ͕ഁଛ͢Δʁ
    ˠHPLBSUͰ͸͜ͷঢ়گ͸ൃੜ͠ͳ͍ͷͰηʔϑ
    ࣌ؒ
    όον
    όον
    ϩ
    Ϋ
    ղ

    ಡΈࠐΈ
    ಡΈऔΓ͕ߦΘΕ͍ͯΔ࣌͸Ωϟογϡ͕͋Δ

    ˠॻ͖ࠐΈ͸ൃੜ͠ͳ͍
    ϩ
    Ϋ
    ղ

    ॻ͖ࠐΈ

    View Slide

  17. ͨͩ͠ɺΩϟογϡΛ࡟আ͢Δͱ͓͔͘͠ͳΔ
    SFSVOͱϩοΫػೳͷซ༻͸΍ΊΑ͏
    SFSVO͸ΩϟογϡΛ࡟আ͢ΔͷͰಡΈࠐΈʹӨڹΛ༩͑ΔՄೳੑ͕͋Δ
    ࣌ؒ
    όον
    όον
    ϩ
    Ϋ
    ղ

    ಡΈࠐΈ
    SFSVO͢ΔͱΩϟογϡΛ࡟আͯ͠͠·͏
    ϩ
    Ϋ
    ղ

    ࡟আ

    View Slide

  18. ڞ༗ϩοΫͱઐ༗ϩοΫͷߟ͑ํʹྨࣅ
    ݹ͔͘Β͋Δख๏͚ͩͲɺHPLBSUͷϢʔεέʔεͰ͸े෼༗ޮ
    w Πϊγγຊʢσʔλࢦ޲ΞϓϦέʔγϣϯσβΠϯʣͰ΋
    ঺հ͞Ε͍ͯΔʮڞ༗ϩοΫʯʮઐ༗ϩοΫʯ
    w ݹ͔͘Β͋Δख๏͕ͩɺݫີੑͱ଎౓ͷτϨʔυΦϑΛߟ
    ྀ͢ΔͱHPLBSUͷϢʔεέʔεʹ͸Ϛον͍ͯ͠Δ
    w ى͜Γ͏ΔࣄଶΛ૝ఆͨ͠σʔλγεςϜͷઃܭ͕ॏཁ
    w ྠಡձ΍ͬͯ·ͨ͠ʂʂ

    View Slide

  19. ࢖͍ํ
    ˡৄࡉ͸HPLBSUͷυΩϡϝϯτΛࢀর͍ͩ͘͞ʂ
    ϩοΫ༻ͷαʔόʔʢ3FEJTʣΛཱͯͯɺDPO
    fi
    Hʹ3FEJTͷઃఆΛ௥ه
    ϩοΫͷઃఆΛ௥ه

    View Slide

  20. ·ͱΊ
    w HPLBSUΩϟογϡ͕ڝ߹͢ΔՄೳੑΛ঺հ
    w ڝ߹ʴौ଺ճආʹڞ༗ϩοΫͷΑ͏ͳϩοΫػೳΛ࣮૷
    ࢖͍ํ͸HPLBSUͷυΩϡϝϯτΛࢀর͍ͩ͘͞ʂ
    ΤϜεϦʔͰͷ࢓ࣄʹগ͠Ͱ΋ڵຯΛ࣋ͬͨΒʂ
    ΧδϡΞϧ໘ஊ͓଴͍ͪͯ͠·͢ʂ

    View Slide