Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Inside Of Mbga Open Platform

  • Be the first to comment

Inside Of Mbga Open Platform

  1. 1. Inside mbga Open Platform - Gadget Server - Hideo Kimura DeNA
  2. 2. About Me
  3. 3. About Me •
  4. 4. About Me • • DeNA
  5. 5. About Me • • DeNA •
  6. 6. About Me • • DeNA • • hidek, hide-k, hideki
  7. 7. About Me • • DeNA • • hidek, hide-k, hideki • http://blog.hide-k.net/
  8. 8. About Me • • DeNA • • hidek, hide-k, hideki • http://blog.hide-k.net/ • twitter: @hidek
  9. 9. About Me • • DeNA • • hidek, hide-k, hideki • http://blog.hide-k.net/ • twitter: @hidek
  10. 10. About Me • • DeNA • • hidek, hide-k, hideki • http://blog.hide-k.net/ • twitter: @hidek
  11. 11. Agenda
  12. 12. Agenda • MBGA Open Platform
  13. 13. Agenda • MBGA Open Platform • Gadget Server
  14. 14. Agenda • MBGA Open Platform • Gadget Server •
  15. 15. Agenda • MBGA Open Platform • Gadget Server • •
  16. 16. Agenda • MBGA Open Platform • Gadget Server • • •
  17. 17. MBGA Open Platform
  18. 18. MBGA Open Platform •
  19. 19. MBGA Open Platform • • OpenSocial 0.9
  20. 20. MBGA Open Platform • • OpenSocial 0.9 •
  21. 21. MBGA Open Platform
  22. 22. MBGA Open Platform • 2009/08/01
  23. 23. MBGA Open Platform • 2009/08/01 • 2009/11/24
  24. 24. MBGA Open Platform • 2009/08/01 • 2009/11/24 • 2010/01/27
  25. 25. OpenSocial
  26. 26. OpenSocial • Social Network (Container) API
  27. 27. OpenSocial • Social Network (Container) API
  28. 28. OpenSocial
  29. 29. OpenSocial • HTML + JavaScript
  30. 30. OpenSocial • HTML + JavaScript •
  31. 31. OpenSocial • HTML + JavaScript • • …
  32. 32. OpenSocial • HTML + JavaScript • • …
  33. 33. OpenSocial • HTML + JavaScript • • … • RESTful protocol + Proxy request
  34. 34. Architecture Gadget API Partner User Server Server Server
  35. 35. Architecture Gadget API Partner User Server Server Server
  36. 36. Architecture Gadget API Partner User Server Server Server
  37. 37. Architecture Gadget API Partner User Server Server Server
  38. 38. Architecture Gadget API Partner User Server Server Server
  39. 39. Architecture Gadget API Partner User Server Server Server
  40. 40. Architecture Gadget API Partner User Server Server Server
  41. 41. Architecture Gadget API Partner User Server Server Server
  42. 42. Architecture Gadget API Partner User Server Server Server
  43. 43. Gadget Server
  44. 44. Gadget Server • /
  45. 45. Gadget Server • / •
  46. 46. Gadget Server • / • • OAuth Signed Request
  47. 47. Gadget Server • / • • OAuth Signed Request • Access Token
  48. 48. Gadget Server • / • • OAuth Signed Request • Access Token •
  49. 49. Hermit
  50. 50. Hermit
  51. 51. Hermit
  52. 52. Hermit • Perl / PSGI / Plack
  53. 53. Hermit • Perl / PSGI / Plack • Pluggable
  54. 54. PSGI / Plack
  55. 55. PSGI / Plack • Web Application
  56. 56. PSGI / Plack • Web Application • Dispatcher Catalyst
  57. 57. PSGI / Plack • Web Application • Dispatcher Catalyst •
  58. 58. PSGI / Plack • Web Application • Dispatcher Catalyst • • Plack::Handler::*
  59. 59. PSGI / Plack • Web Application • Dispatcher Catalyst • • Plack::Handler::* • Starman
  60. 60. PSGI / Plack
  61. 61. PSGI / Plack • lighttpd + Plack::(Server)::FCGI
  62. 62. PSGI / Plack • lighttpd + Plack::(Server)::FCGI • 300 process / server
  63. 63. PSGI / Plack • lighttpd + Plack::(Server)::FCGI • 300 process / server • 5,500,000 - 6,000,000 req / day / server
  64. 64. PSGI / Plack • lighttpd + Plack::(Server)::FCGI • 300 process / server • 5,500,000 - 6,000,000 req / day / server • 360,000 - 380,000 req / hour / server
  65. 65. PSGI / Plack • lighttpd + Plack::(Server)::FCGI • 300 process / server • 5,500,000 - 6,000,000 req / day / server • 360,000 - 380,000 req / hour / server • 5
  66. 66. PSGI / Plack • lighttpd + Plack::(Server)::FCGI • 300 process / server • 5,500,000 - 6,000,000 req / day / server • 360,000 - 380,000 req / hour / server • 5 • 2
  67. 67. Pluggable
  68. 68. Pluggable • Plagger like
  69. 69. Pluggable • Plagger like • Class::Trigger
  70. 70. Pluggable • Plagger like • Class::Trigger •
  71. 71. Pluggable • Plagger like • Class::Trigger • • easy to extend
  72. 72. Pluggable • Plagger like • Class::Trigger • • easy to extend • easy to maintain
  73. 73. Pluggable • Plagger like • Class::Trigger • • easy to extend • easy to maintain • easy to test
  74. 74. Pluggable auth* / modify headers / publish token Plugin::Request error handling Context req/req management Plugin::Response modify contents / modify headers
  75. 75. Other Modules
  76. 76. Other Modules • Text::MicroTemplate
  77. 77. Other Modules • Text::MicroTemplate • HTTP::MobileAgent
  78. 78. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID
  79. 79. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID • OAuth::Lite
  80. 80. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID • OAuth::Lite • HTML::Filter::Callbacks
  81. 81. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID • OAuth::Lite • HTML::Filter::Callbacks • DBIx::DBHResolver
  82. 82. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID • OAuth::Lite • HTML::Filter::Callbacks • DBIx::DBHResolver • Log::Dispatch
  83. 83. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID • OAuth::Lite • HTML::Filter::Callbacks • DBIx::DBHResolver • Log::Dispatch • Test::TCP
  84. 84. Other Modules • Text::MicroTemplate • HTTP::MobileAgent • HTML::StickyQuery::DoCoMoGUID • OAuth::Lite • HTML::Filter::Callbacks • DBIx::DBHResolver • Log::Dispatch • Test::TCP • etc ...
  85. 85. Other things
  86. 86. Other things • Sandbox
  87. 87. Other things • Sandbox • =
  88. 88. Other things • Sandbox • = •
  89. 89. Other things • Sandbox • = • • PC
  90. 90. Other things • Sandbox • = • • PC •
  91. 91. Other things
  92. 92. Other things • CDN
  93. 93. Other things • CDN • CDN
  94. 94. Other things • CDN • CDN • DeNA
  95. 95. Other things • CDN • CDN • DeNA • nocache=1 Query String OK
  96. 96. Tough Days
  97. 97. Tough Days •
  98. 98. Tough Days • • 11 24 11
  99. 99. Tough Days • • 11 24 11 •
  100. 100. Tough Days • • 11 24 11 • • Plack++
  101. 101. Tough Days
  102. 102. Tough Days •
  103. 103. Tough Days • • CPU
  104. 104. Tough Days • • CPU •
  105. 105. Tough Days • • CPU • • Devel::NYTProf++
  106. 106. Tough Days • • CPU • • Devel::NYTProf++ • Unix::Getrusage++
  107. 107. Tough Days • • CPU • • Devel::NYTProf++ • Unix::Getrusage++ • Hyper-Threading++ (?)
  108. 108. Tough Days • • lighttpd • unexpected end-of-file (perhaps the fastcgi process died):... response not received, request sent:... • lighttpd 1.4.22 -> 1.4.26
  109. 109. Current Issue
  110. 110. Current Issue • FCGI
  111. 111. Current Issue • FCGI •
  112. 112. Current Issue • FCGI • • Reverse proxy
  113. 113. Current Issue • FCGI • • Reverse proxy • Starman
  114. 114. Current Issue • FCGI • • Reverse proxy • Starman •
  115. 115. Current Issue
  116. 116. Current Issue • Network
  117. 117. Current Issue • Network • (5 )=
  118. 118. Current Issue • Network • (5 )= • (3 )
  119. 119. Current Issue • Network • (5 )= • (3 ) •
  120. 120. Current Issue • Network • (5 )= • (3 ) • •
  121. 121. Current Issue
  122. 122. Current Issue • Network
  123. 123. Current Issue • Network • TCP listen backlog overflow
  124. 124. Current Issue • Network • TCP listen backlog overflow • net.ipv4.tcp_max_syn_backlog (def: 1024)
  125. 125. Current Issue • Network • TCP listen backlog overflow • net.ipv4.tcp_max_syn_backlog (def: 1024) • net.core.somaxconn (def: 128)
  126. 126. Current Issue • Network • TCP listen backlog overflow • net.ipv4.tcp_max_syn_backlog (def: 1024) • net.core.somaxconn (def: 128) • lighttpd
  127. 127. Current Issue • Network • TCP listen backlog overflow • net.ipv4.tcp_max_syn_backlog (def: 1024) • net.core.somaxconn (def: 128) • lighttpd • if (-1 == listen(srv_socket->fd, 128 * 8)) {
  128. 128. Current Issue • Network • TCP listen backlog overflow • net.ipv4.tcp_max_syn_backlog (def: 1024) • net.core.somaxconn (def: 128) • lighttpd • if (-1 == listen(srv_socket->fd, 128 * 8)) { • orz
  129. 129. Future
  130. 130. Future •
  131. 131. Future • • ?
  132. 132. Future • • ? • xAuth
  133. 133. Future
  134. 134. Future • OpenSocial 1.0
  135. 135. Future • OpenSocial 1.0 • Template
  136. 136. Future • OpenSocial 1.0 • Template • API
  137. 137. Future • OpenSocial 1.0 • Template • API •
  138. 138. Future • OpenSocial 1.0 • Template • API • • OpenSocial Templates ?
  139. 139. Future Gadget API Partner User Server Server Server
  140. 140. Future Gadget API Partner User Server Server Server
  141. 141. Future Gadget API Partner User Server Server Server
  142. 142. Future Gadget API Partner User Server Server Server
  143. 143. Future Gadget API Partner User Server Server Server
  144. 144. Future Gadget API Partner User Server Server Server
  145. 145. Future Gadget API Partner User Server Server Server
  146. 146. Conclusion
  147. 147. Conclusion • Plack
  148. 148. Conclusion • Plack •
  149. 149. Conclusion • Plack • •
  150. 150. Thank You

×