Download - Ruby which Supports Social Platform

Transcript
Page 1: Ruby which Supports Social Platform

Ruby which Supports Social Platform

Development DepartmentDevelopment Platform

GREE, inc.

ソーシャルプラットフォームを支えるRuby

Koichiro Ohba大場光一郎2012-11-09; RubyWorld Conference 2012; Kunibiki Messe

12年11月9日金曜日

Page 2: Ruby which Supports Social Platform

12年11月9日金曜日

Page 3: Ruby which Supports Social Platform

���������������������

Making the world a better placethrough the power of the Internet.

12年11月9日金曜日

Page 4: Ruby which Supports Social Platform

12年11月9日金曜日

Page 5: Ruby which Supports Social Platform

San Francisco�

São Paulo

Vancouver�London �

Tokyo �Beijing �

Singapore �

Amsterdam�Seoul�

Dubai�Osaka�

11 branches in the world

12年11月9日金曜日

Page 6: Ruby which Supports Social Platform

12年11月9日金曜日

Page 7: Ruby which Supports Social Platform

テキスト

http://developer.gree.net/sp/globalplatform/en/products/

12年11月9日金曜日

Page 8: Ruby which Supports Social Platform

世界10億人に対応するソーシャルプラットフォームです。

It’s a social platform supporting 1 billion people in the world.

12年11月9日金曜日

Page 9: Ruby which Supports Social Platform

GREE PlatformStreamSocial GraphCommunityAuth

App PortalWeb Platform

GREEPlatformSDK

Social APIWeb ServiceNode

Middleware

12年11月9日金曜日

Page 10: Ruby which Supports Social Platform

統一されたSDK/APIにより、1度の開発で最大169の国および地域のユーザーにアプリケーションを配信できます。

Unified SDK/API enables delivery of applications to users in 169 countries.

12年11月9日金曜日

Page 11: Ruby which Supports Social Platform

テキスト

12年11月9日金曜日

Page 12: Ruby which Supports Social Platform

http://product.gree.net/jp/ja/apps/12年11月9日金曜日

Page 13: Ruby which Supports Social Platform

GREE Platform

12年11月9日金曜日

Page 14: Ruby which Supports Social Platform

Over 1 billion users

10億ユーザーを支えるプラットフォーム

12年11月9日金曜日

Page 15: Ruby which Supports Social Platform

GREE is build onOpen Source

Powered by

12年11月9日金曜日

Page 16: Ruby which Supports Social Platform

1.Server Dashboard + API2.Server Configuration Management3.DNS : Bind/PrimDNS(original)4. Load Balancer5.App Server6.KVS7.Large Object Storage8.Messaging Queue9.Full Text Search10.Monitoring / Alerts11.Deployment12.Analytics

12年11月9日金曜日

Page 17: Ruby which Supports Social Platform

1. Server Dashboard + API

11. Deployment

4. Load Balancer5. App Server

Rubyinside

12年11月9日金曜日

Page 18: Ruby which Supports Social Platform

Server Dashboard

12年11月9日金曜日

Page 19: Ruby which Supports Social Platform

Manage many serversたくさんのサーバを管理

12年11月9日金曜日

Page 20: Ruby which Supports Social Platform

サーバ属性管理•OS/CPU spec•サーバ役割•場所(DC,ラック)•IP/名前•サーバ初期化、構成変更•状態、負荷監視(Ganglia)

12年11月9日金曜日

Page 21: Ruby which Supports Social Platform

12年11月9日金曜日

Page 22: Ruby which Supports Social Platform

12年11月9日金曜日

Page 23: Ruby which Supports Social Platform

12年11月9日金曜日

Page 24: Ruby which Supports Social Platform

http://api/product_id/servers

テキスト

{“results”  =>    [{“property”  =>  {“server_type”  =>  “DB”,    “ipaddr”  =>  “XX.XX.XX.XX”,    “hardware”  =>  “Intel  Xeon  2.6Ghz”,    ...    }}

12年11月9日金曜日

Page 25: Ruby which Supports Social Platform

Server Dashboardの利点

12年11月9日金曜日

Page 26: Ruby which Supports Social Platform

サーバの役割

Servers have many purposes

12年11月9日金曜日

Page 27: Ruby which Supports Social Platform

LVS Proxy(Apache+mod_proxy)

Web(Apache+PHP)

標準構成

12年11月9日金曜日

Page 28: Ruby which Supports Social Platform

LVS

Proxy

Web

Proxy

Web

Web

Web

Web

WebLVS

12年11月9日金曜日

Page 29: Ruby which Supports Social Platform

Deployment

12年11月9日金曜日

Page 30: Ruby which Supports Social Platform

gree_deploy

Rubyinside

12年11月9日金曜日

Page 31: Ruby which Supports Social Platform

Why we don’t use Capistrano?なぜCapistranoを使わないのか

12年11月9日金曜日

Page 32: Ruby which Supports Social Platform

“たとえそれが車輪の再発明であっても構わない。何でもやったほうがいいと思

うんですよね”

Matz at 札幌Ruby会議2012

http://www.flickr.com/photos/recompile_net/5952565740/

“You should do whatever you want, even if it’s reinvention of the wheel”

12年11月9日金曜日

Page 33: Ruby which Supports Social Platform

ひとつのプロダクトで複数のgitリポジトリを使いたい

12年11月9日金曜日

Page 34: Ruby which Supports Social Platform

サービスを稼働したまま更新する

Live Update

12年11月9日金曜日

Page 35: Ruby which Supports Social Platform

LVS

Proxy

Web

Proxy

Web

Web

Web

Web

WebLVS

Deploy

12年11月9日金曜日

Page 36: Ruby which Supports Social Platform

LVS

Proxy

Web

Proxy

Web

Web

Web

Web

WebLVS

Deploy

12年11月9日金曜日

Page 37: Ruby which Supports Social Platform

LVS

Proxy

Web

Proxy

Web

Web

Web

Web

WebLVS

Deploy

12年11月9日金曜日

Page 38: Ruby which Supports Social Platform

APIから必要な役割のサーバリストを取得し、一部のサーバをサービスアウトして配る

Get the target servers list and make part of them in-active and deploy the application there.

12年11月9日金曜日

Page 39: Ruby which Supports Social Platform

gree_deploy Dashboard Web

Collect

Proxy Control

Deploy

Proxy

Enable/Disable

WorkerWorkerWorkerWorker Restart

DeployDist.

12年11月9日金曜日

Page 40: Ruby which Supports Social Platform

require  'gree/server'

servers  =  GREE::Server.find({                'virtual_server_name'  =>  'ds%',                'type'        =>  'master',                'service'  =>  'mail',                'state'      =>  'on_service',})

12年11月9日金曜日

Page 41: Ruby which Supports Social Platform

gem i gree-rubylib

12年11月9日金曜日

Page 42: Ruby which Supports Social Platform

Improvement

12年11月9日金曜日

Page 43: Ruby which Supports Social Platform

DeploymentFlow

12年11月9日金曜日

Page 44: Ruby which Supports Social Platform

Commit stage

Capacity test

User acceptance test

Acceptance test stage Production

『継続的デリバリー』Jez Humble, David Farley著(ASCII)

Deployment Pipeline

gree_deploy

12年11月9日金曜日

Page 45: Ruby which Supports Social Platform

@release-open

Staging

Test please

@ok 0b70750bd

@release-close

DeployProduction

12年11月9日金曜日

Page 46: Ruby which Supports Social Platform

git-dailyhttp://labs.gree.jp/blog/2011/05/3528/

12年11月9日金曜日

Page 47: Ruby which Supports Social Platform

gem i git-dailyhttps://github.com/koichiro/git-daily

Rubyinside

12年11月9日金曜日

Page 48: Ruby which Supports Social Platform

JIRA KPIPackage

Management

Rubyinside

12年11月9日金曜日

Page 49: Ruby which Supports Social Platform

Open Source

12年11月9日金曜日

Page 50: Ruby which Supports Social Platform

github.com/gree

12年11月9日金曜日

Page 51: Ruby which Supports Social Platform

LWFUnity-*FlareOrion

12年11月9日金曜日

Page 52: Ruby which Supports Social Platform

http://techtalk1.labs.gree.jp/12年11月9日金曜日

Page 53: Ruby which Supports Social Platform

まとめConclusion

12年11月9日金曜日

Page 54: Ruby which Supports Social Platform

グリーのシステムを支えるための重要な道具としてRubyをつかっています

We are using Ruby than you expect to support GREE’s systems.

12年11月9日金曜日

Page 55: Ruby which Supports Social Platform

Rubyの他にもたくさんのオープンソースを使っているし、公開もします。

Also using many other OSS. We provide OSS too.

12年11月9日金曜日

Page 56: Ruby which Supports Social Platform

Rubyのほうが向いている領域ならRubyで書いちゃえばいい。

PHP code can be replaced to Ruby if Ruby is better for the purpose.

12年11月9日金曜日

Page 57: Ruby which Supports Social Platform

http://jobs.gree.net/

12年11月9日金曜日