Scaling Application
Upcoming SlideShare
Loading in...5
×
 

Scaling Application

on

  • 740 views

 

Statistics

Views

Total Views
740
Views on SlideShare
583
Embed Views
157

Actions

Likes
1
Downloads
11
Comments
0

3 Embeds 157

http://www.alaorbianco.com 147
http://alaorbianco.blogspot.com 8
http://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Scaling Application Scaling Application Presentation Transcript

  • Scaling Application
    ESRI Developer Summit - 2011
    Alaor Bianco abianco@img.com.br @alaorbianco
    IMAGEM - BRAZIL
  • Agenda
    Some good practices and tools
    Cache
    Instrumentation
    Performance counters
    How did good practices help us?
    Webcontrol approach vs. service approach
    Performance tests
  • Introduction
    The main idea
    Only who knows can take control!
    Understand the application behavior
    Understand the application lifecycle
  • Scaling
    Scale up (Scale vertically)
    Scale out (Scale horizontally)
  • Where to use?
    Why to use?
    Reduce data transfer in inter-process communication
    Reduce data processing
    Reduce disk access
    Types
    Files based (disk)
    InMemory
    Pre-Build Caching
    On-Demand Caching
    Caching
  • Map Caching
    Different scales
    Improvements to
    map cache tile
    generation (10.0)
    Feature Caching
    EsriFeatureCache
    GeoFeatureCache (NoSQL and InMemory)
    Caching
  • Negative Caching
    Failed requests
    Low expiration
    Fail Fast, Fail Cheap
    Avoid cascade effects
    Caching
  • Caching
    • Windows Server AppFabric Caching
    (Distributed Cache)
    Throughput : Amount of data transferred
    Latency: Time delay
    Load: Work
  • Caching
    .NET 4.0 System.Runtime.Caching
    Ncache
    Memcached
    Varnish (html)
    Wikipedia
    Flickr
    Twitter
    Youtube
    Digg
    WordPress
    Craigslist
  • Asynchronous Processing
    Heavy Processing
    Queue
    Examples:
    • MSMQ
    • Queue Class
  • Log and Trace
    Audit
    Diagnostic
    Analyze
    Behavior
    Lifecycle
    Instrumentation
  • Interception Methods from Microsoft Enterprise Library Application Block
    publicclassReader : IOperation
    {
    [Common.Logging.Interception.Log]
    public override IEnumerable<Row>
    Execute(IEnumerable<Row> rows)
    {
    Log or Trace - Sample
  • Different levels
    Debug
    Error
    Info
    Notice
    Warn
    Network
    Logs
    Others:
    • Log4Net
    • Scribe
    facebook
  • Instrumentation
    What´s alive
    What´s Processing
    What´s Processed
    Performance
    Statistics
    Available Resource
    Performance Counters
  • Performance Counters from Microsoft Enterprise Library Application Block
    Can use Interception just like Logs
    Can be injected by IoC (Dependency Injection)
    Performance Counters
  • Scalability
    Server do not need to maintain state for each
    Request
    User
    Etc
    Scaling Horizontally
    One server do not worry about a state create by another one
    Stateless
  • How did it help us?
    Understand the application flow, lifecycle and behavior
    Identify bottleneck
    Identify improvement points
    Based on this information, build a good architecture
  • ASP.NET Web Controls
  • ASP.NET Web Controls
    Server side processed
    Viewstate
    For each callback all viewstate is sent to server
    For each callback all webcontrol fires onLoad event
  • Architecture
  • Architecture
    MVC
    Easy to test
    AJAX instead of callback
    COM Objects lifecycle management
    Application Container has all active objects reference
    Layers
    Map
    etc
  • Started on ArcGIS Server 9.2
    GIS Framework with our own well known interfaces, implementation and services
    Migration to AGS 9.3.1 took 5 hours
    Architecture
  • Migration to AGS 10 (took a little more!!)
    Write the controller layer as a SOE
    Write the framework initializer to get map objects references
    Can return JSON, GeoJSON or XML
    Was able to reuse all our business layer!!
    Architecture
  • Comparison - Login
    System A – Service
    Others – Webcontrol (Initialization)
  • Comparison - Zoom
    System A – Service
    Others – Webcontrol (Zoom)
  • Comparison
    System A was able to support 900 simultaneous users
    System B was able to support no more than 30
    *Same operational environment (Hardware and Software)
  • Performance Tests
    Load Tests in VisualStudio
    Web Performance Test
  • Performance Tests
    Load Test
  • Performance Tests
  • Performance Tests
  • Performance Tests
  • Thanks and Questions