Scaling Application<br />ESRI Developer Summit - 2011<br />Alaor Bianco 		abianco@img.com.br 	@alaorbianco<br />IMAGEM - B...
Agenda<br />Some good practices and tools<br />Cache<br />Instrumentation<br />Performance counters<br />How did good prac...
Introduction<br />The main idea<br />Only who knows can take control!<br />Understand the application behavior<br />Unders...
Scaling<br />Scale up (Scale vertically)<br />Scale out (Scale horizontally)<br />
Where to use?<br />Why to use?<br />Reduce data transfer in inter-process communication<br />Reduce data processing<br />R...
Map Caching<br />Different scales<br />Improvements to <br />    map cache tile <br />    generation (10.0)<br />Feature C...
Negative Caching<br />Failed requests<br />Low expiration<br />Fail Fast, Fail Cheap<br />Avoid cascade effects<br />Cachi...
Caching<br /><ul><li>Windows Server AppFabric Caching </li></ul>			(Distributed Cache)<br />Throughput : Amount of data tr...
Caching<br />.NET 4.0 System.Runtime.Caching<br />Ncache<br />Memcached<br />Varnish (html)<br />Wikipedia<br />Flickr<br ...
Asynchronous Processing<br />Heavy Processing<br />Queue<br />Examples:<br /><ul><li>MSMQ
Queue Class</li></li></ul><li>Log and Trace<br />Audit<br />Diagnostic<br />Analyze<br />Behavior<br />Lifecycle<br />Inst...
Interception Methods from Microsoft Enterprise Library Application Block<br />publicclassReader : IOperation<br />{<br /> ...
Different levels<br />Debug<br />Error<br />Info<br />Notice<br />Warn<br />Network<br />Logs<br />Others:<br /><ul><li>Lo...
Scribe</li></ul>facebook<br />
Instrumentation<br />What´s alive<br />What´s Processing<br />What´s Processed<br />Performance<br />Statistics<br />Avail...
Performance Counters from Microsoft Enterprise Library Application Block<br />Can use Interception just like Logs<br />Can...
Scalability<br />Server do not need to maintain state for each<br />Request<br />User<br />Etc<br />Scaling Horizontally<b...
How did it help us? <br />Understand the application flow, lifecycle and behavior<br />Identify bottleneck<br />Identify i...
ASP.NET Web Controls<br />
ASP.NET Web Controls<br />Server side processed<br />Viewstate<br />For each callback all viewstate is sent to server<br /...
Architecture<br />
Architecture<br />MVC<br />Easy to test<br />AJAX instead of callback<br />COM Objects lifecycle management<br />Applicati...
Started on ArcGIS Server 9.2<br />GIS Framework with our own well known interfaces, implementation and services<br />Migra...
Migration to AGS 10 (took a little more!!)<br />Write the controller layer as a SOE<br />Write the framework initializer t...
Comparison - Login<br />System A  – Service<br />Others      – Webcontrol   (Initialization)<br />
Comparison - Zoom<br />System A  – Service<br />Others      – Webcontrol   (Zoom)<br />
Comparison<br />System A was able to support 900 simultaneous users<br />System B was able to support no more than 30<br /...
Performance Tests<br />Load Tests in VisualStudio<br />Web Performance Test<br />
Performance Tests<br />Load Test<br />
Performance Tests<br />
Performance Tests<br />
Performance Tests<br />
Upcoming SlideShare
Loading in...5
×

Scaling Application

597

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
597
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
12
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Scaling Application

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

    Clipping is a handy way to collect important slides you want to go back to later.

×