How we spread out our service globally by utilizing AWS and open source software ( COSCUP 2013)
1. How we spread out our service globally
by utilizing
AWS and open source software
2013/08/04(sun)
2. Takashi SOMEDA
染田 貴志
COSCUP 2013 Taipei
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
4. 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/
5. 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
17. Synchronize MessageDestination
COSCUP 2013 Taipei
Patch added to
flex.messaging.cluster.JGroupsCluster
flex.messaging.cluster.ClusterNode
Using custom MessageService extends
flex.messaging.services.MessageService
( can be configured in messaging-config.xml )
20. 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.
*/
21. # of Saved Commands
COSCUP 2013 Taipei
430,749,991
22. 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;
24. Cacoo for Google+ Hangouts
COSCUP 2013 Taipei
http://launch-hangouts.cacoo.com/lp-zh_tw.html
25. We had only one month
COSCUP 2013 Taipei
beginning of March 2012
Cacoo became a candidate of the 3rd party app
announced on Hangouts API launch
28th Mar. 2012
Cacoo 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
26. Simplify server operations
COSCUP 2013 Taipei
@task
def 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/
29. What we did for those growth
COSCUP 2013 Taipei
# For example1
$ ec2addsnap
$ ec2addvol –snapshot <snap_id> –s 1024G
$ ec2attvol
# For example2
$ ec2run
30. CloudFront for SWF distribution
COSCUP 2013 Taipei
Loading SWF is 10+ times faster
32. 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