ngserver and-collaboratived-development-between-san-francisco-and-tokyo

43
ngServer Powered by Node.js Server-Side Framework

Upload: satoshi-tanaka

Post on 11-Apr-2017

20.297 views

Category:

Technology


0 download

TRANSCRIPT

ngServerPowered by Node.js

Server-Side Framework

about: me

Yusuke ShinozakiDeNA CTO室2011/3 ~ DeNA

@bad_at_math

DeNA with Node.js

Client

ServerTool

Smartphone development

Client

Smartphone development

ngCoreGame Engine

ngCoreGame Engine

JavaScript

iOS Android

native APIs native APIs

ngCoreGame Engine

JavaScript

iOS Android

native APIs native APIs N de

* Development Phase

Devicebind sources to

1 JS file

Tool

Smartphone development

ngCoreGame Engine

ngBuilderGame DevelopmentTool

Smartphone development

Server

ngCoreGame Engine

ngBuilderGame DevelopmentTool

ngServerPowered by Node.js

Server

Smartphone development

N de ngCoreGame Engine

ngBuilderGame DevelopmentTool

Node.js in production?

Mayday, Mayday! Houston, we’ve got a problem!

300 2 4 6 8 10 12 14 16 18 20 22 24 26 28

100

0

10

20

30

40

50

60

70

80

90

time

CPU

unexpectedCPU SPIKES!!!

Suspects6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

Suspects

#1 our code?#2 Node itself?#3 middleware?

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

Suspects

#1 our code?#2 Node itself?#3 middleware?

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

6’6”

6’0”

5’6”

5’0”

4’6”

4’0”

3’6”

3’0”

V8 GCwith bigger heap

Real.....

var http = require('http');http.createServer(function (req, res) {

res.writeHead(200, {'Content-Type': 'text/plain'});res.end('Hello World\n');

}).listen(1337, "127.0.0.1");

var data = [];for(var i=0;i<10000000;i++) { data.push({a:1,b:2,c:3,d:4});}

setInterval(function() {data.length;

},1000);

console.log('Server running at http://127.0.0.1:1337/');

https://gist.github.com/1851152

ngServerPowered by Node.js

experiences

ngServerPowered by Node.js

ngServerPowered by Node.js

Server-side Frameworkfor social game

ngServerPowered by Node.jsArchitecture

Device Express MobageSocial APIsOAuth

Auth HeaderJSON

Controller

Model

memcacheTokenstore

mongodb

MySQL

Datastore

JSON

routing

rendering

queue

job

ngServerPowered by Node.jsFunctions

ngServer commandModels and Controllers

MobageAPIproject template (generator)

profilerbenchmarking

analytics (abacus)debug

hot-reload

Storage

StoragengServer

ngServerPowered by Node.jsDeployment

HAProxy ngServer StorageHAProxy

Cache

Storagequeue

1 ngServer process per 1 cpu core

HostingService

国際開発の実際

TK/JP SF/US

Node.jsMongoDB

High-TrafficMySQL

Why international?

Challenges

Language

Challenges

communicationコミュニケーション

SFTK

Challenges

communication

daily sync

SFTK

Challenges

SFTK 17hrs

Challenges

SFTK 17hrs

18:00 1:00

10:003:00

7:00 14:00

15:008:00

Challenges

SFTK 17hrs

14:007:00

18:0011:00

hot time zone

Challenges

Culture

Challenges

SFTKproblems,bugs

horribledoesn’t work

awesome! great!LGTM!!!

my suggestion is...(><) :D

Challenges

SFTKawesome! great!

LGTM!!!my suggestion is...

SUPER!! WORTH!!EXCELLLLLENT!!!another way is...

:D:D

Make everyone delight.

Thank you!

Make everyone delight.

Thank you!

I’M SOOOO GLAD TO MEEET YOU GUYS!!!

It’s super GREAT experience for me to speakHERE in DEVSUMi.

wanna talk you more so plz pick me up later,let’s talk about node.js, architecture or

anything you want!!!

SEE YOU LATERZ,

THANK YOU SO MUCH!!!