SlideShare uma empresa Scribd logo
1 de 25
Building Scalable .NET Applications
Guy Nirpaz,
EVP R&D, GigaSpaces Technologies
Who am I?

•   3 Years with GigaSpaces
     – VP of R&D
     – Speaker at dev conferences:
          • Agile, Technology, Architecture
•   Veteran of several Startups
•   Spent most of my life in design and architecture of
    complex systems
     – Financial Services, Command and Control, Teleco
     – Mercury, IBM, others
•   Contact:
     – guyn@gigspaces.com
     – @gnirpaz – Twitter
     – jroller.com/gnirpaz - Blog
About GigaSpaces

•   A Scale-Out Platform, optimized for distributed and virtualized
    environments:
     – Any deployment environments: clouds, grids, commodity servers, multi-core
     – Any languages: Spring/Java, .Net, C++, Dynamic


•   Driven by the need for:
     – confidence to handle unpredictable demand and peak loads;
     – guaranteed performance under any processing loads;
     – cost-effective, on-demand scalability for clouds and grids
     – rapidly develop, change and scale applications
Explore technical and business
  challenges of building scalable
 applications. Analyze fundamental
architecture limitations and propose
    cost-effective alternative
The typical scenario…




      Michael Jackson
    Tickets are on Sale!




                           Your Application
Solution: Linear and Dynamic Scalability




                   Linear Dynamic Scalability
Traditional Tier Based Architecture is not scalable

                                   Business tier



        • Relies on centralized resources
        • HardTier install:
               to
           Web
            • Bound to static resources (IPs, disk drives,
  Load
 Balancer
              etc.)
        • Separate clustering model for each tier
        • Hard to maintain           Back-up
                   Back-up

        • Non-scalable                       Back-up




                       Messaging
Peak loads are unpredictable

•               Constant transaction, data and user growth
•               Volatile and unpredictable loads



1,300,000,000


1,200,000,000


1,100,000,000


1,000,000,000


 900,000,000


 800,000,000


 700,000,000


 600,000,000


 500,000,000


 400,000,000


 300,000,000


 200,000,000


 100,000,000


           0
                J-04 M-04 M-04 J-04 S-04 N-04 J-05 M-05 M-05 J-05 S-05 N-05 J-06 M-06 M-06 J-06 S-06 N-06 J-07 M-07 M-07 J-07 S-07
Scalability Disasters Are More Common Than Ever




                                        • Lost customers
                                        • Lost revenues
                                        • Brand damage
Micro-Blogging (ala Twitter) Example



                                Read
                               Service
                    IIS
                               Publish
                               Service
          Load
 Users
         Balancer              Application
                                             Data
                                             Base

                                Read
                               Service
                    IIS
                               Publish
                               Service
                               Application
Reader/Publisher Service

namespace MicroBlog.Services
{
  public interface IReaderService
  {
          ICollection<Post> GetUserPosts(String userID);

         ICollection<Post> GetUserPosts(String userID, DateTime fromDate);
    }
}


namespace MicroBlog.Services
{
  public interface IPublisherService
  {
        void PublishPost(Post post);
  }
}
What happens on success

Users



                                  Read           The database becomes
                                 Service
                                                 the bottleneck
                                      Read
                   IIS              Service
                                 Publish
                                 Service
         Load        IIS           Publish
        Balancer                    Service
                                Application
                                                          Data
                          IIS     Application
                                                          Base

                                 Read
                                Service
                                    Read
                   IIS             Service
                                 Publish
                    IIS          Service
                                     Publish
                                     Service
                         IIS    Application
                                   Application
Reader – Database Implementation
 public ICollection<Post> GetUserPosts(string userID, DateTime
 fromDate)
    {
          // Create command:
          IDbCommand dbCommand =
                   _dbConnection.CreateCommand();
                   dbCommand.CommandText = String.Format(
                                  quot;SELECT * FROM Post WHERE
                                  UserID='{0}' AND PostedOn > {1}quot;,
                                  userID, fromDate);

                         // Execute command:
         IDataReader dataReader = dbCommand.ExecuteReader();

         // Translate results from db records to .NET objects:
         List<Post> result = ReadPostsFromDataReader(dataReader);

         // Return results:
         return result;
 }
Step I – Remove DB Bottlenecks with Caching



• Reduce I/O bottlenecks – less
  DB access
• In-Memory caching
         Load
Users
        Balancer
• Reduced Network hops (if in-
                            Read         Cache
                                                   Data
                  IIS      Service
                                         Service
  process)                                         Base
                           Publish
• Suitable for read-mostly apps
                           Service
                           Application
Reader – Space Implementation

public ICollection<Post> GetUserPosts(String userID)
{
         // Create a template to get all posts by a user id:
         Post template = new Post();
         template.UserID = userID;

         // Use space proxy to read entries matching template:
         Post[] result = _spaceProxy.ReadMultiple(template);

         // Return result:
         return result;
}
Step II – Linear Scalability: Partitioning and Collocation

                                 Reader
                                          Space
                                 Writer



                                 Reader
                                          Space
                                 Writer
                   IIS
         Load
Users
        Balancer
                                 Reader
                                          Space
                   IIS                                  Data
                                 Writer
                                                        Base
                   IIS
                                 Reader
                                          Space
                   IIS           Writer



                                 Reader
                                          Space
                                 Writer
Post Life Cycle




                             Reader           Writer
Poster
          Load                                         Post.NEW
         Balancer   Reader
                    Client
                              Post.VALID
                    Writer
                    Client
                                      Space
                     IIS


Reader
Writer Client

public class SpacePublisherService : IPublisherService
{
  private readonly ISpaceProxy _spaceProxy;


     public void PublishPost(Post post)
    {
            this._spaceProxy.Write(post);
    }
}
Event Driven Programming – Writer Example

[PollingEventDriven, TransactionalEvent]
public class PendingPostsProcessor
{
  [DataEventHandler]
  public Post ProcessPendingPost(Post post)
  {
      PostStatus newStatus = PostStatus.Published;
      foreach (String illegalWord in _illegalWords)
      if (post.Subject.Contains(illegalWord) || post.Body.Contains(illegalWord))
      {
           newStatus = PostStatus.Rejected;
           break;
      }
      // Set new status:
      post.Status = newStatus;
  }
  return post;
}
Read Life Cycle




                             Reader           Writer
Poster
          Load
         Balancer   Reader
                    Client
                    Writer
                                        Post
                    Client
                                          Post
                                      Space Post
                     IIS


Reader
Step II – Linear Scalability: Partitioning and Collocation

                                 Reader
                                          Space
                                 Writer



                                 Reader
                                          Space
                                 Writer
                   IIS
         Load
Users
        Balancer
                                 Reader
                                          Space
                   IIS                                  Data
                                 Writer
                                                        Base
                   IIS
                                 Reader
                                          Space
• Collocation –    write/read
                          within the same process
                   IIS        Writer


• Partitioning and Content-Based Routing
                              Reader
                                     Space
• Async Writes to the DatabaseWriter
Step III – Dynamic Scalability

  Monitor
 Provision

                                 Reader
                                          Space
                                 Writer
             Load
Users
            Balancer
                                 Reader
                                          Space
                       IIS                        Data
                                 Writer
                                                  Base
                       IIS
                                 Reader
                                          Space
• SLA Driven Policies            Writer


• Dynamic Scalability
• Self healing
Space Based Architecture Values

•   Linear Scalability
     – Predictable cost model – pay per value
     – Predictable growth model
•   Dynamic
     – On demand – grow only when needed
     – Scale back when resources are not needed anymore
•   SLA Driven
     – Automatic
     – Self healing
     – Application aware
•   Simple
     – Non intrusive programming model
     – Single clustering Model
Questions?
GigaSpaces Home Page:
          http://www.gigaspaces.com/


GigaSpaces XAP Product Overview:
http://www.gigaspaces.com/wiki/display/XAP7/Concepts



  GigaSpaces XAP for the Cloud:
            http://www.gigaspaces.com/cloud

Mais conteúdo relacionado

Mais procurados

Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Chris Richardson
 
Load Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net ScalerLoad Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net Scaler
Digicomp Academy AG
 
Java EE7: Developing for the Cloud
Java EE7: Developing for the CloudJava EE7: Developing for the Cloud
Java EE7: Developing for the Cloud
Dmitry Buzdin
 
.NetCampus Windows Azure Mobile
.NetCampus Windows Azure Mobile.NetCampus Windows Azure Mobile
.NetCampus Windows Azure Mobile
antimo musone
 
AWS Cloud School | London - Part 1
AWS Cloud School | London - Part 1AWS Cloud School | London - Part 1
AWS Cloud School | London - Part 1
Amazon Web Services
 
eBay Architecture
eBay Architecture eBay Architecture
eBay Architecture
Tony Ng
 

Mais procurados (20)

Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
 
Windows Azure Design Patterns
Windows Azure Design PatternsWindows Azure Design Patterns
Windows Azure Design Patterns
 
Load Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net ScalerLoad Balancing und Beschleunigung mit Citrix Net Scaler
Load Balancing und Beschleunigung mit Citrix Net Scaler
 
IBM Cloud PowerVS - AIX and IBM i on Cloud
IBM Cloud PowerVS - AIX and IBM i on CloudIBM Cloud PowerVS - AIX and IBM i on Cloud
IBM Cloud PowerVS - AIX and IBM i on Cloud
 
Sql azure database under the hood
Sql azure database under the hoodSql azure database under the hood
Sql azure database under the hood
 
SQL Azure Federation and Scalability
SQL Azure Federation and ScalabilitySQL Azure Federation and Scalability
SQL Azure Federation and Scalability
 
Paving the Way to IT-as-a-Service
Paving the Way to IT-as-a-ServicePaving the Way to IT-as-a-Service
Paving the Way to IT-as-a-Service
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
 
AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...
 
Java EE7: Developing for the Cloud
Java EE7: Developing for the CloudJava EE7: Developing for the Cloud
Java EE7: Developing for the Cloud
 
.NetCampus Windows Azure Mobile
.NetCampus Windows Azure Mobile.NetCampus Windows Azure Mobile
.NetCampus Windows Azure Mobile
 
AWS Cloud School | London - Part 1
AWS Cloud School | London - Part 1AWS Cloud School | London - Part 1
AWS Cloud School | London - Part 1
 
Security and Privacy in the Cloud - Stephen Schmidt - AWS Summit 2012 Australia
Security and Privacy in the Cloud - Stephen Schmidt - AWS Summit 2012 AustraliaSecurity and Privacy in the Cloud - Stephen Schmidt - AWS Summit 2012 Australia
Security and Privacy in the Cloud - Stephen Schmidt - AWS Summit 2012 Australia
 
An Overview of Designing Microservices Based Applications on AWS - March 2017...
An Overview of Designing Microservices Based Applications on AWS - March 2017...An Overview of Designing Microservices Based Applications on AWS - March 2017...
An Overview of Designing Microservices Based Applications on AWS - March 2017...
 
Best Practices for Getting Started with AWS
Best Practices for Getting Started with AWSBest Practices for Getting Started with AWS
Best Practices for Getting Started with AWS
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
MED303 Addressing Security in Media Workflows - AWS re: Invent 2012
 
appengine ja night #24 Google Cloud Endpoints and BigQuery (English)
appengine ja night #24 Google Cloud Endpoints and BigQuery (English)appengine ja night #24 Google Cloud Endpoints and BigQuery (English)
appengine ja night #24 Google Cloud Endpoints and BigQuery (English)
 
eBay Architecture
eBay Architecture eBay Architecture
eBay Architecture
 

Destaque

PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
Steve Lange
 
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
Steve Lange
 
.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal
Rishu Mehra
 
Performance Tuning of .NET Application
Performance Tuning of .NET ApplicationPerformance Tuning of .NET Application
Performance Tuning of .NET Application
Mainul Islam, CSM®
 
Building Scalable .NET Web Applications
Building Scalable .NET Web ApplicationsBuilding Scalable .NET Web Applications
Building Scalable .NET Web Applications
Buu Nguyen
 
10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites
oazabir
 

Destaque (11)

PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
PHX Session #3 - "It Works on My Machine!" Closing the Loop Between Developme...
 
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
PHX - Session #2 Test Driven Development: Improving .NET Application Performa...
 
.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal.Net Performance by Bijoy Singhal
.Net Performance by Bijoy Singhal
 
Improving Performance in .NET Applications
Improving Performance in .NET ApplicationsImproving Performance in .NET Applications
Improving Performance in .NET Applications
 
Performance Tuning of .NET Application
Performance Tuning of .NET ApplicationPerformance Tuning of .NET Application
Performance Tuning of .NET Application
 
Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"Adam Sitnik "State of the .NET Performance"
Adam Sitnik "State of the .NET Performance"
 
How to Do a Performance Audit of Your .NET Website
How to Do a Performance Audit of Your .NET WebsiteHow to Do a Performance Audit of Your .NET Website
How to Do a Performance Audit of Your .NET Website
 
Building Scalable .NET Web Applications
Building Scalable .NET Web ApplicationsBuilding Scalable .NET Web Applications
Building Scalable .NET Web Applications
 
10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites10 performance and scalability secrets of ASP.NET websites
10 performance and scalability secrets of ASP.NET websites
 
Four Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance ProblemsFour Practices to Fix Your Top .NET Performance Problems
Four Practices to Fix Your Top .NET Performance Problems
 
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your PipelineMetrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
Metrics Driven DevOps - Automate Scalability and Performance Into your Pipeline
 

Semelhante a Building Scalable .NET Apps

Overview of Azure and Cloud Computing
Overview of Azure and Cloud ComputingOverview of Azure and Cloud Computing
Overview of Azure and Cloud Computing
Abhishek Sur
 
Intel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdf
Intel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdfIntel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdf
Intel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdf
OpenStack Foundation
 
A great api is hard to find
A great api is hard to findA great api is hard to find
A great api is hard to find
Dan Diephouse
 
[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform
[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform
[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform
Vitor Tomaz
 

Semelhante a Building Scalable .NET Apps (20)

Overview of Azure and Cloud Computing
Overview of Azure and Cloud ComputingOverview of Azure and Cloud Computing
Overview of Azure and Cloud Computing
 
Intel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdf
Intel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdfIntel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdf
Intel IT OpenStack Journey - OpenStack Fall 2012 Summit.pdf
 
Development Model for The Cloud
Development Model for The CloudDevelopment Model for The Cloud
Development Model for The Cloud
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
SwiftKnowledge Multitenancy
SwiftKnowledge MultitenancySwiftKnowledge Multitenancy
SwiftKnowledge Multitenancy
 
A great api is hard to find
A great api is hard to findA great api is hard to find
A great api is hard to find
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere Connect
 
Windows Azure Platform Overview
Windows Azure Platform OverviewWindows Azure Platform Overview
Windows Azure Platform Overview
 
Windows Azure For Architects
Windows Azure For ArchitectsWindows Azure For Architects
Windows Azure For Architects
 
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
IBM Z for the Digital Enterprise 2018 - Offering API channel to application a...
 
OreDev 2008: Software + Services
OreDev 2008: Software + ServicesOreDev 2008: Software + Services
OreDev 2008: Software + Services
 
Azure Services Platform
Azure Services PlatformAzure Services Platform
Azure Services Platform
 
Windows Azure Overview
Windows Azure OverviewWindows Azure Overview
Windows Azure Overview
 
[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform
[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform
[.Net Juniors Academy] Introdução ao Cloud Computing e Windows Azure Platform
 
Blaze Ds Slides
Blaze Ds SlidesBlaze Ds Slides
Blaze Ds Slides
 
Conduct JBoss EAP 6 seminar
Conduct JBoss EAP 6 seminarConduct JBoss EAP 6 seminar
Conduct JBoss EAP 6 seminar
 
Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the CloudMongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
 
Introduction to Serverless Computing - OOP Munich
 Introduction to Serverless Computing - OOP Munich Introduction to Serverless Computing - OOP Munich
Introduction to Serverless Computing - OOP Munich
 

Mais de Guy Nirpaz

SaaS University - Customer Success Presentation
SaaS University - Customer Success PresentationSaaS University - Customer Success Presentation
SaaS University - Customer Success Presentation
Guy Nirpaz
 
Lean startup dec 2010
Lean startup dec 2010Lean startup dec 2010
Lean startup dec 2010
Guy Nirpaz
 

Mais de Guy Nirpaz (17)

Accelerating The Impact of Customer Success
Accelerating The Impact of Customer SuccessAccelerating The Impact of Customer Success
Accelerating The Impact of Customer Success
 
Open Approach to Customer Success
Open Approach to Customer SuccessOpen Approach to Customer Success
Open Approach to Customer Success
 
Introduction to customer success
Introduction to customer successIntroduction to customer success
Introduction to customer success
 
Mastering the Business of Customer Success
Mastering the Business of Customer SuccessMastering the Business of Customer Success
Mastering the Business of Customer Success
 
Customer success summit 2016 - Speaker Lineup
Customer success summit 2016 - Speaker LineupCustomer success summit 2016 - Speaker Lineup
Customer success summit 2016 - Speaker Lineup
 
Customer Success Business - San Francisco Roadshow
Customer Success Business - San Francisco RoadshowCustomer Success Business - San Francisco Roadshow
Customer Success Business - San Francisco Roadshow
 
Customer Success Business
Customer Success BusinessCustomer Success Business
Customer Success Business
 
2015 customer success salary & state of the profession infographic
2015 customer success salary & state of the profession infographic2015 customer success salary & state of the profession infographic
2015 customer success salary & state of the profession infographic
 
Introduction to customer success guy nirpaz, totango
Introduction to customer success   guy nirpaz, totangoIntroduction to customer success   guy nirpaz, totango
Introduction to customer success guy nirpaz, totango
 
Customer success - Play to Win!
Customer success - Play to Win!Customer success - Play to Win!
Customer success - Play to Win!
 
Customer success is not a one night stand
Customer success is not a one night standCustomer success is not a one night stand
Customer success is not a one night stand
 
Customer success putting the pieces together
Customer success   putting the pieces togetherCustomer success   putting the pieces together
Customer success putting the pieces together
 
SaaS University - Customer Success Presentation
SaaS University - Customer Success PresentationSaaS University - Customer Success Presentation
SaaS University - Customer Success Presentation
 
Cloud Product Development
Cloud Product DevelopmentCloud Product Development
Cloud Product Development
 
Lean startup dec 2010
Lean startup dec 2010Lean startup dec 2010
Lean startup dec 2010
 
Introduction to Lean Software Development
Introduction to Lean Software DevelopmentIntroduction to Lean Software Development
Introduction to Lean Software Development
 
Scrum@GigaSpaces
Scrum@GigaSpacesScrum@GigaSpaces
Scrum@GigaSpaces
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Building Scalable .NET Apps

  • 1. Building Scalable .NET Applications Guy Nirpaz, EVP R&D, GigaSpaces Technologies
  • 2. Who am I? • 3 Years with GigaSpaces – VP of R&D – Speaker at dev conferences: • Agile, Technology, Architecture • Veteran of several Startups • Spent most of my life in design and architecture of complex systems – Financial Services, Command and Control, Teleco – Mercury, IBM, others • Contact: – guyn@gigspaces.com – @gnirpaz – Twitter – jroller.com/gnirpaz - Blog
  • 3. About GigaSpaces • A Scale-Out Platform, optimized for distributed and virtualized environments: – Any deployment environments: clouds, grids, commodity servers, multi-core – Any languages: Spring/Java, .Net, C++, Dynamic • Driven by the need for: – confidence to handle unpredictable demand and peak loads; – guaranteed performance under any processing loads; – cost-effective, on-demand scalability for clouds and grids – rapidly develop, change and scale applications
  • 4. Explore technical and business challenges of building scalable applications. Analyze fundamental architecture limitations and propose cost-effective alternative
  • 5. The typical scenario… Michael Jackson Tickets are on Sale! Your Application
  • 6. Solution: Linear and Dynamic Scalability Linear Dynamic Scalability
  • 7. Traditional Tier Based Architecture is not scalable Business tier • Relies on centralized resources • HardTier install: to Web • Bound to static resources (IPs, disk drives, Load Balancer etc.) • Separate clustering model for each tier • Hard to maintain Back-up Back-up • Non-scalable Back-up Messaging
  • 8. Peak loads are unpredictable • Constant transaction, data and user growth • Volatile and unpredictable loads 1,300,000,000 1,200,000,000 1,100,000,000 1,000,000,000 900,000,000 800,000,000 700,000,000 600,000,000 500,000,000 400,000,000 300,000,000 200,000,000 100,000,000 0 J-04 M-04 M-04 J-04 S-04 N-04 J-05 M-05 M-05 J-05 S-05 N-05 J-06 M-06 M-06 J-06 S-06 N-06 J-07 M-07 M-07 J-07 S-07
  • 9. Scalability Disasters Are More Common Than Ever • Lost customers • Lost revenues • Brand damage
  • 10. Micro-Blogging (ala Twitter) Example Read Service IIS Publish Service Load Users Balancer Application Data Base Read Service IIS Publish Service Application
  • 11. Reader/Publisher Service namespace MicroBlog.Services { public interface IReaderService { ICollection<Post> GetUserPosts(String userID); ICollection<Post> GetUserPosts(String userID, DateTime fromDate); } } namespace MicroBlog.Services { public interface IPublisherService { void PublishPost(Post post); } }
  • 12. What happens on success Users Read The database becomes Service the bottleneck Read IIS Service Publish Service Load IIS Publish Balancer Service Application Data IIS Application Base Read Service Read IIS Service Publish IIS Service Publish Service IIS Application Application
  • 13. Reader – Database Implementation public ICollection<Post> GetUserPosts(string userID, DateTime fromDate) { // Create command: IDbCommand dbCommand = _dbConnection.CreateCommand(); dbCommand.CommandText = String.Format( quot;SELECT * FROM Post WHERE UserID='{0}' AND PostedOn > {1}quot;, userID, fromDate); // Execute command: IDataReader dataReader = dbCommand.ExecuteReader(); // Translate results from db records to .NET objects: List<Post> result = ReadPostsFromDataReader(dataReader); // Return results: return result; }
  • 14. Step I – Remove DB Bottlenecks with Caching • Reduce I/O bottlenecks – less DB access • In-Memory caching Load Users Balancer • Reduced Network hops (if in- Read Cache Data IIS Service Service process) Base Publish • Suitable for read-mostly apps Service Application
  • 15. Reader – Space Implementation public ICollection<Post> GetUserPosts(String userID) { // Create a template to get all posts by a user id: Post template = new Post(); template.UserID = userID; // Use space proxy to read entries matching template: Post[] result = _spaceProxy.ReadMultiple(template); // Return result: return result; }
  • 16. Step II – Linear Scalability: Partitioning and Collocation Reader Space Writer Reader Space Writer IIS Load Users Balancer Reader Space IIS Data Writer Base IIS Reader Space IIS Writer Reader Space Writer
  • 17. Post Life Cycle Reader Writer Poster Load Post.NEW Balancer Reader Client Post.VALID Writer Client Space IIS Reader
  • 18. Writer Client public class SpacePublisherService : IPublisherService { private readonly ISpaceProxy _spaceProxy; public void PublishPost(Post post) { this._spaceProxy.Write(post); } }
  • 19. Event Driven Programming – Writer Example [PollingEventDriven, TransactionalEvent] public class PendingPostsProcessor { [DataEventHandler] public Post ProcessPendingPost(Post post) { PostStatus newStatus = PostStatus.Published; foreach (String illegalWord in _illegalWords) if (post.Subject.Contains(illegalWord) || post.Body.Contains(illegalWord)) { newStatus = PostStatus.Rejected; break; } // Set new status: post.Status = newStatus; } return post; }
  • 20. Read Life Cycle Reader Writer Poster Load Balancer Reader Client Writer Post Client Post Space Post IIS Reader
  • 21. Step II – Linear Scalability: Partitioning and Collocation Reader Space Writer Reader Space Writer IIS Load Users Balancer Reader Space IIS Data Writer Base IIS Reader Space • Collocation – write/read within the same process IIS Writer • Partitioning and Content-Based Routing Reader Space • Async Writes to the DatabaseWriter
  • 22. Step III – Dynamic Scalability Monitor Provision Reader Space Writer Load Users Balancer Reader Space IIS Data Writer Base IIS Reader Space • SLA Driven Policies Writer • Dynamic Scalability • Self healing
  • 23. Space Based Architecture Values • Linear Scalability – Predictable cost model – pay per value – Predictable growth model • Dynamic – On demand – grow only when needed – Scale back when resources are not needed anymore • SLA Driven – Automatic – Self healing – Application aware • Simple – Non intrusive programming model – Single clustering Model
  • 25. GigaSpaces Home Page: http://www.gigaspaces.com/ GigaSpaces XAP Product Overview: http://www.gigaspaces.com/wiki/display/XAP7/Concepts GigaSpaces XAP for the Cloud: http://www.gigaspaces.com/cloud