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

Preferences as a Service - for mobile apps and ...

Preferences as a Service - for mobile apps and microservices

Avatar for Masayuki Izumi

Masayuki Izumi

April 19, 2018
Tweet

More Decks by Masayuki Izumi

Other Decks in Programming

Transcript

  1. ©2018 Wantedly, Inc. Preferences as a Service for mobile applications

    and microservices potatotips #50 18.Apr.2018 - izumin5210
  2. ©2018 Wantedly, Inc. $ whoami a.k.a. usamimi engineer izumin5210 Engineer

    at Wantedly, Inc. Wantedly People ‣ Web Application Engineer - Profile Data Strategy Group ‣ Interests in developer productivity on microservices Gopher, Rubyist, JavaScripter and Androider
  3. ©2018 Wantedly, Inc. Preferences How do you manage "preferences"? Preferences

    Ͳ͏΍࣮ͬͯ૷͠·͔͢ ‣ A1SFGFSFODF'SBHNFOUA A1SFGFSFODF"DUJWJUZAతͳ  ӈͷεΫγϣ͸A3FDZDMFS7JFXAͩͬͨ  ݟͨ໨ͷ࣮૷͸͍Ζ͍Ζ ‣ ͡Ό͋಺෦ͷ࣮૷͸ʁ  A4IBSFE1SFGFSFODFA   3FBMNʁ  'JSFCBTF3FNPUF$POpH
  4. ©2018 Wantedly, Inc. Preferences How do you manage "preferences"? Preferences

    In Wantedly People ‣ αʔόଆͷڍಈʹӨڹ͢Δ΋ͷ΋ଟ͍  ϓϥΠόγઃఆͱ͔  ϩʔΧϧ͚ͩʹอଘ͢Δͱ͍͏બ୒͸ͱΕͳ͍ ‣ ͡Ό͋Ͳ͏ͯ͠Δʁ  ࣗલͰαʔόͷ࣮૷ॻ͍ͨ
  5. ©2018 Wantedly, Inc. ຖճࣗલͰαʔόͷ࣮૷ॻ͍ͯͨ ਖ਼௚͠ΜͲ͍ ‣ ΞϓϦͷ਺ʹԠͯ͡ઃఆ஋ͷछྨ΋૿͍͑ͯ͘ ‣ ͍͍ͩͨʮͦͷΞϓϦ͕ϝΠϯͰ৮Δαʔόʯʹ
 ࣮૷͞ΕΔ

     ΞϓϦΤϯδχΞ͸αʔόͷ࣮૷Λ଴ͭ  ͭΒ͍ ͭΒ͍ ΄ΜͱʹͭΒ͍ { "foo_privacy_status": "private", "bar_privacy_status": "friend_of_friend" }
  6. ©2018 Wantedly, Inc. ຖճࣗલͰαʔόͷ࣮૷ॻ͍ͯͨ ਖ਼௚͠ΜͲ͍ ‣ ΞϓϦͷ਺ʹԠͯ͡ઃఆ஋ͷछྨ΋૿͍͑ͯ͘ ‣ ͍͍ͩͨʮͦͷΞϓϦ͕ϝΠϯͰ৮Δαʔόʯʹ
 ࣮૷͞ΕΔ

    ‣ ʮ˓˓ΞϓϦͱઃఆڞ༗͍ͨ͠ʂʯ ‣ ղಡࠔ೉ͳαʔϏεґଘؔ܎ͷग़དྷ্͕Γ ͭΒ͍ ΄ΜͱʹͭΒ͍ { "foo_privacy_status": "private", "bar_privacy_status": "friend_of_friend" }
  7. ©2018 Wantedly, Inc. { "options": [ { "key": "people.sns_privacy_status_cd", "type":

    "SINGLE_SELECTION", "name": "ソーシャル連携の公開範囲", "description": "", "single_selection": { "value": 2, "selects": [ { "key": "friends_of_friends", "value": 2, "name": "友達の友達まで" }, { "key": "wantedly_users", "value": 3, "name": "Wantedly登録ユーザ" }, { "key": "everyone", "value": 4, "name": "一般公開" } ] } } ] }
  8. ©2018 Wantedly, Inc. { "options": [ { "key": "people.sns_privacy_status_cd", "type":

    "SINGLE_SELECTION", "name": "ソーシャル連携の公開範囲", "description": "", "single_selection": { "value": 2, "selects": [ { "key": "friends_of_friends", "value": 2, "name": "友達の友達まで" }, { "key": "wantedly_users", "value": 3, "name": "Wantedly登録ユーザ" }, { "key": "everyone", "value": 4, "name": "一般公開" } ] } } ] }
  9. ©2018 Wantedly, Inc. { "options": [ { "key": "people.sns_privacy_status_cd", "type":

    "SINGLE_SELECTION", "name": "ソーシャル連携の公開範囲", "description": "", "single_selection": { "value": 2, "selects": [ { "key": "friends_of_friends", "value": 2, "name": "友達の友達まで" }, { "key": "wantedly_users", "value": 3, "name": "Wantedly登録ユーザ" }, { "key": "everyone", "value": 4, "name": "一般公開" } ] } } ] }
  10. ©2018 Wantedly, Inc. { "options": [ { "key": "people.sns_privacy_status_cd", "type":

    "SINGLE_SELECTION", "name": "ソーシャル連携の公開範囲", "description": "", "single_selection": { "value": 2, "selects": [ { "key": "friends_of_friends", "value": 2, "name": "友達の友達まで" }, { "key": "wantedly_users", "value": 3, "name": "Wantedly登録ユーザ" }, { "key": "everyone", "value": 4, "name": "一般公開" } ] } } ] }
  11. ©2018 Wantedly, Inc. ೚ҙͷઃఆ஋Λฦ͢αʔό ‣ 7JFXʹͦͷ··ϚοϓͰ͖ΔܗͰ͔͑ͬͯ͘Δ ‣ ͦΕͬΆ͘ଟݴޠରԠ΋͞ΕΔ ‣ ৽͘͠ΞϓϦͭͬͨ͘ͱ͖ʹɼ


    ৽͍͠ઃఆը໘༻ͷ"1*ॻ͔ͳ͍͍ͯ͘ʂ options Preferences as a Service { "options": [ { "key": "people.sns_privacy_status_cd", "type": "SINGLE_SELECTION", "name": "ソーシャル連携の公開範囲", "description": "", "single_selection": { "value": 2, "selects": [ { "key": "friends_of_friends", "value": 2, "name": "友達の友達まで" }, { "key": "wantedly_users", "value": 3, "name": "Wantedly登録ユーザ" }, { "key": "everyone", "value": 4, "name": "一般公開" } ] } } ] }
  12. ©2018 Wantedly, Inc. ͳͥࣗલʁ ‣ 8BOUFEMZ1FPQMF͸ϚΠΫϩαʔϏε ‣ ΠϯλʔφϧͳαʔϏε͔Β΋ࢀর͔ͨͬͨ͠  'JSFCBTFͱ͔ͩͱҰ୴֎ʹग़ͪΌ͏

    ‣ ઃఆ஋΋ΧδϡΞϧʹ௥Ճɾมߋ͍ͨ͠  ࣗ෼͕ͨͪ࢖͍΍͍͢ΧςΰϥΠζػೳ options Preferences as a Service { "options": [ { "key": "people.sns_privacy_status_cd", "type": "SINGLE_SELECTION", "name": "ソーシャル連携の公開範囲", "description": "", "single_selection": { "value": 2, "selects": [ { "key": "friends_of_friends", "value": 2, "name": "友達の友達まで" }, { "key": "wantedly_users", "value": 3, "name": "Wantedly登録ユーザ" }, { "key": "everyone", "value": 4, "name": "一般公開" } ] } } ] }
  13. ©2018 Wantedly, Inc. ΞϓϦΛ·͙ͨઃఆ஋͸ࣗ෼Ͱαʔόॻ͘ͱศར w ͋ͨΓ·͑ w ΠϯλʔφϧͳαʔϏεͱ͔Ͱ΋ར༻Ͱ͖Δ ઃఆ஋ͳΜܾͯ·ͬͨܗ͔͠ͳ͍ w

    DIFDLCPY TJOHMFNVMUJQMFWBMVF TJOHMFNVMUJQMFTFMFDUJPO w όϦΤʔγϣϯ͸ଟ͘ͳ͍Μ͔ͩΒɼ൚༻ੑΛ΋ͨͤΔͱޙͰָͰ͖Δ ंྠͷ࠶։ൃΛڪΕͣɼ࠷దͳٕज़બ୒Λ ·ͱΊ