how we spread out our service globally by utilizing aws and open source software ( coscup 2013)

33
How we spread out our service globally by utilizing AWS and open source software 2013/08/04(sun)

Upload: takashi-someda

Post on 14-May-2015

729 views

Category:

Technology


1 download

DESCRIPTION

Presentation slides at http://coscup.org/2013/zh-tw/

TRANSCRIPT

Page 1: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

How we spread out our service globallyby utilizing

AWS and open source software

2013/08/04(sun)

Page 2: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

Takashi SOMEDA

染田 貴志

https://twitter.com/tksmd

Technology Evangelist at Nulab,Inc.

JAWS UG Kyoto Branch leader

About me

https://facebook.com/takashi.someda

Write tech articles about AWS, SCM

https://github.com/tksmd

Page 3: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)
Page 4: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

Backlog is a project management tool that 1,800 companies use.

In addition to issue management feature, Backlog provides• File sharing by WebDAV• Git and Subversion repository hosting.

Visit http://backlogtool.com/tw/

Page 5: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

920,000 users around the world draw wireframes, network

diagrams, UML, business plans and so on.

Cacoo provides basic functionality as a draw tool and powerful collaborative features like• Simultaneous Editing on same diagram by multiple users• Integration with Google Services like Google Apps, Google Drive

and Google+ Hangouts

Page 6: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

Examples

Page 7: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

User Growth of Cacoo

Oct,2010 Oct,2011 Oct,2012 Aug,20130

100,000

200,000

300,000

400,000

500,000

600,000

700,000

800,000

900,000

1,000,000

62,000

200,000

600,000

920,000

AllJapanOverseas

Page 8: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Agenda

COSCUP 2013 Taipei

Service Overview

Real time collaboration

Flexible Infrastructure by AWS

Summary

Page 9: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Service Overview

http://www.flickr.com/photos/ancientsword/2856148716/

Page 10: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Service Components

COSCUP 2013 Taipei

Page 11: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Software Architecture

COSCUP 2013 Taipei

Page 12: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Real time Collaboration

http://www.flickr.com/photos/ian_munroe/3315718996/

Page 13: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Simultaneous Editing

COSCUP 2013 Taipei

Page 14: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

BlazeDS client

COSCUP 2013 Taipei

http://livedocs.adobe.com/blazeds/1/blazeds_devguide/lcarch_2.html

Page 15: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

BlazeDS server

COSCUP 2013 Taipei

http://livedocs.adobe.com/blazeds/1/blazeds_devguide/lcarch_3.html

Page 16: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Message flow between Cacoo Editors

COSCUP 2013 Taipei

Page 17: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Synchronize MessageDestination

COSCUP 2013 Taipei

Patch added toflex.messaging.cluster.JGroupsClusterflex.messaging.cluster.ClusterNode

Using custom MessageService extendsflex.messaging.services.MessageService( can be configured in messaging-config.xml )

Page 18: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

What message exchanged

COSCUP 2013 Taipei

http://www.flickr.com/photos/dps/7161557/

Command

Page 19: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Command Execution Model

COSCUP 2013 Taipei

1.add 1.add1.add

2.moveUndomoveadd

1.add

2.zoomzoom …

Page 20: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Command Interface

COSCUP 2013 Taipei

public class Command implements IExternalizable {

public var sequenceNo:uint = 0;

public var isLocal:Boolean = true;

public function Command() { } public function execute():void { }

public function undo():void { }

public function redo():void { execute(); }:}

/*

sequenceNo keeps the order of commands to be executed in each editors.

isLocal is used to distinguish that the command is created on local editor or it is received from other editor.

*/

Page 21: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

# of Saved Commands

COSCUP 2013 Taipei

430,749,991

Page 22: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Partition on different tablespaces

COSCUP 2013 Taipei

create table command_01 ( LIKE command INCLUDING INDEXES INCLUDING DEFAULTS INCLUDING

CONSTRAINTS,

CHECK (diagram_id % 4 = 0)

) INHERITS (command) TABLESPACE tblspc_01;

ALTER TABLE command_01_pkey set tablespace tblspc_01;

Page 23: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Flexible Infrastructure by AWS

http://www.flickr.com/photos/naturegeak/5688437941/

Page 24: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

Cacoo for Google+ Hangouts

http://launch-hangouts.cacoo.com/lp-zh_tw.html

Page 25: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

We had only one month

beginning of March 2012Cacoo became a candidate of the 3rd party app

announced on Hangouts API launch

28th Mar. 2012Cacoo for Google+ Hangouts launched

Need to Develop application Do performance testing estimating 10-20 times accesses

than that of cacoo.com at that time Prepare 10+ Servers for performance testing and new

production environment

Page 26: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Simplify server operations

COSCUP 2013 Taipei

@taskdef add_app(zone): ec2 = connect_ec2() ami = ec2.get_image(AMI_ID['app']) r = ami.run(min_count=1, max_count=1, key_name=KEY_NAME, user_data=load_cloudinit_script(), security_groups=['app’],instance_type=INSTANCE_TYPE['app'], block_device_map=create_block_device_map(), placement=zone, instance_initiated_shutdown_behavior='stop')

instance = r.instances[0] wait_for_startup(instance)

execute(”setup_app", hosts=[instance.public_dns_name]) execute(”update_hosts", roles=['all']) execute(”start_app", hosts=[instance.public_dns_name]) execute(“update_nginx_upstream”)

$ fab add_app:zone=us-west-1a

# fabric and boto# http://fabfile.org# http://docs.pythonboto.org/

Page 27: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Tipping Point Example #1

COSCUP 2013 Taipei

Page 28: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Tipping Point Example #2

COSCUP 2013 Taipei

Page 29: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

What we did for those growth

COSCUP 2013 Taipei

# For example1

$ ec2addsnap$ ec2addvol –snapshot <snap_id> –s 1024G$ ec2attvol

# For example2

$ ec2run

Page 30: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

CloudFront for SWF distribution

COSCUP 2013 Taipei

Loading SWF is 10+ times faster

Page 31: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

Summary

http://www.flickr.com/photos/nauright/2662160957/

Page 32: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

OSS and AWS enable us

COSCUP 2013 Taipei

To fit the infrastructure according to the growth

To make it available to use all over the world

To make realize the key features quickly

Page 33: How we spread out our service globally by utilizing  AWS and open source software ( COSCUP 2013)

COSCUP 2013 Taipei

Thanks!!

Q and A