RPC framework w 3FNPUF1SPDFEVSF$BMM 31$ w DMJFOU͕ؔݺͼग़͠SFNPUFTFSWFS্Ͱؔݺͼग़͕͠ॲཧ͞Εͯ݁Ռ͕ฦ͞ΕΔ w )551Λ௨৴ϓϩτίϧͱͯ͠ར༻ w 1SPUPDPM#V⒎FSTΛαʔϏεఆٛʢTFSWFSͰ࣮͞Εͨ ؔͷܕʣͷهड़ʹར༻ H31$ͷެࣜEPDVNFOUΑΓҾ༻
w (PPHMF41%:QSPUPDPM͕ݩʹͳͬͯඪ४Խ w 5SBOTQPSUΛޮԽ͢Δ͍ͭ͘ͷ༏ΕͨػೳଟॏԽɺϔομѹॖɺFUD H31$ͷIJHIQFSGPSNBODFʹߩݙ IUUQTEFWFMPQFSTHPPHMFDPNXFCGVOEBNFOUBMTQFSGPSNBODFIUUQΑΓҾ༻
ίϯύΠϥ + serialization library w *OUFSGBDF%FpOJUJPO-BOHVBHF *%- αʔϏεఆٛΛهड़͢ΔͨΊͷಠࣗݴޠ w *%-ͰαʔϏεఆٛΛهड़͢Δͱɺ1SPUPDPM#V⒎FSTίϯύΠϥʢQSPUPDʣ͕ ޮతͳTFSJBMJ[BUJPOͷҝͷίʔυΛࣗಈੜ w αʔϏεఆٛ"1*4DIFNBͱͯ͠ͷׂΛՌͨ͢ 4DIFNB%SJWFO%FWFMPQNFOUͰߴ͍ੜ࢈ੑΛ࣮ݱՄೳ API Schema = proto ϑΝΠϧ 4FSWFS։ൃ $MJFOU։ൃ
w ݸͷϚΠΫϩαʔϏεͱ௨৴͢Δ߹શମͱͯ͠ͷ֬Ͱ͍ w ݸͷϚΠΫϩαʔϏεͱ௨৴͢Δ߹શମͱͯ͠ͷ֬Ͱ͍ w ࣮ࡍʹUBJMMBUFODZͷد༩Ͱ͘ͳͬͯΔϚΠΫϩαʔϏε͕ଘࡏͨ͠ w ྫଞͷϚΠΫϩαʔϏεͱͷ௨৴MBUFODZ͕ࢧతͳϚΠΫϩαʔϏεͰ BWFSBHFSFTQPOTFUJNFNTʹରͯ͠UJMFSFTQPOTFUJNF͕ NT ϚΠΫϩαʔϏεؒ௨৴ͷUBJMMBUFODZվળ͕ඞཁͱ͞Ε͍ͯͨ ϚΠΫϩαʔϏεʹ͓͚Δ௨৴ latency ͷ
w H31$JOUFSDFQUPSඞཁͳͷࣗಈͰઃఆ w 3VCZPO3BJMTͷΑ͏ͳ)PUSFMPBEJOHػೳΛఏڙ w ։ൃऀɺH31$TFSWJDFDMBTTͷ࣮ʹूதߴ͍ੜ࢈ੑΛ࣮ݱ “servicex-ruby” ͷػೳ $ bundle exec grpc-server handling /grpc.health.v1.Health/Check with #<Method: Grpc::Health::Checker#check> handling /grpc.health.v1.Health/Watch with #<Method: Grpc::Health::Checker(Grpc::Health::V1::Health::Service)#watch> handling /wantedly.users.UserService/ListUsers with #<Method: UsersGrpcService#list_users> . . . gRPC server starting... * Listening on tcp://0.0.0.0:6046 * Environment: development
MJCSBSZ 044 w H31$TFSWFS୯ಠར༻Մೳ w TFSWJDFYHPHSBQJͷਪઃఆ H31$JOUFSDFQUPSΛఏڙ͢Δࣾڞ௨MJCSBSZ Go ͷ gRPC ։ൃڥ (P$POGFSFODF4QSJOH lHSBQJ#VMEJOH+40/"1*TFSWFSXJUIHSQDHBUFXBZGPSNJDSPTFSWJDFTz
ૉૣ͘ಋೖ͠։ൃڥඋΛߦ্ͬͨͰར༻Λ͛ͨ w Ұ෦ͷϚΠΫϩαʔϏεͰH31$Λૉૣ͘ݕূɾಋೖ w ϝϦοτૌٻࣾษڧձͱͱʹಓʹίʔυΛมߋ͠ɺࣾʹΊͨ ͦͷ݁Ռ gRPC ͘ΘΕΔΑ͏ʹͳͬͨ w ଟͷϚΠΫϩαʔϏεͰH31$͕ར༻͞ΕͯύϑΥʔϚϯε͕վળ w ଟͷ։ൃऀ͕H31$Λར༻͢ΔࣄͰɺ৫શମͱͯ͠։ൃੜ࢈ੑ্͕ ·ͱΊ