The document discusses mixi, a Japanese social networking service. It provides details on mixi's OpenSocial implementation including its use of the Apache Shindig open source project and RESTful APIs. It also outlines mixi's platform and integration with OpenSocial specifications.
1 of 46
Download to read offline
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
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
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
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