Inside mbga Open Platform
 - Gadget Server -
        Hideo Kimura
           DeNA
About Me
About Me
•
About Me
•
• DeNA
About Me
•
• DeNA
 •
About Me
•
• DeNA
  •
• hidek, hide-k, hideki
About Me
•
• DeNA
  •
• hidek, hide-k, hideki
• http://blog.hide-k.net/
About Me
•
• DeNA
  •
• hidek, hide-k, hideki
• http://blog.hide-k.net/
• twitter: @hidek
About Me
•
• DeNA
  •
• hidek, hide-k, hideki
• http://blog.hide-k.net/
• twitter: @hidek
About Me
•
• DeNA
  •
• hidek, hide-k, hideki
• http://blog.hide-k.net/
• twitter: @hidek
Agenda
Agenda
• MBGA Open Platform
Agenda
• MBGA Open Platform
• Gadget Server
Agenda
• MBGA Open Platform
• Gadget Server
•
Agenda
• MBGA Open Platform
• Gadget Server
•
•
Agenda
• MBGA Open Platform
• Gadget Server
•
•
•
MBGA Open Platform
MBGA Open Platform
•
MBGA Open Platform
•

• OpenSocial 0.9
MBGA Open Platform
•

• OpenSocial 0.9
•
MBGA Open Platform
MBGA Open Platform
• 2009/08/01
MBGA Open Platform
• 2009/08/01
• 2009/11/24
MBGA Open Platform
• 2009/08/01
• 2009/11/24
• 2010/01/27
OpenSocial
OpenSocial
• Social Network
  (Container)      API
OpenSocial
• Social Network
  (Container)      API
OpenSocial
OpenSocial
•    HTML + JavaScript
OpenSocial
•    HTML + JavaScript

•
OpenSocial
•    HTML + JavaScript

•
•    …
OpenSocial
•    HTML + JavaScript

•
•    …
OpenSocial
•             HTML + JavaScript

•
•            …



• RESTful protocol + Proxy request
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Architecture


         Gadget    API     Partner
User
         Server   Server   Server
Gadget Server
Gadget Server
•      /
Gadget Server
•          /

    •
Gadget Server
•                  /

    •
    •   OAuth Signed Request
Gadget Server
•                  /

    •
    •   OAuth Signed Request

    •   Access Token
Gadget Server
•                  /

    •
    •   OAuth Signed Request

    •   Access Token

    •
Hermit
Hermit
Hermit
Hermit
• Perl / PSGI / Plack
Hermit
• Perl / PSGI / Plack
• Pluggable
PSGI / Plack
PSGI / Plack
• Web Application
PSGI / Plack
• Web Application
 •   Dispatcher     Catalyst
PSGI / Plack
• Web Application
    •   Dispatcher   Catalyst

•
PSGI / Plack
• Web Application
    •   Dispatcher          Catalyst

•
    •   Plack::Handler::*
PSGI / Plack
• Web Application
    •   Dispatcher          Catalyst

•
    •   Plack::Handler::*

    •   Starman
PSGI / Plack
PSGI / Plack
• lighttpd + Plack::(Server)::FCGI
PSGI / Plack
• lighttpd + Plack::(Server)::FCGI
• 300 process / server
PSGI / Plack
• lighttpd + Plack::(Server)::FCGI
• 300 process / server
• 5,500,000 - 6,000,000 req / day / server
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
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
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
Pluggable
Pluggable
• Plagger like
Pluggable
• Plagger like
  •   Class::Trigger
Pluggable
• Plagger like
    •   Class::Trigger

•
Pluggable
• Plagger like
    •   Class::Trigger

•
    •   easy to extend
Pluggable
• Plagger like
    •   Class::Trigger

•
    •   easy to extend

    •   easy to maintain
Pluggable
• Plagger like
    •   Class::Trigger

•
    •   easy to extend

    •   easy to maintain

    •   easy to test
Pluggable
auth* / modify headers / publish token

         Plugin::Request


                                         error handling
             Context                     req/req management



        Plugin::Response
  modify contents / modify headers
Other Modules
Other Modules
•   Text::MicroTemplate
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID

•   OAuth::Lite
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID

•   OAuth::Lite

•   HTML::Filter::Callbacks
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID

•   OAuth::Lite

•   HTML::Filter::Callbacks

•   DBIx::DBHResolver
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID

•   OAuth::Lite

•   HTML::Filter::Callbacks

•   DBIx::DBHResolver

•   Log::Dispatch
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID

•   OAuth::Lite

•   HTML::Filter::Callbacks

•   DBIx::DBHResolver

•   Log::Dispatch

•   Test::TCP
Other Modules
•   Text::MicroTemplate

•   HTTP::MobileAgent

•   HTML::StickyQuery::DoCoMoGUID

•   OAuth::Lite

•   HTML::Filter::Callbacks

•   DBIx::DBHResolver

•   Log::Dispatch

•   Test::TCP

•   etc ...
Other things
Other things
• Sandbox
Other things
• Sandbox
 •          =
Other things
• Sandbox
 •          =

 •
Other things
• Sandbox
 •          =

 •
 •   PC
Other things
• Sandbox
 •          =

 •
 •   PC

 •
Other things
Other things
• CDN
Other things
• CDN
 •                     CDN
Other things
• CDN
 •                      CDN



     •    DeNA
Other things
• CDN
 •                          CDN



     •       DeNA

 •                       nocache=1
     Query String   OK
Tough Days
Tough Days
•
Tough Days
•
    •   11   24            11
Tough Days
•
    •   11   24            11



        •
Tough Days
•
    •   11   24            11



        •
    •   Plack++
Tough Days
Tough Days
•
Tough Days
•
    •    CPU
Tough Days
•
    •        CPU

        •
Tough Days
•
    •             CPU

        •
    •   Devel::NYTProf++
Tough Days
•
    •              CPU

        •
    •   Devel::NYTProf++

    •   Unix::Getrusage++
Tough Days
•
    •              CPU

        •
    •   Devel::NYTProf++

    •   Unix::Getrusage++

    •   Hyper-Threading++ (?)
Tough Days
•
    •   lighttpd

        •   unexpected end-of-file (perhaps the fastcgi process
            died):...
            response not received, request sent:...

        •   lighttpd 1.4.22 -> 1.4.26
Current Issue
Current Issue
• FCGI
Current Issue
• FCGI
 •
Current Issue
• FCGI
 •
 •   Reverse proxy
Current Issue
• FCGI
 •
 •   Reverse proxy

     •   Starman
Current Issue
• FCGI
 •
 •   Reverse proxy

     •   Starman

 •
Current Issue
Current Issue
• Network
Current Issue
• Network
 •          (5   )=
Current Issue
• Network
 •          (5   )=

 •                    (3   )
Current Issue
• Network
 •           (5   )=

 •                       (3   )

     •
Current Issue
• Network
 •           (5   )=

 •                       (3   )

     •
 •
Current Issue
Current Issue
• Network
Current Issue
• Network
 •   TCP listen backlog overflow
Current Issue
• Network
 •   TCP listen backlog overflow
     •   net.ipv4.tcp_max_syn_backlog (def: 1024)
Current Issue
• Network
 •   TCP listen backlog overflow
     •   net.ipv4.tcp_max_syn_backlog (def: 1024)

     •   net.core.somaxconn (def: 128)
Current Issue
• Network
 •   TCP listen backlog overflow
     •   net.ipv4.tcp_max_syn_backlog (def: 1024)

     •   net.core.somaxconn (def: 128)

 •   lighttpd
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)) {
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
Future
Future
•
Future
•

    •        ?
Future
•

    •                    ?

        •   xAuth
Future
Future
• OpenSocial 1.0
Future
• OpenSocial 1.0
• Template
Future
• OpenSocial 1.0
• Template
 •   API
Future
• OpenSocial 1.0
• Template
 •   API

 •
Future
• OpenSocial 1.0
• Template
 •   API

 •
 •   OpenSocial Templates ?
Future


       Gadget    API     Partner
User
       Server   Server   Server
Future


       Gadget    API     Partner
User
       Server   Server   Server
Future


       Gadget    API     Partner
User
       Server   Server   Server
Future


       Gadget    API     Partner
User
       Server   Server   Server
Future


       Gadget    API     Partner
User
       Server   Server   Server
Future


       Gadget    API     Partner
User
       Server   Server   Server
Future


       Gadget    API     Partner
User
       Server   Server   Server
Conclusion
Conclusion
• Plack
Conclusion
• Plack
•
Conclusion
• Plack
•

•
Thank You

More Related Content

PPT
Desperately seeking a lightweight Perl framework
PDF
Web Clients for Ruby and What they should be in the future
PPTX
Expect the unexpected: Anticipate and prepare for failures in microservices b...
PDF
JavaOne 2014 BOF4241 What's Next for JSF?
PPTX
Java EE 8
PPTX
Why jakarta ee matters (ConFoo 2021)
PDF
XML and Web Services with Groovy
PPT
Web Development Environments: Choose the best or go with the rest
Desperately seeking a lightweight Perl framework
Web Clients for Ruby and What they should be in the future
Expect the unexpected: Anticipate and prepare for failures in microservices b...
JavaOne 2014 BOF4241 What's Next for JSF?
Java EE 8
Why jakarta ee matters (ConFoo 2021)
XML and Web Services with Groovy
Web Development Environments: Choose the best or go with the rest

What's hot (20)

PPTX
PHP on IBM i Tutorial
PPT
Succeding with the Apache SOA stack
PDF
20191119 Cloud Native Java : GraalVM
PDF
Performance tuning with zend framework
PDF
Nuts and Bolts of WebSocket Devoxx 2014
PPTX
Servlet 4.0 at GeekOut 2015
PDF
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
PDF
DB2 and PHP in Depth on IBM i
PDF
What's next for Java API for WebSocket (JSR 356)
PDF
Grizzly 20080925 V2
PDF
Modern web application development with java ee 7
ODP
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
PDF
Javantura 2014 - Java 8 JavaScript Nashorn
PDF
Code for Startup MVP (Ruby on Rails) Session 1
PDF
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
PDF
Modular Java applications with OSGi on Apache Karaf
PPT
Data Persistence as a Language Feature
KEY
Zend_Tool: Practical use and Extending
PPTX
Java EE 8 Update
PDF
PHP on IBM i Tutorial
Succeding with the Apache SOA stack
20191119 Cloud Native Java : GraalVM
Performance tuning with zend framework
Nuts and Bolts of WebSocket Devoxx 2014
Servlet 4.0 at GeekOut 2015
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
DB2 and PHP in Depth on IBM i
What's next for Java API for WebSocket (JSR 356)
Grizzly 20080925 V2
Modern web application development with java ee 7
HTTP, JSON, JavaScript, Map&Reduce built-in to MySQL
Javantura 2014 - Java 8 JavaScript Nashorn
Code for Startup MVP (Ruby on Rails) Session 1
GR8Conf 2009: Groovy in Fiance Case Study by Jonathan Felch
Modular Java applications with OSGi on Apache Karaf
Data Persistence as a Language Feature
Zend_Tool: Practical use and Extending
Java EE 8 Update
Ad

Viewers also liked (20)

PPT
Play With Theschwartz
PPT
Benchmarks of Perl Web Application Frameworks
PPT
CGI::Application::Dispatch
KEY
Modern Catalyst
PPT
Catalyst::Model::Adaptor
PDF
Webエンジニアが学ぶ自動運転を支える技術
PPT
Mastering CGI::Application
PPTX
Perl で作るメディアストリーミングサーバー
PDF
Filesystem via MySQL
PDF
2016 Gartner NA Events
PPTX
Punto vive digital
PDF
Comment tirer profit du web et des médias sociaux et obtenir des résultats
PDF
Where are you taking it
PPTX
Métodos y técnicas de investigación
PPTX
η σαμοθρακη1
PPTX
Letter names quiz
PDF
Io 247 page 1
PPTX
Universidad central del ecuador l'expression de la comparaison
PPSX
CIFO La Violeta. Curso de ofimática.
ODP
Experiencia 10
Play With Theschwartz
Benchmarks of Perl Web Application Frameworks
CGI::Application::Dispatch
Modern Catalyst
Catalyst::Model::Adaptor
Webエンジニアが学ぶ自動運転を支える技術
Mastering CGI::Application
Perl で作るメディアストリーミングサーバー
Filesystem via MySQL
2016 Gartner NA Events
Punto vive digital
Comment tirer profit du web et des médias sociaux et obtenir des résultats
Where are you taking it
Métodos y técnicas de investigación
η σαμοθρακη1
Letter names quiz
Io 247 page 1
Universidad central del ecuador l'expression de la comparaison
CIFO La Violeta. Curso de ofimática.
Experiencia 10
Ad

Similar to Inside Of Mbga Open Platform (20)

KEY
PSGI/Plack OSDC.TW
PDF
Hacking on OpenStack\'s Nova source code
PDF
Cosug 2012-lzy
KEY
Plack at YAPC::NA 2010
KEY
Plack perl superglue for web frameworks and servers
KEY
Deploying Plack Web Applications: OSCON 2011
PDF
Zotonic presentation Erlang Camp Boston, august 2011
PPTX
Integrating OpenStack To Existing Infrastructure
PDF
rOCCI : An overview of the Ruby OCCI Framework
KEY
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
PDF
Nginx Internals
KEY
Plack at OSCON 2010
PDF
App Engine Dev Days DC 20091026
PDF
Plack basics for Perl websites - YAPC::EU 2011
PDF
Network concepts
PDF
PDF
Python Load Testing - Pygotham 2012
PDF
Python - A Comprehensive Programming Language
PDF
ソーシャルアプリ向けシステム監視運用の勘所
PDF
Memonic Architecture
PSGI/Plack OSDC.TW
Hacking on OpenStack\'s Nova source code
Cosug 2012-lzy
Plack at YAPC::NA 2010
Plack perl superglue for web frameworks and servers
Deploying Plack Web Applications: OSCON 2011
Zotonic presentation Erlang Camp Boston, august 2011
Integrating OpenStack To Existing Infrastructure
rOCCI : An overview of the Ruby OCCI Framework
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Nginx Internals
Plack at OSCON 2010
App Engine Dev Days DC 20091026
Plack basics for Perl websites - YAPC::EU 2011
Network concepts
Python Load Testing - Pygotham 2012
Python - A Comprehensive Programming Language
ソーシャルアプリ向けシステム監視運用の勘所
Memonic Architecture

Inside Of Mbga Open Platform