SlideShare a Scribd company logo
Building Highly Scalable
Java Applications
on Windows Azure
David Chou
david.chou@microsoft.com
blogs.msdn.com/dachou
Agenda
• Overview of Windows Azure
• Java How-to
• Architecting for Scale
> Introduction
What is Windows Azure?
• A cloud computing platform (as-a-service)
– on-demand application platform capabilities
– geo-distributed Microsoft data centers
– automated, model-driven services provisioning and management
• You manage code, data, content, policies, service models, etc.
– not servers (unless you want to)
• We manage the platform
– application containers and services, distributed storage systems
– service lifecycle, data replication and synchronization
– server operating system, patching, monitoring, management
– physical infrastructure, virtualization networking
– security
– “fabric controller” (automated, distributed service management system)
> Azure Overview
Anatomy of a Windows Azure instance
Guest VM
Guest VM
Guest VM
Host VM
Maintenance OS,
Hardware-optimized hypervisor
> Azure Overview > Anatomy of a Windows Azure instance
The Fabric Controller communicates with every server
within the Fabric. It manages Windows Azure, monitors
every application, decides where new applications
should run – optimizing hardware utilization.
Storage – distributed storage systems that
are highly consistent, reliable, and scalable.
Compute – instance types: Web Role &
Worker Role. Windows Azure applications
are built with web role instances, worker
role instances, or a combination of both.
Each instance runs on its
own VM (virtual machine)
and local transient storage;
replicated as needed
HTTP/HTTPS
Application Platform Services
> Azure Overview > Application Platform Services
Storage
Dynamic
Tabular Data
Blobs
Message
Queues
Distributed File
System
Content
Distribution
Data Transact-SQL
Data
Synchronization
Relational
Database
ADO.NET,
ODBC, PHP
Integration Registry RegistryService Bus
Security
Claims-Based
Identity
Federated
Identities
Secure Token
Service
Declarative
Policies
Marketplace
Application
Marketplace
Information
Marketplace
Frameworks
Workflow
Hosting
Distributed
Cache
Services
Hosting
Compute C/C++
Win32 VHD
On-Premises
Bridging
Networking
Application Platform Services
> Azure Overview > Application Platform Services
Compute
Storage
Data
Relational
Database
Integration
Security
Marketplace
Frameworks
Table Storage Blob Storage Queue Drive
Content Delivery
Network
VM Role
Networking Connect
ApplicationsDataMarket
Access
Control
Service Bus
Composite
App
Caching
Web Role Worker Role
ReportingDataSync
Integration
Connect
(BizTalk)
How this may be interesting to you
• Not managing and interacting with server OS
– less work for you
– don’t have to care it is “Windows Server” (you can if you want to)
– but have to live with some limits and constraints
• Some level of control
– process isolation (runs inside your own VM/guest OS)
– service and data geo-location
– allocated capacity, scale on-demand
– full spectrum of application architectures and programming models
• You can run Java!
– plus PHP, Python, Ruby, MySQL, memcached, etc.
– and eventually anything that runs on Windows
> Azure Overview
Java and Windows Azure
• Provide your JVM
– any version or flavor that runs on Windows
• Provide your code
– no programming constraints (e.g., whitelisting libraries, execution time limit, multi-threading, etc.)
– use existing frameworks
– use your preferred tools (Eclipse, emacs, etc.)
• File-based deployment
– no OS-level installation (conceptually extracting a tar/zip with run.bat)
• Windows Azure “Worker Role” sandbox
– standard user (non-admin privileges; “full trust” environment)
– native code execution (via launching sub-processes)
– service end points (behind VIPs and load balancers)
> Java How-To
Some boot-strapping in C#
• Kick-off process in WorkerRole.run()
– get environment info (assigned end point ports, file locations)
– set up local storage (if needed; for configuration, temp files, etc.)
– configure diagnostics (Windows Server logging subsystem for monitoring)
– launch sub-process(es) to run executable (launch the JVM)
• Additional hooks (optional)
– Manage role lifecycle
– Handle dynamic configuration changes
• Free tools
– Visual Studio Express
– Windows Azure Tools for Visual Studio
– Windows Azure Tools for Eclipse/Java (CTP 2010H2)
– Windows Azure SDK
> Java How-To > Boot-strapping
Running Tomcat in Windows Azure
Service Instance
Service Instance
Worker Role
RoleEntry
Point
Sub-Process
JVM
Tomcat
server.xmlCatalina
Fabric
Controller
Load
Balancer
Table
Storage
Blob
Storage
Queue
Service
Bus
Access
Control
SQL
Database
new Process()
bind port(x)
http://instance:x
http://instance:y
listen port(x)
http://app:80
get
runtime
info
index.jsp
> Java How-To > Tomcat
• Boot-strapping code in WorkerRole.run()
• Service end point(s) in ServiceDefinition.csdef
Running Jetty in Windows Azure
> Java How-To > Jetty
string response = "";
try {
System.IO.StreamReader sr;
string port = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["HttpIn"].IPEndpoint.Port.ToString();
string roleRoot = Environment.GetEnvironmentVariable("RoleRoot");
string jettyHome = roleRoot + @"approotappjetty7";
string jreHome = roleRoot + @"approotappjre6";
Process proc = new Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.FileName = String.Format(""{0}binjava.exe"", jreHome);
proc.StartInfo.Arguments = String.Format("-Djetty.port={0} -Djetty.home="{1}" -jar "{1}start.jar"",
port, jettyHome);
proc.EnableRaisingEvents = false;
proc.Start();
sr = proc.StandardOutput;
response = sr.ReadToEnd();
} catch (Exception ex) {
response = ex.Message;
Trace.TraceError(response);
}
<Endpoints>
<InputEndpoint name="HttpIn" port="80" protocol="tcp" />
</Endpoints>
Current constraints
Platform
– Dynamic networking
• <your app>.cloudapp.net
• no naked domain
• CNAME re-direct from custom domain
• sending traffic to loopback addresses not
allowed and cannot open arbitrary ports
– No OS-level access
– Non-persistent local file system
• allocate local storage directory
• read-only: Windows directory, machine
configuration files, service configuration
files
– Available registry resources
• read-only: HKEY_CLASSES_ROOT,
HKEY_LOCAL_MACHINE, HKEY_USERS,
HKEY_CURRENT_CONFIG
• full access: HKEY_CURRENT_USER
> Java How-To > Limitations
Java
– Sandboxed networking
• NIO (java.nio) not supported
• engine and host-level clustering
• JNDI, JMS, JMX, RMI, etc.
• need to configure networking
– Non-persistent local file system
• logging, configuration, etc.
– REST-based APIs to services
• Table Storage – schema-less (noSQL)
• Blob Storage – large files (<200GB block
blobs; <1TB page blobs)
• Queues
• Service Bus
• Access Control
Improvements on the way
Platform
– Networking modeling
• well known ports (or fixed VM ports)
• port ranges (for inbound traffic)
• load balancer control (on/off)
• network filters (inter-role access control)
– Improved automation
• startup tasks (execute OS-level scripts)
• role plugins (remote desktop, virtual
network, diagnostics, etc.)
– Full IIS
• multiple websites in same role
• virtual directories
• applications, modules
– Admin access
• full administrative access to role instances
• reboot/re-image support
> Java How-To > Platform Enhancements (Announced; Not Yet Released)
Java
– Traditional deployment models
• deploy your own Java EE stack
• configure internal networking
– More frameworks, packages, and
extended languages
• verify deployment and configuration
– Solution accelerators
• with bootstrapping and configuration
– Java API support
• Windows Azure SDK v2.0 (announced at
PDC10)
• www.windowsazure4j.org
– Development tools
• Windows Azure Tools for Eclipse/Java
(CTP 2010H2)
• Execute startup script in ServiceDefinition.csdef
• Service end point(s) in ServiceDefinition.csdef
Running Jetty with admin access + fixed ports
> Java How-To > Platform Enhancements (Announced; Not Yet Released)
<Startup>
<Task commandLine=“runme.cmd" executionContext=“elevated" TaskType=“background">
</Task>
</Startup>
<Endpoints>
<InputEndpoint name="HttpIn" protocol=“http" port="80" localPort="80" />
</Endpoints>
Running Fujitsu Interstage App Server
JavaEE 6
– Based on Glassfish 3.1
– Complete JavaEE execution environment
– Service Integrator SOA Platform
> Java How-To > Platform Enhancements (Announced; Not Yet Released)
Windows Azure 1.3 SDK
– Loopback adapter is no longer blocked
– Enabled Java NIO
– Enabled Port Ranges: for “inbound
traffic” (as opposed to 5 in the past)
Service end point(s) in ServiceDefinition.csdef
• Worker Role
– fabric sandbox native deployment
– automated, need additional code
– available now
• Admin Access
– script-based installation and execution
– automated, need scripts
– available shortly (not yet released)
• VM Role
– host your own pre-configured VM image
– automated, full control
– available later (not yet released)
Deployment Options
> Java How-To > Platform Enhancements (Announced; Not Yet Released)
• Runtime
– Multiple Java app servers
– Any Windows-based JRE
• Supports
– Windows Azure Storage
– Windows Azure Drive
– Windows Azure AppFabric
– SQL Azure
• One-click cloud deployment
• Integrated diagnostics,
monitoring, and logging
Windows Azure Tools for Eclipse/Java
> Java How-To > Platform Enhancements (Announced; Not Yet Released)
Accessing SQL Azure from Java
> Java How-To > SQL Azure
• SQL Azure Database
– Full relational Database as a Service
• Supports TDS & OData
• Direct connectivity to SQL Azure
– Connect with JDBC/ODBC using the latest driver
– Eclipse tooling support
• Interoperability using REST
– Easily wrap SQL Azure with WCF Data Services
– Restlet extension for OData (Java)
• Committed to OSS support and app compatibility
Accessing Windows Azure Storage from Java
> Java How-To > Windows Azure Storage
• Windows Azure SDK for Java
– Enables Java developers to develop against
Windows Azure Storage & Service Management
infrastructure using familiar & consistent
programming model
• Features
– Set of Java classes for Windows Azure Blobs,
Tables & Queues (for CRUD operations) & Service
Management
– Helper Classes for HTTP transport, AuhN/AuthZ,
REST & Error Management
– Manageability, Instrumentation & Logging(log4j)
• Open Source Project site:
– Developed by our Partner Soyatec
– www.windowsazure4j.org
Windows Azure SDK for Java
Blobs, Tables,
Queues
Manageability,
Instrumentation,
logging
Helper for Http,
Auth, REST, Error
Your Java application
REST
Accessing Windows Azure AppFabric from Java
> Java How-To > Windows Azure AppFabric
• Usage Patterns
– Extends reach of applications securely through the cloud
– Securely integrates partners outside of org boundaries
– Extends reach of on-premises web services layer
– Enables leveraging cloud quickly without having to rewrite apps
• App Fabric SDK for Java Developers
– Open source software development kit (SDK)
– a set of libraries, tools, Prescriptive guidance
– sample applications
• Open Source Project site:
– Developed by our partner Persistent Systems Limited
– www.jdotnetservices.com
Additional Cloud Interop Options
Application-layer
Connectivity & Messaging
> Cloud Scenarios
Facebook (2009)
• +200B pageviews /month
• >3.9T feed actions /day
• +300M active users
• >1B chat mesgs /day
• 100M search queries /day
• >6B minutes spent /day
(ranked #2 on Internet)
• +20B photos, +2B/month
growth
• 600,000 photos served /sec
• 25TB log data /day
processed thru Scribe
• 120M queries /sec on
memcache
> Architecting for Scale
Size matters
Twitter (2009)
• 600 requests /sec
• avg 200-300 connections
/sec; peak at 800
• MySQL handles 2,400
requests /sec
• 30+ processes for handling
odd jobs
• process a request in 200
milliseconds in Rails
• average time spent in the
database is 50-100
milliseconds
• +16 GB of memcached
Google (2007)
• +20 petabytes of data
processed /day by +100K
MapReduce jobs
• 1 petabyte sort took ~6
hours on ~4K servers
replicated onto ~48K disks
• +200 GFS clusters, each at 1-
5K nodes, handling +5
petabytes of storage
• ~40 GB /sec aggregate
read/write throughput
across the cluster
• +500 servers for each
search query < 500ms
• >1B views / day on Youtube
(2009)
Myspace (2007)
• 115B pageviews /month
• 5M concurrent users @
peak
• +3B images, mp3, videos
• +10M new images/day
• 160 Gbit/sec peak
bandwidth
Flickr (2007)
• +4B queries /day
• +2B photos served
• ~35M photos in squid cache
• ~2M photos in squid’s RAM
• 38k req/sec to memcached
(12M objects)
• 2 PB raw storage
• +400K photos added /day
Source: multiple articles, High Scalability
http://highscalability.com/
app server
• Common characteristics
– synchronous processes
– sequential units of work
– tight coupling
– stateful
– pessimistic concurrency
– clustering for HA
– vertical scaling
Traditional scale-up architecture
> Architecting for Scale > Vertical Scaling
app serverweb data store
units of work
web data store
app server
app server
Traditional scale-up architecture
> Architecting for Scale > Vertical Scaling
web
data storeweb
• To scale, get bigger servers
– expensive
– has scaling limits
– inefficient use of resources
data storeapp server
Traditional scale-up architecture
> Architecting for Scale > Vertical Scaling
app serverweb
web
• When problems occur
– bigger failure impact
Traditional scale-up architecture
> Architecting for Scale > Vertical Scaling
app serverweb
data storeweb
• When problems occur
– bigger failure impact
– more complex recovery
Use more pieces, not bigger pieces
LEGO 10179 Ultimate Collector's Millennium Falcon
• 33 x 22 x 8.3 inches (L/W/H)
• 5,195 pieces
LEGO 7778 Midi-scale Millennium Falcon
• 9.3 x 6.7 x 3.2 inches (L/W/H)
• 356 pieces
> Architecting for Scale > Horizontal scaling
app server
Scale-out architecture
> Architecting for Scale > Horizontal scaling
app serverweb data store
• Common characteristics
– small logical units of work
– loosely-coupled processes
– stateless
– event-driven design
– optimistic concurrency
– partitioned data
– redundancy fault-tolerance
– re-try-based recoverability
web data store
app server
app server
app server
app server
app server
Scale-out architecture
> Architecting for Scale > Horizontal scaling
app serverweb data store
web
web
web data store
web
web
• To scale, add more servers
– not bigger servers
data store
data store
data store
data store
app server
app server
app server
app server
app server
app server
Scale-out architecture
> Architecting for Scale > Horizontal scaling
web data store
web
web
web data store
web
web
• When problems occur
– smaller failure impact
– higher perceived availability
data store
data store
data store
data store
app server
app server
app server
Scale-out architecture
> Architecting for Scale > Horizontal scaling
app serverweb data store
web
web app server
web data store
web
web
• When problems occur
– smaller failure impact
– higher perceived availability
– simpler recovery
data store
data store
data store
data store
app server
app server
• Scalable performance at extreme scale
– asynchronous processes
– parallelization
– smaller footprint
– optimized resource usage
– reduced response time
– improved throughput
app server
app server
Scale-out architecture + distributed computing
> Architecting for Scale > Horizontal scaling
app serverweb data store
web
web app server
web data store
web
web
data store
data store
data store
data store
parallel tasks
async tasks
perceived response time
app server
app server
• When problems occur
– smaller units of work
– decoupling shields impact
app server
app server
Scale-out architecture + distributed computing
> Architecting for Scale > Horizontal scaling
app serverweb data store
web
web app server
web data store
web
web
data store
data store
data store
data store
app server
• When problems occur
– smaller units of work
– decoupling shields impact
– even simpler recovery
app server
app server
Scale-out architecture + distributed computing
> Architecting for Scale > Horizontal scaling
app serverweb data store
web
web app server
web data store
web
web
data store
data store
data store
data store
Live Journal (from Brad Fitzpatrick, then Founder at Live Journal, 2007)
> Architecting for Scale > Cloud Architecture Patterns
Partitioned Data
Distributed
Cache
Web Frontend
Distributed Storage
Apps & Services
Flickr (from Cal Henderson, then Director of Engineering at Yahoo, 2007)
> Architecting for Scale > Cloud Architecture Patterns
Partitioned Data Distributed
Cache
Web Frontend
Distributed Storage
Apps & Services
SlideShare (from John Boutelle, CTO at Slideshare, 2008)
> Architecting for Scale > Cloud Architecture Patterns
Partitioned Data
Distributed Cache
Web
Frontend
Distributed Storage
Apps &
Services
Twitter (from John Adams, Ops Engineer at Twitter, 2010)
> Architecting for Scale > Cloud Architecture Patterns
Partitioned
Data
Distributed
Cache
Web
Frontend
Distributed
Storage
Apps &
Services
Queues
Async
Processes
2010 stats (Source: http://www.facebook.com/press/info.php?statistics)
– People
• +500M active users
• 50% of active users log on in any given day
• people spend +700B minutes /month
– Activity on Facebook
• +900M objects that people interact with
• +30B pieces of content shared /month
– Global Reach
• +70 translations available on the site
• ~70% of users outside the US
• +300K users helped translate the site through
the translations application
– Platform
• +1M developers from +180 countries
• +70% of users engage with applications /month
• +550K active applications
• +1M websites have integrated with Facebook
Platform
• +150M people engage with Facebook on
external websites /month
> Architecting for Scale > Cloud Architecture Patterns
Facebook
(from Jeff Rothschild, VP Technology at Facebook, 2009)
Partitioned
Data
Distributed
Cache
Web
Frontend
Distributed
Storage
Apps &
Services
Parallel
Processes
Async
Processes
Windows Azure platform components
Apps & Services
Services
Web Frontend
QueuesDistributed Storage
Distributed
Cache
Partitioned Data
> Architecting for Scale > Cloud Architecture Patterns
Content Delivery
Network
Load Balancer
IIS
Web Server
VM Role
Worker Role
Web Role
Caching
Queues Access Control
Composite App
Blobs
Relational
Database
Tables
Drives Service Bus
Reporting
DataSync
Virtual Network
Connect
Fundamental concepts
> Architecting for Scale
• Vertical scaling still works
Fundamental concepts
> Architecting for Scale
• Horizontal scaling for cloud computing
• Small pieces, loosely coupled
• Distributed computing best practices
– asynchronous processes (event-driven design)
– parallelization
– idempotent operations (handle duplicity)
– de-normalized, partitioned data (sharding)
– shared nothing architecture
– optimistic concurrency
– fault-tolerance by redundancy and replication
– etc.
Partitioned data
> Architecting for Scale > Fundamental Concepts
Shared nothing architecture
– transaction locality (partition based on an
entity that is the “atomic” target of
majority of transactional processing)
– loosened referential integrity (avoid
distributed transactions across shard and
entity boundaries)
– design for dynamic redistribution and
growth of data (elasticity)
Cloud computing friendly
– divide & conquer
– size growth with virtually no limits
– smaller failure surface
Windows Azure platform services
– Table Storage Service
– SQL Azure
– AppFabric Caching (coming soon)
– SQL Azure DB federation (coming soon)
Web Role
QueuesWeb Role
Web Role
Worker Role
Relational
Database
Relational
Database
Relational
Database
Web Role
read
write
Asynchronous processes & parallelization
> Architecting for Scale > Fundamental Concepts
Defer work as late as possible
– return to user as quickly as possible
– event-driven design (instead of request-
driven)
Cloud computing friendly
– distributes work to more servers (divide &
conquer)
– smaller resource usage/footprint
– smaller failure surface
– decouples process dependencies
Windows Azure platform services
– Queue Service
– AppFabric Service Bus
– inter-node communication
Worker Role
Web Role
Queues
Service BusWeb Role
Web Role
Web Role
Worker Role
Worker Role
Worker Role
Idempotent operations
> Architecting for Scale > Fundamental Concepts
Repeatable processes
– allow duplicates (additive)
– allow re-tries (overwrite)
– reject duplicates (optimistic locking)
– stateless design
Cloud computing friendly
– resiliency
Windows Azure platform services
– Queue Service
– AppFabric Service Bus
Worker Role
Service Bus Worker Role
Worker Role
At most two of these properties for any shared-data system
C A
P
Consistency + Availability
• High data integrity
• Single site, cluster database, LDAP, xFS file system, etc.
• 2-phase commit, data replication, etc.
C A
P
Consistency + Partition
• Distributed database, distributed locking, etc.
• Pessimistic locking, minority partition unavailable, etc.
C A
P
Availability + Partition
• High scalability
• Distributed cache, DNS, etc.
• Optimistic locking, expiration/leases, etc.
CAP (Consistency, Availability, Partition) Theorem
> Architecting for Scale > Fundamental Concepts
Source: “Towards Robust Distributed Systems”, Dr. Eric A. Brewer, UC Berkeley
Hybrid architectures
> Architecting for Scale > Fundamental Concepts
Scale-out (horizontal)
– BASE: Basically Available, Soft state,
Eventually consistent
– focus on “commit”
– conservative (pessimistic)
– shared nothing
– favor extreme size
– e.g., user requests, data collection &
processing, etc.
Scale-up (vertical)
– ACID: Atomicity, Consistency, Isolation,
Durability
– availability first; best effort
– aggressive (optimistic)
– transactional
– favor accuracy/consistency
– e.g., BI & analytics, financial processing,
etc.
Most distributed systems employ both approaches
Lastly…
Windows Azure is an open & interoperable cloud platform
Microsoft is committed to Java, and we are on a journey – please give us your
feedback & participate in open source projects
Diverse Choice of Development Tools for Java Developers
– Eclipse Tools for Windows Azure – Write Modern Cloud Application
– Tomcat Solutions Accelerator
– Admin Access & VM Role
– Windows Azure Platform SDKs for Java Developers
• Windows Azure SDK (Storage, Diagnostics & Service Management)
• App Fabric SDK (Service Bus & Access Control Services)
• Restlet extension for OData (Java)
For more information:
– http://windowsazure.com/interop
– http://www.interoperabilitybridges.com
> Wrap-Up
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it
should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Thank you!
David Chou
david.chou@microsoft.com
blogs.msdn.com/dachou

More Related Content

What's hot (20)

PPTX
(ATS3-APP08) Top 10 things every Symyx Notebook by Accelrys Administrator sho...
BIOVIA
 
PDF
Introduction to SQL Server Analysis services 2008
Tobias Koprowski
 
PDF
WebLogic JMX for DevOps
Frank Munz
 
PPT
Mmik powershell dsc_slideshare_v1
Mmik Huang
 
PDF
Introduction to Role Based Administration in WildFly 8
Dimitris Andreadis
 
PDF
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
Frank Munz
 
PDF
AAI-1305 Choosing WebSphere Liberty for Java EE Deployments
WASdev Community
 
PPTX
Building WebLogic Domains With WLST
C2B2 Consulting
 
PPTX
WebLogic Server Work Managers and Overload Protection
James Bayer
 
PDF
77739818 troubleshooting-web-logic-103
shashank_ibm
 
PDF
Extending WildFly
JBUG London
 
PDF
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
PDF
WildFly BOF and V9 update @ Devoxx 2014
Dimitris Andreadis
 
PDF
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
BIOVIA
 
PDF
Performance Tuning Oracle Weblogic Server 12c
Ajith Narayanan
 
PDF
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
BCC - Solutions for IBM Collaboration Software
 
PDF
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
BIOVIA
 
PDF
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
WASdev Community
 
PDF
WildFly AppServer - State of the Union
Dimitris Andreadis
 
PPTX
(ATS3-APP14) Troubleshooting Symyx Notebook client performance
BIOVIA
 
(ATS3-APP08) Top 10 things every Symyx Notebook by Accelrys Administrator sho...
BIOVIA
 
Introduction to SQL Server Analysis services 2008
Tobias Koprowski
 
WebLogic JMX for DevOps
Frank Munz
 
Mmik powershell dsc_slideshare_v1
Mmik Huang
 
Introduction to Role Based Administration in WildFly 8
Dimitris Andreadis
 
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
Frank Munz
 
AAI-1305 Choosing WebSphere Liberty for Java EE Deployments
WASdev Community
 
Building WebLogic Domains With WLST
C2B2 Consulting
 
WebLogic Server Work Managers and Overload Protection
James Bayer
 
77739818 troubleshooting-web-logic-103
shashank_ibm
 
Extending WildFly
JBUG London
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Red Hat Developers
 
WildFly BOF and V9 update @ Devoxx 2014
Dimitris Andreadis
 
(ATS4-APP09)Tips and tricks for Managing Symyx Notebook Server Performance
BIOVIA
 
Performance Tuning Oracle Weblogic Server 12c
Ajith Narayanan
 
XPages Performance Master Class - Survive in the fast lane on the Autobahn (E...
BCC - Solutions for IBM Collaboration Software
 
(ATS4-APP01) Tips and Tricks for a Successful Installation of Accelrys Electr...
BIOVIA
 
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
WASdev Community
 
WildFly AppServer - State of the Union
Dimitris Andreadis
 
(ATS3-APP14) Troubleshooting Symyx Notebook client performance
BIOVIA
 

Similar to Java on Windows Azure (Cloud Computing Expo 2010) (20)

PPTX
Java on Windows Azure
David Chou
 
PPTX
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
David Chou
 
PPTX
Running Open Source Solutions on Windows Azure
Simon Evans
 
PDF
Building Real World Application with Azure
divyapisces
 
PPTX
Windows Azure & How to Deploy Wordress
George Kanellopoulos
 
PPTX
Microsoft Azure
Mohab El-Shishtawy
 
PPTX
Windows Azure
John Alioto
 
PPTX
What's New for the Windows Azure Developer? Lots!!
Michael Collier
 
PPTX
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
David Chou
 
PDF
How modernizing enterprise applications gives you a competitive advantage
Edward Burns
 
PDF
Windows Azure David Chappell White Paper March 09
guest120d945
 
PPTX
The Windows Azure Platform (MSDN Events Series)
Dave Bost
 
PDF
Best Practices for couchDB developers on Microsoft Azure
Brian Benz
 
PDF
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp
 
DOCX
Microsoft Windows Azure - Introduction to Windows Azure Platform Appfabric fo...
Microsoft Private Cloud
 
PPTX
NWCloud Cloud Track - Overview of Cloud Computing and Windows Azure 101
nwcloud
 
PPTX
Introduction To Cloud Computing Winsows Azure101
Mithun T. Dhar
 
PPTX
Microsoft Azure 新功能導覽 @ Build 2014
Jeff Chu
 
PPTX
Sky High With Azure
Clint Edmonson
 
PDF
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Brian Benz
 
Java on Windows Azure
David Chou
 
CloudConnect 2011 - Building Highly Scalable Java Applications on Windows Azure
David Chou
 
Running Open Source Solutions on Windows Azure
Simon Evans
 
Building Real World Application with Azure
divyapisces
 
Windows Azure & How to Deploy Wordress
George Kanellopoulos
 
Microsoft Azure
Mohab El-Shishtawy
 
Windows Azure
John Alioto
 
What's New for the Windows Azure Developer? Lots!!
Michael Collier
 
Building Highly Scalable Java Applications on Windows Azure - JavaOne S313978
David Chou
 
How modernizing enterprise applications gives you a competitive advantage
Edward Burns
 
Windows Azure David Chappell White Paper March 09
guest120d945
 
The Windows Azure Platform (MSDN Events Series)
Dave Bost
 
Best Practices for couchDB developers on Microsoft Azure
Brian Benz
 
ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp
 
Microsoft Windows Azure - Introduction to Windows Azure Platform Appfabric fo...
Microsoft Private Cloud
 
NWCloud Cloud Track - Overview of Cloud Computing and Windows Azure 101
nwcloud
 
Introduction To Cloud Computing Winsows Azure101
Mithun T. Dhar
 
Microsoft Azure 新功能導覽 @ Build 2014
Jeff Chu
 
Sky High With Azure
Clint Edmonson
 
Big App Workloads on Microsoft Azure - TechEd Europe 2014
Brian Benz
 
Ad

More from David Chou (20)

PDF
Cloud Native Apps
David Chou
 
PPTX
Windows Phone app development overview
David Chou
 
PPTX
Microsoft AI Platform Overview
David Chou
 
PPTX
Designing Artificial Intelligence
David Chou
 
PPTX
Immersive Computing
David Chou
 
PPTX
Java on Windows Azure
David Chou
 
PPTX
Microsoft Azure
David Chou
 
PPTX
Designing Microservices
David Chou
 
PPTX
Combining Private and Public Clouds into Meaningful Hybrids
David Chou
 
PPTX
Windows Azure AppFabric
David Chou
 
PPTX
Scale as a Competitive Advantage
David Chou
 
PPTX
Architecting Cloudy Applications
David Chou
 
PPTX
Kelley Blue Book and Cloud Computing
David Chou
 
PPTX
Windows Phone 7
David Chou
 
PPTX
Silverlight 4 Briefing
David Chou
 
PPTX
Architecting Solutions Leveraging The Cloud
David Chou
 
PPTX
SOA And Cloud Computing
David Chou
 
PPTX
Microsoft Cloud Computing - Windows Azure Platform
David Chou
 
PPTX
Microsoft Database Options
David Chou
 
PPTX
Microsoft Data Access Technologies
David Chou
 
Cloud Native Apps
David Chou
 
Windows Phone app development overview
David Chou
 
Microsoft AI Platform Overview
David Chou
 
Designing Artificial Intelligence
David Chou
 
Immersive Computing
David Chou
 
Java on Windows Azure
David Chou
 
Microsoft Azure
David Chou
 
Designing Microservices
David Chou
 
Combining Private and Public Clouds into Meaningful Hybrids
David Chou
 
Windows Azure AppFabric
David Chou
 
Scale as a Competitive Advantage
David Chou
 
Architecting Cloudy Applications
David Chou
 
Kelley Blue Book and Cloud Computing
David Chou
 
Windows Phone 7
David Chou
 
Silverlight 4 Briefing
David Chou
 
Architecting Solutions Leveraging The Cloud
David Chou
 
SOA And Cloud Computing
David Chou
 
Microsoft Cloud Computing - Windows Azure Platform
David Chou
 
Microsoft Database Options
David Chou
 
Microsoft Data Access Technologies
David Chou
 
Ad

Recently uploaded (20)

PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
July Patch Tuesday
Ivanti
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
July Patch Tuesday
Ivanti
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 

Java on Windows Azure (Cloud Computing Expo 2010)

  • 1. Building Highly Scalable Java Applications on Windows Azure David Chou [email protected] blogs.msdn.com/dachou
  • 2. Agenda • Overview of Windows Azure • Java How-to • Architecting for Scale > Introduction
  • 3. What is Windows Azure? • A cloud computing platform (as-a-service) – on-demand application platform capabilities – geo-distributed Microsoft data centers – automated, model-driven services provisioning and management • You manage code, data, content, policies, service models, etc. – not servers (unless you want to) • We manage the platform – application containers and services, distributed storage systems – service lifecycle, data replication and synchronization – server operating system, patching, monitoring, management – physical infrastructure, virtualization networking – security – “fabric controller” (automated, distributed service management system) > Azure Overview
  • 4. Anatomy of a Windows Azure instance Guest VM Guest VM Guest VM Host VM Maintenance OS, Hardware-optimized hypervisor > Azure Overview > Anatomy of a Windows Azure instance The Fabric Controller communicates with every server within the Fabric. It manages Windows Azure, monitors every application, decides where new applications should run – optimizing hardware utilization. Storage – distributed storage systems that are highly consistent, reliable, and scalable. Compute – instance types: Web Role & Worker Role. Windows Azure applications are built with web role instances, worker role instances, or a combination of both. Each instance runs on its own VM (virtual machine) and local transient storage; replicated as needed HTTP/HTTPS
  • 5. Application Platform Services > Azure Overview > Application Platform Services Storage Dynamic Tabular Data Blobs Message Queues Distributed File System Content Distribution Data Transact-SQL Data Synchronization Relational Database ADO.NET, ODBC, PHP Integration Registry RegistryService Bus Security Claims-Based Identity Federated Identities Secure Token Service Declarative Policies Marketplace Application Marketplace Information Marketplace Frameworks Workflow Hosting Distributed Cache Services Hosting Compute C/C++ Win32 VHD On-Premises Bridging Networking
  • 6. Application Platform Services > Azure Overview > Application Platform Services Compute Storage Data Relational Database Integration Security Marketplace Frameworks Table Storage Blob Storage Queue Drive Content Delivery Network VM Role Networking Connect ApplicationsDataMarket Access Control Service Bus Composite App Caching Web Role Worker Role ReportingDataSync Integration Connect (BizTalk)
  • 7. How this may be interesting to you • Not managing and interacting with server OS – less work for you – don’t have to care it is “Windows Server” (you can if you want to) – but have to live with some limits and constraints • Some level of control – process isolation (runs inside your own VM/guest OS) – service and data geo-location – allocated capacity, scale on-demand – full spectrum of application architectures and programming models • You can run Java! – plus PHP, Python, Ruby, MySQL, memcached, etc. – and eventually anything that runs on Windows > Azure Overview
  • 8. Java and Windows Azure • Provide your JVM – any version or flavor that runs on Windows • Provide your code – no programming constraints (e.g., whitelisting libraries, execution time limit, multi-threading, etc.) – use existing frameworks – use your preferred tools (Eclipse, emacs, etc.) • File-based deployment – no OS-level installation (conceptually extracting a tar/zip with run.bat) • Windows Azure “Worker Role” sandbox – standard user (non-admin privileges; “full trust” environment) – native code execution (via launching sub-processes) – service end points (behind VIPs and load balancers) > Java How-To
  • 9. Some boot-strapping in C# • Kick-off process in WorkerRole.run() – get environment info (assigned end point ports, file locations) – set up local storage (if needed; for configuration, temp files, etc.) – configure diagnostics (Windows Server logging subsystem for monitoring) – launch sub-process(es) to run executable (launch the JVM) • Additional hooks (optional) – Manage role lifecycle – Handle dynamic configuration changes • Free tools – Visual Studio Express – Windows Azure Tools for Visual Studio – Windows Azure Tools for Eclipse/Java (CTP 2010H2) – Windows Azure SDK > Java How-To > Boot-strapping
  • 10. Running Tomcat in Windows Azure Service Instance Service Instance Worker Role RoleEntry Point Sub-Process JVM Tomcat server.xmlCatalina Fabric Controller Load Balancer Table Storage Blob Storage Queue Service Bus Access Control SQL Database new Process() bind port(x) http://instance:x http://instance:y listen port(x) http://app:80 get runtime info index.jsp > Java How-To > Tomcat
  • 11. • Boot-strapping code in WorkerRole.run() • Service end point(s) in ServiceDefinition.csdef Running Jetty in Windows Azure > Java How-To > Jetty string response = ""; try { System.IO.StreamReader sr; string port = RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["HttpIn"].IPEndpoint.Port.ToString(); string roleRoot = Environment.GetEnvironmentVariable("RoleRoot"); string jettyHome = roleRoot + @"approotappjetty7"; string jreHome = roleRoot + @"approotappjre6"; Process proc = new Process(); proc.StartInfo.UseShellExecute = false; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.FileName = String.Format(""{0}binjava.exe"", jreHome); proc.StartInfo.Arguments = String.Format("-Djetty.port={0} -Djetty.home="{1}" -jar "{1}start.jar"", port, jettyHome); proc.EnableRaisingEvents = false; proc.Start(); sr = proc.StandardOutput; response = sr.ReadToEnd(); } catch (Exception ex) { response = ex.Message; Trace.TraceError(response); } <Endpoints> <InputEndpoint name="HttpIn" port="80" protocol="tcp" /> </Endpoints>
  • 12. Current constraints Platform – Dynamic networking • <your app>.cloudapp.net • no naked domain • CNAME re-direct from custom domain • sending traffic to loopback addresses not allowed and cannot open arbitrary ports – No OS-level access – Non-persistent local file system • allocate local storage directory • read-only: Windows directory, machine configuration files, service configuration files – Available registry resources • read-only: HKEY_CLASSES_ROOT, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CURRENT_CONFIG • full access: HKEY_CURRENT_USER > Java How-To > Limitations Java – Sandboxed networking • NIO (java.nio) not supported • engine and host-level clustering • JNDI, JMS, JMX, RMI, etc. • need to configure networking – Non-persistent local file system • logging, configuration, etc. – REST-based APIs to services • Table Storage – schema-less (noSQL) • Blob Storage – large files (<200GB block blobs; <1TB page blobs) • Queues • Service Bus • Access Control
  • 13. Improvements on the way Platform – Networking modeling • well known ports (or fixed VM ports) • port ranges (for inbound traffic) • load balancer control (on/off) • network filters (inter-role access control) – Improved automation • startup tasks (execute OS-level scripts) • role plugins (remote desktop, virtual network, diagnostics, etc.) – Full IIS • multiple websites in same role • virtual directories • applications, modules – Admin access • full administrative access to role instances • reboot/re-image support > Java How-To > Platform Enhancements (Announced; Not Yet Released) Java – Traditional deployment models • deploy your own Java EE stack • configure internal networking – More frameworks, packages, and extended languages • verify deployment and configuration – Solution accelerators • with bootstrapping and configuration – Java API support • Windows Azure SDK v2.0 (announced at PDC10) • www.windowsazure4j.org – Development tools • Windows Azure Tools for Eclipse/Java (CTP 2010H2)
  • 14. • Execute startup script in ServiceDefinition.csdef • Service end point(s) in ServiceDefinition.csdef Running Jetty with admin access + fixed ports > Java How-To > Platform Enhancements (Announced; Not Yet Released) <Startup> <Task commandLine=“runme.cmd" executionContext=“elevated" TaskType=“background"> </Task> </Startup> <Endpoints> <InputEndpoint name="HttpIn" protocol=“http" port="80" localPort="80" /> </Endpoints>
  • 15. Running Fujitsu Interstage App Server JavaEE 6 – Based on Glassfish 3.1 – Complete JavaEE execution environment – Service Integrator SOA Platform > Java How-To > Platform Enhancements (Announced; Not Yet Released) Windows Azure 1.3 SDK – Loopback adapter is no longer blocked – Enabled Java NIO – Enabled Port Ranges: for “inbound traffic” (as opposed to 5 in the past) Service end point(s) in ServiceDefinition.csdef
  • 16. • Worker Role – fabric sandbox native deployment – automated, need additional code – available now • Admin Access – script-based installation and execution – automated, need scripts – available shortly (not yet released) • VM Role – host your own pre-configured VM image – automated, full control – available later (not yet released) Deployment Options > Java How-To > Platform Enhancements (Announced; Not Yet Released)
  • 17. • Runtime – Multiple Java app servers – Any Windows-based JRE • Supports – Windows Azure Storage – Windows Azure Drive – Windows Azure AppFabric – SQL Azure • One-click cloud deployment • Integrated diagnostics, monitoring, and logging Windows Azure Tools for Eclipse/Java > Java How-To > Platform Enhancements (Announced; Not Yet Released)
  • 18. Accessing SQL Azure from Java > Java How-To > SQL Azure • SQL Azure Database – Full relational Database as a Service • Supports TDS & OData • Direct connectivity to SQL Azure – Connect with JDBC/ODBC using the latest driver – Eclipse tooling support • Interoperability using REST – Easily wrap SQL Azure with WCF Data Services – Restlet extension for OData (Java) • Committed to OSS support and app compatibility
  • 19. Accessing Windows Azure Storage from Java > Java How-To > Windows Azure Storage • Windows Azure SDK for Java – Enables Java developers to develop against Windows Azure Storage & Service Management infrastructure using familiar & consistent programming model • Features – Set of Java classes for Windows Azure Blobs, Tables & Queues (for CRUD operations) & Service Management – Helper Classes for HTTP transport, AuhN/AuthZ, REST & Error Management – Manageability, Instrumentation & Logging(log4j) • Open Source Project site: – Developed by our Partner Soyatec – www.windowsazure4j.org Windows Azure SDK for Java Blobs, Tables, Queues Manageability, Instrumentation, logging Helper for Http, Auth, REST, Error Your Java application REST
  • 20. Accessing Windows Azure AppFabric from Java > Java How-To > Windows Azure AppFabric • Usage Patterns – Extends reach of applications securely through the cloud – Securely integrates partners outside of org boundaries – Extends reach of on-premises web services layer – Enables leveraging cloud quickly without having to rewrite apps • App Fabric SDK for Java Developers – Open source software development kit (SDK) – a set of libraries, tools, Prescriptive guidance – sample applications • Open Source Project site: – Developed by our partner Persistent Systems Limited – www.jdotnetservices.com
  • 21. Additional Cloud Interop Options Application-layer Connectivity & Messaging > Cloud Scenarios
  • 22. Facebook (2009) • +200B pageviews /month • >3.9T feed actions /day • +300M active users • >1B chat mesgs /day • 100M search queries /day • >6B minutes spent /day (ranked #2 on Internet) • +20B photos, +2B/month growth • 600,000 photos served /sec • 25TB log data /day processed thru Scribe • 120M queries /sec on memcache > Architecting for Scale Size matters Twitter (2009) • 600 requests /sec • avg 200-300 connections /sec; peak at 800 • MySQL handles 2,400 requests /sec • 30+ processes for handling odd jobs • process a request in 200 milliseconds in Rails • average time spent in the database is 50-100 milliseconds • +16 GB of memcached Google (2007) • +20 petabytes of data processed /day by +100K MapReduce jobs • 1 petabyte sort took ~6 hours on ~4K servers replicated onto ~48K disks • +200 GFS clusters, each at 1- 5K nodes, handling +5 petabytes of storage • ~40 GB /sec aggregate read/write throughput across the cluster • +500 servers for each search query < 500ms • >1B views / day on Youtube (2009) Myspace (2007) • 115B pageviews /month • 5M concurrent users @ peak • +3B images, mp3, videos • +10M new images/day • 160 Gbit/sec peak bandwidth Flickr (2007) • +4B queries /day • +2B photos served • ~35M photos in squid cache • ~2M photos in squid’s RAM • 38k req/sec to memcached (12M objects) • 2 PB raw storage • +400K photos added /day Source: multiple articles, High Scalability http://highscalability.com/
  • 23. app server • Common characteristics – synchronous processes – sequential units of work – tight coupling – stateful – pessimistic concurrency – clustering for HA – vertical scaling Traditional scale-up architecture > Architecting for Scale > Vertical Scaling app serverweb data store units of work web data store
  • 24. app server app server Traditional scale-up architecture > Architecting for Scale > Vertical Scaling web data storeweb • To scale, get bigger servers – expensive – has scaling limits – inefficient use of resources
  • 25. data storeapp server Traditional scale-up architecture > Architecting for Scale > Vertical Scaling app serverweb web • When problems occur – bigger failure impact
  • 26. Traditional scale-up architecture > Architecting for Scale > Vertical Scaling app serverweb data storeweb • When problems occur – bigger failure impact – more complex recovery
  • 27. Use more pieces, not bigger pieces LEGO 10179 Ultimate Collector's Millennium Falcon • 33 x 22 x 8.3 inches (L/W/H) • 5,195 pieces LEGO 7778 Midi-scale Millennium Falcon • 9.3 x 6.7 x 3.2 inches (L/W/H) • 356 pieces > Architecting for Scale > Horizontal scaling
  • 28. app server Scale-out architecture > Architecting for Scale > Horizontal scaling app serverweb data store • Common characteristics – small logical units of work – loosely-coupled processes – stateless – event-driven design – optimistic concurrency – partitioned data – redundancy fault-tolerance – re-try-based recoverability web data store
  • 29. app server app server app server app server app server Scale-out architecture > Architecting for Scale > Horizontal scaling app serverweb data store web web web data store web web • To scale, add more servers – not bigger servers data store data store data store data store
  • 30. app server app server app server app server app server app server Scale-out architecture > Architecting for Scale > Horizontal scaling web data store web web web data store web web • When problems occur – smaller failure impact – higher perceived availability data store data store data store data store
  • 31. app server app server app server Scale-out architecture > Architecting for Scale > Horizontal scaling app serverweb data store web web app server web data store web web • When problems occur – smaller failure impact – higher perceived availability – simpler recovery data store data store data store data store
  • 32. app server app server • Scalable performance at extreme scale – asynchronous processes – parallelization – smaller footprint – optimized resource usage – reduced response time – improved throughput app server app server Scale-out architecture + distributed computing > Architecting for Scale > Horizontal scaling app serverweb data store web web app server web data store web web data store data store data store data store parallel tasks async tasks perceived response time
  • 33. app server app server • When problems occur – smaller units of work – decoupling shields impact app server app server Scale-out architecture + distributed computing > Architecting for Scale > Horizontal scaling app serverweb data store web web app server web data store web web data store data store data store data store
  • 34. app server • When problems occur – smaller units of work – decoupling shields impact – even simpler recovery app server app server Scale-out architecture + distributed computing > Architecting for Scale > Horizontal scaling app serverweb data store web web app server web data store web web data store data store data store data store
  • 35. Live Journal (from Brad Fitzpatrick, then Founder at Live Journal, 2007) > Architecting for Scale > Cloud Architecture Patterns Partitioned Data Distributed Cache Web Frontend Distributed Storage Apps & Services
  • 36. Flickr (from Cal Henderson, then Director of Engineering at Yahoo, 2007) > Architecting for Scale > Cloud Architecture Patterns Partitioned Data Distributed Cache Web Frontend Distributed Storage Apps & Services
  • 37. SlideShare (from John Boutelle, CTO at Slideshare, 2008) > Architecting for Scale > Cloud Architecture Patterns Partitioned Data Distributed Cache Web Frontend Distributed Storage Apps & Services
  • 38. Twitter (from John Adams, Ops Engineer at Twitter, 2010) > Architecting for Scale > Cloud Architecture Patterns Partitioned Data Distributed Cache Web Frontend Distributed Storage Apps & Services Queues Async Processes
  • 39. 2010 stats (Source: http://www.facebook.com/press/info.php?statistics) – People • +500M active users • 50% of active users log on in any given day • people spend +700B minutes /month – Activity on Facebook • +900M objects that people interact with • +30B pieces of content shared /month – Global Reach • +70 translations available on the site • ~70% of users outside the US • +300K users helped translate the site through the translations application – Platform • +1M developers from +180 countries • +70% of users engage with applications /month • +550K active applications • +1M websites have integrated with Facebook Platform • +150M people engage with Facebook on external websites /month > Architecting for Scale > Cloud Architecture Patterns Facebook (from Jeff Rothschild, VP Technology at Facebook, 2009) Partitioned Data Distributed Cache Web Frontend Distributed Storage Apps & Services Parallel Processes Async Processes
  • 40. Windows Azure platform components Apps & Services Services Web Frontend QueuesDistributed Storage Distributed Cache Partitioned Data > Architecting for Scale > Cloud Architecture Patterns Content Delivery Network Load Balancer IIS Web Server VM Role Worker Role Web Role Caching Queues Access Control Composite App Blobs Relational Database Tables Drives Service Bus Reporting DataSync Virtual Network Connect
  • 41. Fundamental concepts > Architecting for Scale • Vertical scaling still works
  • 42. Fundamental concepts > Architecting for Scale • Horizontal scaling for cloud computing • Small pieces, loosely coupled • Distributed computing best practices – asynchronous processes (event-driven design) – parallelization – idempotent operations (handle duplicity) – de-normalized, partitioned data (sharding) – shared nothing architecture – optimistic concurrency – fault-tolerance by redundancy and replication – etc.
  • 43. Partitioned data > Architecting for Scale > Fundamental Concepts Shared nothing architecture – transaction locality (partition based on an entity that is the “atomic” target of majority of transactional processing) – loosened referential integrity (avoid distributed transactions across shard and entity boundaries) – design for dynamic redistribution and growth of data (elasticity) Cloud computing friendly – divide & conquer – size growth with virtually no limits – smaller failure surface Windows Azure platform services – Table Storage Service – SQL Azure – AppFabric Caching (coming soon) – SQL Azure DB federation (coming soon) Web Role QueuesWeb Role Web Role Worker Role Relational Database Relational Database Relational Database Web Role read write
  • 44. Asynchronous processes & parallelization > Architecting for Scale > Fundamental Concepts Defer work as late as possible – return to user as quickly as possible – event-driven design (instead of request- driven) Cloud computing friendly – distributes work to more servers (divide & conquer) – smaller resource usage/footprint – smaller failure surface – decouples process dependencies Windows Azure platform services – Queue Service – AppFabric Service Bus – inter-node communication Worker Role Web Role Queues Service BusWeb Role Web Role Web Role Worker Role Worker Role Worker Role
  • 45. Idempotent operations > Architecting for Scale > Fundamental Concepts Repeatable processes – allow duplicates (additive) – allow re-tries (overwrite) – reject duplicates (optimistic locking) – stateless design Cloud computing friendly – resiliency Windows Azure platform services – Queue Service – AppFabric Service Bus Worker Role Service Bus Worker Role Worker Role
  • 46. At most two of these properties for any shared-data system C A P Consistency + Availability • High data integrity • Single site, cluster database, LDAP, xFS file system, etc. • 2-phase commit, data replication, etc. C A P Consistency + Partition • Distributed database, distributed locking, etc. • Pessimistic locking, minority partition unavailable, etc. C A P Availability + Partition • High scalability • Distributed cache, DNS, etc. • Optimistic locking, expiration/leases, etc. CAP (Consistency, Availability, Partition) Theorem > Architecting for Scale > Fundamental Concepts Source: “Towards Robust Distributed Systems”, Dr. Eric A. Brewer, UC Berkeley
  • 47. Hybrid architectures > Architecting for Scale > Fundamental Concepts Scale-out (horizontal) – BASE: Basically Available, Soft state, Eventually consistent – focus on “commit” – conservative (pessimistic) – shared nothing – favor extreme size – e.g., user requests, data collection & processing, etc. Scale-up (vertical) – ACID: Atomicity, Consistency, Isolation, Durability – availability first; best effort – aggressive (optimistic) – transactional – favor accuracy/consistency – e.g., BI & analytics, financial processing, etc. Most distributed systems employ both approaches
  • 48. Lastly… Windows Azure is an open & interoperable cloud platform Microsoft is committed to Java, and we are on a journey – please give us your feedback & participate in open source projects Diverse Choice of Development Tools for Java Developers – Eclipse Tools for Windows Azure – Write Modern Cloud Application – Tomcat Solutions Accelerator – Admin Access & VM Role – Windows Azure Platform SDKs for Java Developers • Windows Azure SDK (Storage, Diagnostics & Service Management) • App Fabric SDK (Service Bus & Access Control Services) • Restlet extension for OData (Java) For more information: – http://windowsazure.com/interop – http://www.interoperabilitybridges.com > Wrap-Up
  • 49. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. Thank you! David Chou [email protected] blogs.msdn.com/dachou

Editor's Notes

  • #2: Microsoft's Windows Azure platform is a virtualized and abstracted application platform that can be used to build highly scalable and reliable applications, with Java. The environment consists of a set of services such as NoSQL table storage, blob storage, queues, relational database service, internet service bus, access control, and more. Java applications can be built using these services via Web services APIs, and your own Java Virtual Machine, without worrying about the underlying server OS and infrastructure. Highlights of this session will include: • An overview of the Windows Azure environment • How to develop and deploy Java applications in Windows Azure • How to architect horizontally scalable applications in Windows Azure
  • #29: To build for big scale – use more of the same pieces, not bigger pieces; though a different approach may be needed
  • #37: Source: http://danga.com/words/2007_06_usenix/usenix.pdf
  • #38: Source: http://highscalability.com/blog/2007/11/13/flickr-architecture.html
  • #39: Source: http://www.slideshare.net/jboutelle/scalable-web-architectures-w-ruby-and-amazon-s3
  • #40: Source: http://www.slideshare.net/netik/billions-of-hits-scaling-twitter Source: http://highscalability.com/blog/2009/6/27/scaling-twitter-making-twitter-10000-percent-faster.html
  • #41: Source: http://highscalability.com/blog/2009/10/12/high-performance-at-massive-scale-lessons-learned-at-faceboo-1.html
  • #43: Picture source: http://pdp.protopak.net/Belltheous90/DeathStarII.gif