際際滷

際際滷Share a Scribd company logo
Web                                   mixi




Copyright 2009 ? mixi,Inc. All right reserved.          1
??
               C?
                       ??
               C? Google API Expert (OpenSocial)
               C? Mashup Award 3rd




Copyright 2009 ? mixi,Inc. All right reserved.     2
?? mixi
       ??
       ??
       ??                                mixi
       ??




Copyright 2009 ? mixi,Inc. All right reserved.   3
?? Perl




Copyright 2009 ? mixi,Inc. All right reserved.   4
mixi




Copyright 2009 ? mixi,Inc. All right reserved.          5
mixi, Inc
                                                 	


Copyright 2009 ? mixi,Inc. All right reserved.                    6
mixi Platform




           ^mixi         ̄                        ^mixi      ̄ Web   ^mixi ̄
                                                                     ID PW


           2009                                                    2008 8 20
           mixi             PC                                          -OpenID ver2.0
                                                         -OAuth
                                                                        -mixi
                   -OpenSocial




Copyright 2009 ? mixi,Inc. All right reserved.                                           7
Copyright 2009 ? mixi,Inc. All right reserved.   8
Community API
                                                              Person & Friends API




          Persistence API
                                                                          gadgets. io API




                                                 Albums API
                Invite API
                                                                 Activities API

Copyright 2009 ? mixi,Inc. All right reserved.                                              9
mixi



       ??
               C?                                    231

               C? 1                                        -           (   )
                       ?? User : 395,598
               C? 2                                            (               )
                       ?? User : 218,529
               C? 3                              (                 )
                       ?? User : 163,740


Copyright 2009 ? mixi,Inc. All right reserved.                                     10
Invite
                                                 	




Copyright 2009 ? mixi,Inc. All right reserved.        11
Copyright 2009 ? mixi,Inc. All right reserved.   12
OpenSocial




                                                 OpenSocial v0.8.1
                                                            mixi     API



Copyright 2009 ? mixi,Inc. All right reserved.                             13
mixi                           OpenSocial




               mixi     (PC      )                 mixi       (           )
                   (OpenSocial JavaScript API)            (OpenSocial RESTful Protocol)




Copyright 2009 ? mixi,Inc. All right reserved.                                            14
mixi                           PC


                    mixi                    	

           <?xml version=^1.0 ̄ encoding=^utf-8 ̄?>
           <Module>
            <ModulePrefs title=^Hello, world! ̄>
                                                    Gadget XML
             <Require feature=^opensocial-0.8 ̄ />
            </ModulePrefs>
            <Content type=^html ̄><![CDATA[          Person & Friends API
           <div>Hello, mixi         !</div>

            ]]></Content>
                                                    Activities API
           </Module>

                                                    Persistence API
                 XML + HTML + JavaScript + Flash

                                                    gadgets.io API

                                                    Invite API

                                                    Albums API
Copyright 2009 ? mixi,Inc. All right reserved.                             15
mixi                            PC


                          mixi                         	
                             Web     	

                                                                                            URL
                               <?xml version=^1.0 ̄ encoding=^utf-8 ̄?>
                               <Module>
                                    function init() {
                                <ModulePrefs title=^Hello, world! ̄>
                                      var req = opensocial.newDataRequest();
                                  <Require feature=^opensocial-0.8 ̄ />
                                      req.add(req.newFetchPersonRequest(
                                </ModulePrefs>
                                            opensocial.IdSpec.PersonId.VIEWER),
                                <Content type=^html ̄><![CDATA[
                                            ^viewer ̄);
                                      req.send(function(data) {
                               <div>Hello, mixi       !</div>
                                         var viewer = data.get(^viewer ̄).getData();
                                ]]></Content>something´
                                         // do
                                      }
                               </Module>
                                    }
                                    gadgets.util.registerOnLoadHandler(init);




Copyright 2009 ? mixi,Inc. All right reserved.                                                     16
mixi


                  mixi                    	

          <?xml version=^1.0 ̄ encoding=^utf-8 ̄?>
          <Module>                                  Gadget XML
           <ModulePrefs title=^Hello, world! ̄>
            <Require feature=^opensocial-0.8 ̄ />
           </ModulePrefs>                           Person & Friends API
           <Content type=^url ̄ view=^mobile ̄
                    href=^http://example.com/ ̄ />
          </Module>
                                                    Activities API

                                                    Persistence API
                 HTML + Flash + RESTful API

                                                    Albums API




Copyright 2009 ? mixi,Inc. All right reserved.                             17
mixi




                                                 RESTful Protocol + OAuth

Copyright 2009 ? mixi,Inc. All right reserved.                              18
Gadget XML

                          /                                   	

            <?xml version=^1.0 ̄ encoding=^utf-8 ̄?>
            <Module>
              <ModulePrefs title=^Hello, world! ̄>
                <Require feature=^opensocial-0.8 ̄ />
              </ModulePrefs>
                                                                        PC      	
                 <Content type=^html ̄ view=^home,canvas,profile ̄><![CDATA[
                    <div>Hello, mixi     !</div>
                 ]]></Content>

                 <Content type=^url ̄ view=^mobile ̄ href=^http://foo.com/hello.pl ̄ />

                                                                                     	
            </Module>

Copyright 2009 ? mixi,Inc. All right reserved.                                            19
Copyright 2009 ? mixi,Inc. All right reserved.   20
OpenSocial



       ??
               C? Social Data API
                       ?? /people, /activities, /appdata, JS(opensocial.*)
               C? Gadget API
                       ?? /gadgets/makeRequest, JS(gadgets.*)
               C? Gadget Rendering
                       ?? /gadgets/ifr




Copyright 2009 ? mixi,Inc. All right reserved.                               21
OSS

           ?? Apache Shindig
                 C? Apache Incubator                                         OSS
                 C?           iGoogle                                          	
                 C?                              2007 12 12 	
                 C?               Googler
                 C? Java              PHP                            	




                   Shindig	
 ?-?\	
 ?	
 ?an	
 ?Apache	
 ?incubator	
 ?project	
 ?for	
 ?OpenSocial	
 ?and	
 ?gadgets	
 ?

                                                   http://incubator.apache.org/shindig/	



Copyright 2009 ? mixi,Inc. All right reserved.                                                                             22
OpenSocial




                                                   SNS            	




                                                                           	
                                                 /gadgets/ifr
                                                 /gadgets/makeRequest
                                                 /social/data/people
                                                 /social/data/activities
                                                 /social/data/appdata	



Copyright 2009 ? mixi,Inc. All right reserved.                                  23
mixi Platform


                                                   Main	



                                                     API	
(Perl)	
                                                 /social/data/people
                                                 /social/data/activities
                                                 /social/data/appdata	
                                                                                  	




                                                                      (Java )	
                                                 /gadgets/ifr
                                                 /gadgets/makeRequest


Copyright 2009 ? mixi,Inc. All right reserved.                                         24
API Server


                      API	
(Perl)	
                                                        balancer	
            /social/data/people
            /social/data/activities
            /social/data/appdata	

                                                        apache
                                                        mod_perl	




                                                 memcached	
         MySQL	



Copyright 2009 ? mixi,Inc. All right reserved.                                 25
API Server


                      API	
(Perl)	
                                              RESTful Protocol

            /social/data/people                                         Accept: application/atom+xml
            /social/data/activities                                          Atom Feed/Entry
            /social/data/appdata	
                                      Accept: application/json
                                                                             JSON	

                                                                     Server	
               Handler::People	
                       socialdata.js	
                            people:                                                         Handler::Activity	
                             uri: /social/data/people/{guid}/{selector}
                             handler: People
                            activity:                                                       Handler::AppData	
                             uri: /social/data/activities/{guid}/{appid}/{selector}
                             handler: Activity
                            appdata:
                             uri: /social/data/appdata/{guid}/{appid}/{selector}
                             handler: AppDAta




Copyright 2009 ? mixi,Inc. All right reserved.                                                                    26
Copyright 2009 ? mixi,Inc. All right reserved.   27
?? 8/24 8/31
               C? mixi
               C? API




Copyright 2009 ? mixi,Inc. All right reserved.   28
Shindig



       ?? Shindig
               C? mixi
                       ?? 504


               C? Shindig
                       ??                        close
                               C? OS
                       ??




Copyright 2009 ? mixi,Inc. All right reserved.           29
API


                                                 API	
       ?? API
               C? /social/data/*
                       ?? mixi
                       ??


               C? API
                       ??
                       ?? mixi



Copyright 2009 ? mixi,Inc. All right reserved.           30
API




                                                 mixi Platform   	


Copyright 2009 ? mixi,Inc. All right reserved.                        31
API


                                                         API	
       ??
               C?                                4
                       ?? 1                          2
                       ?? 2                          4


               C?
                       ?? CPU: 100%




Copyright 2009 ? mixi,Inc. All right reserved.                   32
API


                                                 API	
       ?? Devel::NYTProf




Copyright 2009 ? mixi,Inc. All right reserved.           33
API


                                                 API	
       ??
               C?
                       ??
                       ?? DB
                       ??
               C?




Copyright 2009 ? mixi,Inc. All right reserved.           34
mixi



       ??                                                 mixi

                             	
                                        mixi      	




                                        mixi Platform	




                                                                 	

Copyright 2009 ? mixi,Inc. All right reserved.                        35
mixi



       ??                                        mixi
               C? mixi Platform
               C? mixi
               C?
               C? mixi




                                                        ★   	

Copyright 2009 ? mixi,Inc. All right reserved.                   36
mixi




Copyright 2009 ? mixi,Inc. All right reserved.          37
mixi



       ?? Person & Friends API
       ??
       ?? Activity + MediaItem
       ??




Copyright 2009 ? mixi,Inc. All right reserved.   38
mixi



       ?? Person & Friends API                   eco	

               C?
                       ?? startIndex + count
                               C? count=1000
                       ?? hasApp
                               C?
               C?
                       ?? fields
                               C?
                               C?


Copyright 2009 ? mixi,Inc. All right reserved.           39
mixi



       ??                                                      eco	

               C?
                       ??
                       ??
               C?
                       ??
                       ?? OSS
               C?
                       ??                        ★ NG   ★ OK


Copyright 2009 ? mixi,Inc. All right reserved.                         40
mixi


                                                               eco	
       ?? Activity + MediaItem
               C? Activitiy

                                 	




                                                                  	

                                                 makeRequest

                                                                       	

Copyright 2009 ? mixi,Inc. All right reserved.                              41
mixi



                                                                eco	
       ??
               C?
                       ??
                       ?? mixi = mod_perl + memcached + MySQL


               C?
                       ?? Google AppEngine
                       ?? Amazon EC2, S3




Copyright 2009 ? mixi,Inc. All right reserved.                          42
Copyright 2009 ? mixi,Inc. All right reserved.   43
mixi Developer Center

       mixi




                                                 http://developer.mixi.co.jp/




Copyright 2009 ? mixi,Inc. All right reserved.                                  44
mixi Platform mixi
                                           mixi



                           mixi




Copyright 2009 ? mixi,Inc. All right reserved.     45
Copyright 2009 ? mixi,Inc. All right reserved.   46

More Related Content

Yapc

  • 1. Web mixi Copyright 2009 ? mixi,Inc. All right reserved. 1
  • 2. ?? C? ?? C? Google API Expert (OpenSocial) C? Mashup Award 3rd Copyright 2009 ? mixi,Inc. All right reserved. 2
  • 3. ?? mixi ?? ?? ?? mixi ?? Copyright 2009 ? mixi,Inc. All right reserved. 3
  • 4. ?? Perl Copyright 2009 ? mixi,Inc. All right reserved. 4
  • 5. mixi Copyright 2009 ? mixi,Inc. All right reserved. 5
  • 6. mixi, Inc Copyright 2009 ? mixi,Inc. All right reserved. 6
  • 7. mixi Platform ^mixi  ̄ ^mixi  ̄ Web ^mixi ̄ ID PW 2009 2008 8 20 mixi PC -OpenID ver2.0 -OAuth -mixi -OpenSocial Copyright 2009 ? mixi,Inc. All right reserved. 7
  • 8. Copyright 2009 ? mixi,Inc. All right reserved. 8
  • 9. Community API Person & Friends API Persistence API gadgets. io API Albums API Invite API Activities API Copyright 2009 ? mixi,Inc. All right reserved. 9
  • 10. mixi ?? C? 231 C? 1 - ( ) ?? User : 395,598 C? 2 ( ) ?? User : 218,529 C? 3 ( ) ?? User : 163,740 Copyright 2009 ? mixi,Inc. All right reserved. 10
  • 11. Invite Copyright 2009 ? mixi,Inc. All right reserved. 11
  • 12. Copyright 2009 ? mixi,Inc. All right reserved. 12
  • 13. OpenSocial OpenSocial v0.8.1 mixi API Copyright 2009 ? mixi,Inc. All right reserved. 13
  • 14. mixi OpenSocial mixi (PC ) mixi ( ) (OpenSocial JavaScript API) (OpenSocial RESTful Protocol) Copyright 2009 ? mixi,Inc. All right reserved. 14
  • 15. mixi PC mixi <?xml version=^1.0 ̄ encoding=^utf-8 ̄?> <Module> <ModulePrefs title=^Hello, world! ̄> Gadget XML <Require feature=^opensocial-0.8 ̄ /> </ModulePrefs> <Content type=^html ̄><![CDATA[ Person & Friends API <div>Hello, mixi !</div> ]]></Content> Activities API </Module> Persistence API XML + HTML + JavaScript + Flash gadgets.io API Invite API Albums API Copyright 2009 ? mixi,Inc. All right reserved. 15
  • 16. mixi PC mixi Web URL <?xml version=^1.0 ̄ encoding=^utf-8 ̄?> <Module> function init() { <ModulePrefs title=^Hello, world! ̄> var req = opensocial.newDataRequest(); <Require feature=^opensocial-0.8 ̄ /> req.add(req.newFetchPersonRequest( </ModulePrefs> opensocial.IdSpec.PersonId.VIEWER), <Content type=^html ̄><![CDATA[ ^viewer ̄); req.send(function(data) { <div>Hello, mixi !</div> var viewer = data.get(^viewer ̄).getData(); ]]></Content>something´ // do } </Module> } gadgets.util.registerOnLoadHandler(init); Copyright 2009 ? mixi,Inc. All right reserved. 16
  • 17. mixi mixi <?xml version=^1.0 ̄ encoding=^utf-8 ̄?> <Module> Gadget XML <ModulePrefs title=^Hello, world! ̄> <Require feature=^opensocial-0.8 ̄ /> </ModulePrefs> Person & Friends API <Content type=^url ̄ view=^mobile ̄ href=^http://example.com/ ̄ /> </Module> Activities API Persistence API HTML + Flash + RESTful API Albums API Copyright 2009 ? mixi,Inc. All right reserved. 17
  • 18. mixi RESTful Protocol + OAuth Copyright 2009 ? mixi,Inc. All right reserved. 18
  • 19. Gadget XML / <?xml version=^1.0 ̄ encoding=^utf-8 ̄?> <Module> <ModulePrefs title=^Hello, world! ̄> <Require feature=^opensocial-0.8 ̄ /> </ModulePrefs> PC <Content type=^html ̄ view=^home,canvas,profile ̄><![CDATA[ <div>Hello, mixi !</div> ]]></Content> <Content type=^url ̄ view=^mobile ̄ href=^http://foo.com/hello.pl ̄ /> </Module> Copyright 2009 ? mixi,Inc. All right reserved. 19
  • 20. Copyright 2009 ? mixi,Inc. All right reserved. 20
  • 21. OpenSocial ?? C? Social Data API ?? /people, /activities, /appdata, JS(opensocial.*) C? Gadget API ?? /gadgets/makeRequest, JS(gadgets.*) C? Gadget Rendering ?? /gadgets/ifr Copyright 2009 ? mixi,Inc. All right reserved. 21
  • 22. OSS ?? Apache Shindig C? Apache Incubator OSS C? iGoogle C? 2007 12 12 C? Googler C? Java PHP Shindig ?-?\ ? ?an ?Apache ?incubator ?project ?for ?OpenSocial ?and ?gadgets ? http://incubator.apache.org/shindig/ Copyright 2009 ? mixi,Inc. All right reserved. 22
  • 23. OpenSocial SNS /gadgets/ifr /gadgets/makeRequest /social/data/people /social/data/activities /social/data/appdata Copyright 2009 ? mixi,Inc. All right reserved. 23
  • 24. mixi Platform Main API (Perl) /social/data/people /social/data/activities /social/data/appdata (Java ) /gadgets/ifr /gadgets/makeRequest Copyright 2009 ? mixi,Inc. All right reserved. 24
  • 25. API Server API (Perl) balancer /social/data/people /social/data/activities /social/data/appdata apache mod_perl memcached MySQL Copyright 2009 ? mixi,Inc. All right reserved. 25
  • 26. API Server API (Perl) RESTful Protocol /social/data/people Accept: application/atom+xml /social/data/activities Atom Feed/Entry /social/data/appdata Accept: application/json JSON Server Handler::People socialdata.js people: Handler::Activity uri: /social/data/people/{guid}/{selector} handler: People activity: Handler::AppData uri: /social/data/activities/{guid}/{appid}/{selector} handler: Activity appdata: uri: /social/data/appdata/{guid}/{appid}/{selector} handler: AppDAta Copyright 2009 ? mixi,Inc. All right reserved. 26
  • 27. Copyright 2009 ? mixi,Inc. All right reserved. 27
  • 28. ?? 8/24 8/31 C? mixi C? API Copyright 2009 ? mixi,Inc. All right reserved. 28
  • 29. Shindig ?? Shindig C? mixi ?? 504 C? Shindig ?? close C? OS ?? Copyright 2009 ? mixi,Inc. All right reserved. 29
  • 30. API API ?? API C? /social/data/* ?? mixi ?? C? API ?? ?? mixi Copyright 2009 ? mixi,Inc. All right reserved. 30
  • 31. API mixi Platform Copyright 2009 ? mixi,Inc. All right reserved. 31
  • 32. API API ?? C? 4 ?? 1 2 ?? 2 4 C? ?? CPU: 100% Copyright 2009 ? mixi,Inc. All right reserved. 32
  • 33. API API ?? Devel::NYTProf Copyright 2009 ? mixi,Inc. All right reserved. 33
  • 34. API API ?? C? ?? ?? DB ?? C? Copyright 2009 ? mixi,Inc. All right reserved. 34
  • 35. mixi ?? mixi mixi mixi Platform Copyright 2009 ? mixi,Inc. All right reserved. 35
  • 36. mixi ?? mixi C? mixi Platform C? mixi C? C? mixi ★ Copyright 2009 ? mixi,Inc. All right reserved. 36
  • 37. mixi Copyright 2009 ? mixi,Inc. All right reserved. 37
  • 38. mixi ?? Person & Friends API ?? ?? Activity + MediaItem ?? Copyright 2009 ? mixi,Inc. All right reserved. 38
  • 39. mixi ?? Person & Friends API eco C? ?? startIndex + count C? count=1000 ?? hasApp C? C? ?? fields C? C? Copyright 2009 ? mixi,Inc. All right reserved. 39
  • 40. mixi ?? eco C? ?? ?? C? ?? ?? OSS C? ?? ★ NG ★ OK Copyright 2009 ? mixi,Inc. All right reserved. 40
  • 41. mixi eco ?? Activity + MediaItem C? Activitiy makeRequest Copyright 2009 ? mixi,Inc. All right reserved. 41
  • 42. mixi eco ?? C? ?? ?? mixi = mod_perl + memcached + MySQL C? ?? Google AppEngine ?? Amazon EC2, S3 Copyright 2009 ? mixi,Inc. All right reserved. 42
  • 43. Copyright 2009 ? mixi,Inc. All right reserved. 43
  • 44. mixi Developer Center mixi http://developer.mixi.co.jp/ Copyright 2009 ? mixi,Inc. All right reserved. 44
  • 45. mixi Platform mixi mixi mixi Copyright 2009 ? mixi,Inc. All right reserved. 45
  • 46. Copyright 2009 ? mixi,Inc. All right reserved. 46