SlideShare ist ein Scribd-Unternehmen logo
1 von 99
Coherence: XTP
    Processing using SEDA
                                   Taylor Gautier
                       Principal Client Architect, Grid Dynamics
                                    January 14, 2010



Copyright 2010 Grid Dynamics
About me...
•   Currently

    •      Principal Client Architect - Grid Dynamics

•   Past

    •      Terracotta - Java clustering software

    •      Access - Telecomm Billing

    •      Scale Eight - Petabyte scale web storage

    •      Excite@Home - Millions of users
    Copyright 2010 Grid Dynamics
About me...
•   Currently

    •      Principal Client Architect - Grid Dynamics

•   Past

    •      Terracotta - Java clustering software        ‣   Java enthusiast
                                                            since 1996

    •      Access - Telecomm Billing

    •      Scale Eight - Petabyte scale web storage

    •      Excite@Home - Millions of users
    Copyright 2010 Grid Dynamics
About me...
•   Currently

    •      Principal Client Architect - Grid Dynamics

•   Past

    •      Terracotta - Java clustering software        ‣   Java enthusiast
                                                            since 1996

    •      Access - Telecomm Billing                    ‣   Mission Critical


    •      Scale Eight - Petabyte scale web storage

    •      Excite@Home - Millions of users
    Copyright 2010 Grid Dynamics
About me...
•   Currently

    •      Principal Client Architect - Grid Dynamics

•   Past

    •      Terracotta - Java clustering software        ‣   Java enthusiast
                                                            since 1996

    •      Access - Telecomm Billing                    ‣   Mission Critical
                                                        ‣   Scalable Systems

    •      Scale Eight - Petabyte scale web storage

    •      Excite@Home - Millions of users
    Copyright 2010 Grid Dynamics
Agenda




Copyright 2010 Grid Dynamics
Agenda

   • Discuss the challenge - XTP




Copyright 2010 Grid Dynamics
Agenda

   • Discuss the challenge - XTP
   • Introduction to SEDA



Copyright 2010 Grid Dynamics
Agenda

   • Discuss the challenge - XTP
   • Introduction to SEDA
   • Project Battery


Copyright 2010 Grid Dynamics
Agenda

   • Discuss the challenge - XTP
   • Introduction to SEDA
   • Project Battery
   • Results and Best Practices
Copyright 2010 Grid Dynamics
What’s the challenge?


Copyright 2010 Grid Dynamics
XTP




Copyright 2010 Grid Dynamics
XTP

                               1000+ TPS




Copyright 2010 Grid Dynamics
XTP

                               1000+ TPS
                               35-50ms



Copyright 2010 Grid Dynamics
XTP

                               1000+ TPS
                               35-50ms
                               99.9% - 99.999%

Copyright 2010 Grid Dynamics
XTP

                                     1000+ TPS
                                     35-50ms
                                     99.9% - 99.999%




Copyright 2010 Grid Dynamics
XTP

                                     1000+ TPS
    •        High Throughput
                                     35-50ms
                                     99.9% - 99.999%




Copyright 2010 Grid Dynamics
XTP

                                     1000+ TPS
    •        High Throughput
                                     35-50ms
    • Low-latency
                                     99.9% - 99.999%




Copyright 2010 Grid Dynamics
XTP

                                     1000+ TPS
    •        High Throughput
                                     35-50ms
    • Low-latency
                                     99.9% - 99.999%
    • Reliable


Copyright 2010 Grid Dynamics
XTP

                                     1000+ TPS
    •        High Throughput
                                     35-50ms
    • Low-latency
                                     99.9% - 99.999%
    • Reliable
    • Transactional

Copyright 2010 Grid Dynamics
Use Case - Telco Billing

                                                                        Billing System




                                                                                                                  Payment
              Telecommunication services




                                                                                                                   system
                                            Events                                                     Events
                                           Service                                                     Payments
                                           provided logs
                                                                                       User data

                                                              Tariffing of services

                                                                                       Billing rules

                                                             Balance management
                                           Balance                                                      Users




                                                                                                                   CRM
                                           Service enable/                                              Rules
                                           disable
                                                                                      Balance data      Balance
                                                                                                          ...




Copyright 2010 Grid Dynamics
Why is billing hard?
                                                   Billing engine
    •        20 million users
                                       Events
                                                     Balance
                                                   management
                                                                     Events



    •        10^9 Objects (counters)                 Tariffing
                                                     Write-off

    •
                                                     payment
             1000 events/sec

    •        50 ms latency               Queries      Balance       Batches




                                SCALE!!
Copyright 2010 Grid Dynamics
Traditional
                               Approaches...


Copyright 2010 Grid Dynamics
RDBMS
    • Pros
     • Mainstream technology
     • Well understood programming model
    • Cons
     • Expensive
     • Doesn’t scale horizontally
Copyright 2010 Grid Dynamics
RDBMS + SSD

    • Pros
     • Same as RDBMS...
     • Speed up processing
    • Cons
     • Only improves performance, not scale
Copyright 2010 Grid Dynamics
Dedicated Hardware
    • Pros
     • Can speed up performance
     • Often programming model is same
    • Cons
     • Expensive to scale
     • Difficult to provide H/A
Copyright 2010 Grid Dynamics
In-memory database
    • Pros
     • Mature programming model
     • Excellent latency
    • Cons
     • Does not scale horizontally
     • System capacity limited
Copyright 2010 Grid Dynamics
What about IMDG?



                               as
                                 yn
                                    c

                                        RDBMS



Copyright 2010 Grid Dynamics
IMDG
    • Pros
     • Low-latency
     • Horizontal scale
     • Built-in load balancing
     • Lower cost model
    • Cons
     • Programming model affected
Copyright 2010 Grid Dynamics
What’s the challenge
     with the programming
            model?

Copyright 2010 Grid Dynamics
Complex event processing
         Event driven model
         One event may trigger another event, which
         triggers another and so on in a cascade.



Copyright 2010 Grid Dynamics
First, some history...


Copyright 2010 Grid Dynamics
Scale Eight (2000)

    • Web based delivery of media files
    • Basically Amazon S3
    • Total system capacity - several petabytes
    • On-site appliance for local read/write

Copyright 2010 Grid Dynamics
On-site appliance




Copyright 2010 Grid Dynamics
On-site appliance

    • Local cache of remote data




Copyright 2010 Grid Dynamics
On-site appliance

    • Local cache of remote data
    • Exported NAS as either NFS or SMB



Copyright 2010 Grid Dynamics
On-site appliance

    • Local cache of remote data
    • Exported NAS as either NFS or SMB
    • Version 1 - C++ Synchronous Threaded


Copyright 2010 Grid Dynamics
On-site appliance

    • Local cache of remote data
    • Exported NAS as either NFS or SMB
    • Version 1 - C++ Synchronous Threaded
    • Version 2 - C++ Asynchronous Event-based

Copyright 2010 Grid Dynamics
Lessons Learned




Copyright 2010 Grid Dynamics
Lessons Learned
Threaded Application




 Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application

•   Linear worfklows easy




     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application

•   Linear worfklows easy

•   Branching worfklows hard




     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application

•   Linear worfklows easy

•   Branching worfklows hard

•   Locking is hard




     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application

•   Linear worfklows easy

•   Branching worfklows hard

•   Locking is hard

•   Context switching kills
    performance




     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application

•   Linear worfklows easy

•   Branching worfklows hard

•   Locking is hard

•   Context switching kills
    performance

•   Complexity means large code
    base is unmaintainable


     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application

•   Linear worfklows easy

•   Branching worfklows hard

•   Locking is hard

•   Context switching kills
    performance

•   Complexity means large code
    base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application               Event Based Application

•   Linear worfklows easy

•   Branching worfklows hard

•   Locking is hard

•   Context switching kills
    performance

•   Complexity means large code
    base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application                  Event Based Application

•   Linear worfklows easy             •   Linear workflows complex

•   Branching worfklows hard

•   Locking is hard

•   Context switching kills
    performance

•   Complexity means large code
    base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application                  Event Based Application

•   Linear worfklows easy             •   Linear workflows complex

•   Branching worfklows hard          •   Branching workflows easy(ier)

•   Locking is hard

•   Context switching kills
    performance

•   Complexity means large code
    base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application                  Event Based Application

•   Linear worfklows easy             •   Linear workflows complex

•   Branching worfklows hard          •   Branching workflows easy(ier)

•   Locking is hard                   •   Locking is easy

•   Context switching kills
    performance

•   Complexity means large code
    base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application                  Event Based Application

•   Linear worfklows easy             •   Linear workflows complex

•   Branching worfklows hard          •   Branching workflows easy(ier)

•   Locking is hard                   •   Locking is easy

•   Context switching kills           •   Easy to max 1 CPU, hard to max
    performance                           many

•   Complexity means large code
    base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application                  Event Based Application

•   Linear worfklows easy             •   Linear workflows complex

•   Branching worfklows hard          •   Branching workflows easy(ier)

•   Locking is hard                   •   Locking is easy

•   Context switching kills           •   Easy to max 1 CPU, hard to max
    performance                           many

•   Complexity means large code       •   Complexity means large code
    base is unmaintainable                base is unmaintainable

•   Only experts can do it right
     Copyright 2010 Grid Dynamics
Lessons Learned
    Threaded Application                  Event Based Application

•   Linear worfklows easy             •   Linear workflows complex

•   Branching worfklows hard          •   Branching workflows easy(ier)

•   Locking is hard                   •   Locking is easy

•   Context switching kills           •   Easy to max 1 CPU, hard to max
    performance                           many

•   Complexity means large code       •   Complexity means large code
    base is unmaintainable                base is unmaintainable

•   Only experts can do it right      •   Only experts can do it right
     Copyright 2010 Grid Dynamics
What we need is
something in between...


Copyright 2010 Grid Dynamics
Introducing SEDA...




Copyright 2010 Grid Dynamics
Introducing SEDA...
    • Staged Event Driven Architecture




Copyright 2010 Grid Dynamics
Introducing SEDA...
    • Staged Event Driven Architecture
    • Introduced by Matt Welsh in 2002 as a
              research paper




Copyright 2010 Grid Dynamics
Introducing SEDA...
    • Staged Event Driven Architecture
    • Introduced by Matt Welsh in 2002 as a
              research paper
    • Blends threaded and event based models



Copyright 2010 Grid Dynamics
Introducing SEDA...
    • Staged Event Driven Architecture
    • Introduced by Matt Welsh in 2002 as a
              research paper
    • Blends threaded and event based models
    • Stages are completely independent and are
              threaded



Copyright 2010 Grid Dynamics
Introducing SEDA...
    • Staged Event Driven Architecture
    • Introduced by Matt Welsh in 2002 as a
              research paper
    • Blends threaded and event based models
    • Stages are completely independent and are
              threaded
    • Stages are connected via queues
Copyright 2010 Grid Dynamics
Introducing SEDA...
    • Staged Event Driven Architecture
    • Introduced by Matt Welsh in 2002 as a
              research paper
    • Blends threaded and event based models
    • Stages are completely independent and are
              threaded
    • Stages are connected via queues
    • Code branches occurs between stages
Copyright 2010 Grid Dynamics
SEDA Examples




Copyright 2010 Grid Dynamics
SEDA Examples

1                  Stage 1       Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
SEDA Examples

1                  Stage 1       Stage 2    Stage 3   Stage 4




II                  Stage 1       Stage 2   Stage 3   Stage 4


                                            Stage 5   Stage 6




Copyright 2010 Grid Dynamics
SEDA Examples

 1                   Stage 1       Stage 2    Stage 3   Stage 4




 II                   Stage 1       Stage 2   Stage 3   Stage 4


                                              Stage 5   Stage 6




III                   Stage 1       Stage 2   Stage 3   Stage 4


  Copyright 2010 Grid Dynamics
SEDA Examples

 1                   Stage 1       Stage 2    Stage 3   Stage 4




 II                   Stage 1       Stage 2   Stage 3   Stage 4


                                              Stage 5   Stage 6




III                   Stage 1       Stage 2   Stage 3   Stage 4


  Copyright 2010 Grid Dynamics
SEDA Examples

 1                   Stage 1       Stage 2    Stage 3   Stage 4




 II                   Stage 1       Stage 2   Stage 3   Stage 4


                                              Stage 5   Stage 6




III                   Stage 1       Stage 2   Stage 3   Stage 4


  Copyright 2010 Grid Dynamics
SEDA Benefits




Copyright 2010 Grid Dynamics
SEDA Benefits
    • Easy to design




Copyright 2010 Grid Dynamics
SEDA Benefits
    • Easy to design
    • Easy to understand




Copyright 2010 Grid Dynamics
SEDA Benefits
    • Easy to design
    • Easy to understand
    • Easy to test



Copyright 2010 Grid Dynamics
SEDA Benefits
    • Easy to design
    • Easy to understand
    • Easy to test
    • Easy to reuse


Copyright 2010 Grid Dynamics
SEDA Benefits
    • Easy to design
    • Easy to understand
    • Easy to test
    • Easy to reuse
    • Event-driven architecture, synchronous
              programming model


Copyright 2010 Grid Dynamics
SEDA Benefits
    • Easy to design
    • Easy to understand
    • Easy to test
    • Easy to reuse
    • Event-driven architecture, synchronous
              programming model
    • Easy to scale
Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Distributed SEDA


                      Stage 1   Stage 2   Stage 3   Stage 4




Copyright 2010 Grid Dynamics
Project overview...


Copyright 2010 Grid Dynamics
Distributed SEDA

                        BUSINESS   BUSINESS   BUSINESS   BUSINESS
                         LOGIC      LOGIC      LOGIC      LOGIC


                               DISTRIBUTED SEDA FRAMEWORK



                                       COHERENCE




Copyright 2010 Grid Dynamics
Components...
                                             Generic processing unit, base
                               Generic       for all hierarchy

                                             Consumes inbound message
                               Transformer   and produces outbound
                                             message

                                             Routes inbound message to
                                             one of several outbound
                                Router
                                             queues

                                             Duplicates inbound message to
                                Fork         several outbound queues


                                             Consumes several inbound
                               Junction      messages and produces
                                             outbound message.
                                             Synchronization point



Copyright 2010 Grid Dynamics
Now model Billing
  Processing as Network
                               Inbound event   Outbound event


                        Search for relevant
                                               Write-off check
                             counters


                                 Tariffing



                          Rules processing


                                                 Asynchronous
                          Changes fixation
                                                RDBMS replication




Copyright 2010 Grid Dynamics
And scale it out...


                                      Horizontal
                                      Scaling




Copyright 2010 Grid Dynamics
How to implement it in
     Coherence...


Copyright 2010 Grid Dynamics
What do we need?




Copyright 2010 Grid Dynamics
What do we need?

    ✓ Reliable data-storage




Copyright 2010 Grid Dynamics
What do we need?

    ✓ Reliable data-storage
    ✓ Reliable queue




Copyright 2010 Grid Dynamics
What do we need?

    ✓ Reliable data-storage
    ✓ Reliable queue
    ✓ Route work to the data




Copyright 2010 Grid Dynamics
What do we need?

    ✓ Reliable data-storage
    ✓ Reliable queue
    ✓ Route work to the data
    ✓ RDBMS connectivity



Copyright 2010 Grid Dynamics
Physical Architecture




Copyright 2010 Grid Dynamics
Results...
                           Data Scalability                                          Hardware Scalability
                  2000                                                        2000
                  1800                                                        1800
                  1600                                                        1600




                                                              Events/second
  Events/second




                  1400                                                        1400
                  1200                                                        1200
                  1000                                                        1000
                   800
                                                                               800
                   600
                                                                               600
                   400
                                                                               400
                   200
                                                                               200
                     0
                                                                                 0
                         0.5   1       2       3      4   5
                                                                                       2     3             4   5

                                   Users (millions)                                              Servers


                    Server Characteristics:
                    CPU 2.5GHZ Quad Core
                    RAM 32 GB




Copyright 2010 Grid Dynamics
Best Practices
    • Always measure and fine-tune
    • Lock granularity - balance coarse vs. fine
    • Ordered locking - eliminate deadlocks
    • Optimistic locking - Detect conflicts on
              commit
    • Batching - speed up async write to DB
    • Incubator patterns
Copyright 2010 Grid Dynamics
Queue Pattern

    • Initial results - ~200 msg/s
    • Custom version - ~5,000 msg/s
    • Latest incubator - ~5,000 msg/s

Copyright 2010 Grid Dynamics
Conclusion

    • Demonstrated 5-10x faster than competing
              solutions
    • Highly flexible and scalable solution
    • Currently in acceptance testing

Copyright 2010 Grid Dynamics
Questions?




Copyright 2010 Grid Dynamics

Weitere ähnliche Inhalte

Andere mochten auch

Onlinetools&Job Search2010
Onlinetools&Job Search2010Onlinetools&Job Search2010
Onlinetools&Job Search2010Cindy Edwards
 
Research writing introduction
Research writing  introductionResearch writing  introduction
Research writing introductionAngelina Merritt
 
Katechismus 11 - 12 jarigen - De Geloofsbelijdenis
Katechismus 11 - 12 jarigen - De GeloofsbelijdenisKatechismus 11 - 12 jarigen - De Geloofsbelijdenis
Katechismus 11 - 12 jarigen - De GeloofsbelijdenisN Couperus
 
Sevastopoulos Offer: Greek Vegetables
Sevastopoulos Offer: Greek VegetablesSevastopoulos Offer: Greek Vegetables
Sevastopoulos Offer: Greek VegetablesSEVASTOPOULOS
 
My Life And Goals By Joe Au...
My Life And Goals           By                                         Joe Au...My Life And Goals           By                                         Joe Au...
My Life And Goals By Joe Au...Joe Austin
 
C Level Client Presentation
C Level Client PresentationC Level Client Presentation
C Level Client PresentationThomas Noon
 
Future Agenda Future Of Energy
Future Agenda   Future Of EnergyFuture Agenda   Future Of Energy
Future Agenda Future Of EnergyFuture Agenda
 
Introducing Japanese Cool Web Services
Introducing Japanese Cool Web ServicesIntroducing Japanese Cool Web Services
Introducing Japanese Cool Web ServicesEiji Sakai
 
μαθημα με διαλεξη μεταφορα γνωσης
μαθημα με διαλεξη μεταφορα γνωσηςμαθημα με διαλεξη μεταφορα γνωσης
μαθημα με διαλεξη μεταφορα γνωσηςChristos Gotzaridis
 
Future Agenda Future Of Work
Future Agenda   Future Of WorkFuture Agenda   Future Of Work
Future Agenda Future Of WorkFuture Agenda
 
Knowwi Intro 2010
Knowwi Intro 2010Knowwi Intro 2010
Knowwi Intro 2010marklaszlo
 
PM Careers - Address to Management Student
PM Careers - Address to Management StudentPM Careers - Address to Management Student
PM Careers - Address to Management StudentPM Academy
 
Giao trinh tu tuong ho chi minh
Giao trinh tu tuong ho chi minhGiao trinh tu tuong ho chi minh
Giao trinh tu tuong ho chi minhNguyen Van Hoa
 
Jason's timeline
Jason's timelineJason's timeline
Jason's timelinejlee16
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with ScalaManish Pandit
 
Evaluation For Final Products
Evaluation For Final ProductsEvaluation For Final Products
Evaluation For Final Productsbenjo7
 

Andere mochten auch (19)

Onlinetools&Job Search2010
Onlinetools&Job Search2010Onlinetools&Job Search2010
Onlinetools&Job Search2010
 
Research writing introduction
Research writing  introductionResearch writing  introduction
Research writing introduction
 
Katechismus 11 - 12 jarigen - De Geloofsbelijdenis
Katechismus 11 - 12 jarigen - De GeloofsbelijdenisKatechismus 11 - 12 jarigen - De Geloofsbelijdenis
Katechismus 11 - 12 jarigen - De Geloofsbelijdenis
 
Sevastopoulos Offer: Greek Vegetables
Sevastopoulos Offer: Greek VegetablesSevastopoulos Offer: Greek Vegetables
Sevastopoulos Offer: Greek Vegetables
 
My Life And Goals By Joe Au...
My Life And Goals           By                                         Joe Au...My Life And Goals           By                                         Joe Au...
My Life And Goals By Joe Au...
 
C Level Client Presentation
C Level Client PresentationC Level Client Presentation
C Level Client Presentation
 
Creating A Pln
Creating A PlnCreating A Pln
Creating A Pln
 
Future Agenda Future Of Energy
Future Agenda   Future Of EnergyFuture Agenda   Future Of Energy
Future Agenda Future Of Energy
 
Acacia Research and Learning Forum Tutorial 2
Acacia Research and Learning Forum Tutorial 2Acacia Research and Learning Forum Tutorial 2
Acacia Research and Learning Forum Tutorial 2
 
Introducing Japanese Cool Web Services
Introducing Japanese Cool Web ServicesIntroducing Japanese Cool Web Services
Introducing Japanese Cool Web Services
 
μαθημα με διαλεξη μεταφορα γνωσης
μαθημα με διαλεξη μεταφορα γνωσηςμαθημα με διαλεξη μεταφορα γνωσης
μαθημα με διαλεξη μεταφορα γνωσης
 
Future Agenda Future Of Work
Future Agenda   Future Of WorkFuture Agenda   Future Of Work
Future Agenda Future Of Work
 
Knowwi Intro 2010
Knowwi Intro 2010Knowwi Intro 2010
Knowwi Intro 2010
 
PM Careers - Address to Management Student
PM Careers - Address to Management StudentPM Careers - Address to Management Student
PM Careers - Address to Management Student
 
Giao trinh tu tuong ho chi minh
Giao trinh tu tuong ho chi minhGiao trinh tu tuong ho chi minh
Giao trinh tu tuong ho chi minh
 
Jason's timeline
Jason's timelineJason's timeline
Jason's timeline
 
Architecture
ArchitectureArchitecture
Architecture
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
 
Evaluation For Final Products
Evaluation For Final ProductsEvaluation For Final Products
Evaluation For Final Products
 

Ähnlich wie Coherence: XTP Processing using SEDA

Testwise.v13
Testwise.v13Testwise.v13
Testwise.v13henharas
 
7.) convergence (w automation)
7.) convergence (w automation)7.) convergence (w automation)
7.) convergence (w automation)Jeff Green
 
Modern Carrier Strategies for Traffic Engineering
Modern Carrier Strategies for Traffic EngineeringModern Carrier Strategies for Traffic Engineering
Modern Carrier Strategies for Traffic EngineeringVishal Sharma, Ph.D.
 
Tim Jones – CTO, Trader Media
Tim Jones – CTO, Trader MediaTim Jones – CTO, Trader Media
Tim Jones – CTO, Trader MediaRightScale
 
Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...
Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...
Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...ORACLE USER GROUP ESTONIA
 
Case Study: Responsive Networks with Closed Loop Automation
Case Study: Responsive Networks with Closed Loop AutomationCase Study: Responsive Networks with Closed Loop Automation
Case Study: Responsive Networks with Closed Loop AutomationKiran Sirupa
 
Cloud computing
Cloud computingCloud computing
Cloud computingvdvennen
 
Compass Catalyst 14052010 Final
Compass Catalyst 14052010 FinalCompass Catalyst 14052010 Final
Compass Catalyst 14052010 FinalDamir Medved
 
Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...
Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...
Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...InSync2011
 
MSP Best Practice | Using Strategic IT Roadmaps to Get More Contracts
MSP Best Practice | Using Strategic IT Roadmaps to Get More ContractsMSP Best Practice | Using Strategic IT Roadmaps to Get More Contracts
MSP Best Practice | Using Strategic IT Roadmaps to Get More ContractsDavid Castro
 
Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...
Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...
Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...Continuous Computing
 
E pmp for public presentation feb 27 2015
E pmp for public presentation feb 27 2015E pmp for public presentation feb 27 2015
E pmp for public presentation feb 27 2015Advantec Distribution
 
LTE-Traffic Management & Monetization
LTE-Traffic Management & MonetizationLTE-Traffic Management & Monetization
LTE-Traffic Management & MonetizationContinuous Computing
 
Proformative:The Three Stages of Cloud Economics
Proformative:The Three Stages of Cloud EconomicsProformative:The Three Stages of Cloud Economics
Proformative:The Three Stages of Cloud EconomicsProformative, Inc.
 
Sun sparc enterprise t5140 and t5240 servers customer presentation
Sun sparc enterprise t5140 and t5240 servers customer presentationSun sparc enterprise t5140 and t5240 servers customer presentation
Sun sparc enterprise t5140 and t5240 servers customer presentationxKinAnx
 
Data Warehousing Infrastructure on Cloud
Data Warehousing Infrastructure on CloudData Warehousing Infrastructure on Cloud
Data Warehousing Infrastructure on Cloudtdwiindia
 
Neecom 2010 (Inovis-Dell case study)
Neecom 2010 (Inovis-Dell case study)Neecom 2010 (Inovis-Dell case study)
Neecom 2010 (Inovis-Dell case study)Doug Kern
 
Data Center and System Optimization
 Data Center and System Optimization Data Center and System Optimization
Data Center and System OptimizationBob Rhubart
 

Ähnlich wie Coherence: XTP Processing using SEDA (20)

Testwise.v13
Testwise.v13Testwise.v13
Testwise.v13
 
7.) convergence (w automation)
7.) convergence (w automation)7.) convergence (w automation)
7.) convergence (w automation)
 
Modern Carrier Strategies for Traffic Engineering
Modern Carrier Strategies for Traffic EngineeringModern Carrier Strategies for Traffic Engineering
Modern Carrier Strategies for Traffic Engineering
 
Tim Jones – CTO, Trader Media
Tim Jones – CTO, Trader MediaTim Jones – CTO, Trader Media
Tim Jones – CTO, Trader Media
 
Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...
Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...
Metrocom: first telco billing built on oracle brm - Alexey Gamburg, Sergey Ta...
 
Case Study: Responsive Networks with Closed Loop Automation
Case Study: Responsive Networks with Closed Loop AutomationCase Study: Responsive Networks with Closed Loop Automation
Case Study: Responsive Networks with Closed Loop Automation
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Compass Catalyst 14052010 Final
Compass Catalyst 14052010 FinalCompass Catalyst 14052010 Final
Compass Catalyst 14052010 Final
 
Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...
Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...
Developer & Fusion Middleware 2 _ Steve Tindall _ An engineered platform solu...
 
MSP Best Practice | Using Strategic IT Roadmaps to Get More Contracts
MSP Best Practice | Using Strategic IT Roadmaps to Get More ContractsMSP Best Practice | Using Strategic IT Roadmaps to Get More Contracts
MSP Best Practice | Using Strategic IT Roadmaps to Get More Contracts
 
Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...
Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...
Evaluating Approaches to Building DPI into an LTE Network at the PDN Gateway ...
 
E pmp for public presentation feb 27 2015
E pmp for public presentation feb 27 2015E pmp for public presentation feb 27 2015
E pmp for public presentation feb 27 2015
 
LTE-Traffic Management & Monetization
LTE-Traffic Management & MonetizationLTE-Traffic Management & Monetization
LTE-Traffic Management & Monetization
 
Proformative:The Three Stages of Cloud Economics
Proformative:The Three Stages of Cloud EconomicsProformative:The Three Stages of Cloud Economics
Proformative:The Three Stages of Cloud Economics
 
Sun sparc enterprise t5140 and t5240 servers customer presentation
Sun sparc enterprise t5140 and t5240 servers customer presentationSun sparc enterprise t5140 and t5240 servers customer presentation
Sun sparc enterprise t5140 and t5240 servers customer presentation
 
Data Warehousing Infrastructure on Cloud
Data Warehousing Infrastructure on CloudData Warehousing Infrastructure on Cloud
Data Warehousing Infrastructure on Cloud
 
Neecom 2010 (Inovis-Dell case study)
Neecom 2010 (Inovis-Dell case study)Neecom 2010 (Inovis-Dell case study)
Neecom 2010 (Inovis-Dell case study)
 
Catalog2009
Catalog2009Catalog2009
Catalog2009
 
Optimized ACH W
Optimized ACH WOptimized ACH W
Optimized ACH W
 
Data Center and System Optimization
 Data Center and System Optimization Data Center and System Optimization
Data Center and System Optimization
 

Kürzlich hochgeladen

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Kürzlich hochgeladen (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Coherence: XTP Processing using SEDA

  • 1. Coherence: XTP Processing using SEDA Taylor Gautier Principal Client Architect, Grid Dynamics January 14, 2010 Copyright 2010 Grid Dynamics
  • 2. About me... • Currently • Principal Client Architect - Grid Dynamics • Past • Terracotta - Java clustering software • Access - Telecomm Billing • Scale Eight - Petabyte scale web storage • Excite@Home - Millions of users Copyright 2010 Grid Dynamics
  • 3. About me... • Currently • Principal Client Architect - Grid Dynamics • Past • Terracotta - Java clustering software ‣ Java enthusiast since 1996 • Access - Telecomm Billing • Scale Eight - Petabyte scale web storage • Excite@Home - Millions of users Copyright 2010 Grid Dynamics
  • 4. About me... • Currently • Principal Client Architect - Grid Dynamics • Past • Terracotta - Java clustering software ‣ Java enthusiast since 1996 • Access - Telecomm Billing ‣ Mission Critical • Scale Eight - Petabyte scale web storage • Excite@Home - Millions of users Copyright 2010 Grid Dynamics
  • 5. About me... • Currently • Principal Client Architect - Grid Dynamics • Past • Terracotta - Java clustering software ‣ Java enthusiast since 1996 • Access - Telecomm Billing ‣ Mission Critical ‣ Scalable Systems • Scale Eight - Petabyte scale web storage • Excite@Home - Millions of users Copyright 2010 Grid Dynamics
  • 7. Agenda • Discuss the challenge - XTP Copyright 2010 Grid Dynamics
  • 8. Agenda • Discuss the challenge - XTP • Introduction to SEDA Copyright 2010 Grid Dynamics
  • 9. Agenda • Discuss the challenge - XTP • Introduction to SEDA • Project Battery Copyright 2010 Grid Dynamics
  • 10. Agenda • Discuss the challenge - XTP • Introduction to SEDA • Project Battery • Results and Best Practices Copyright 2010 Grid Dynamics
  • 11. What’s the challenge? Copyright 2010 Grid Dynamics
  • 13. XTP 1000+ TPS Copyright 2010 Grid Dynamics
  • 14. XTP 1000+ TPS 35-50ms Copyright 2010 Grid Dynamics
  • 15. XTP 1000+ TPS 35-50ms 99.9% - 99.999% Copyright 2010 Grid Dynamics
  • 16. XTP 1000+ TPS 35-50ms 99.9% - 99.999% Copyright 2010 Grid Dynamics
  • 17. XTP 1000+ TPS • High Throughput 35-50ms 99.9% - 99.999% Copyright 2010 Grid Dynamics
  • 18. XTP 1000+ TPS • High Throughput 35-50ms • Low-latency 99.9% - 99.999% Copyright 2010 Grid Dynamics
  • 19. XTP 1000+ TPS • High Throughput 35-50ms • Low-latency 99.9% - 99.999% • Reliable Copyright 2010 Grid Dynamics
  • 20. XTP 1000+ TPS • High Throughput 35-50ms • Low-latency 99.9% - 99.999% • Reliable • Transactional Copyright 2010 Grid Dynamics
  • 21. Use Case - Telco Billing Billing System Payment Telecommunication services system Events Events Service Payments provided logs User data Tariffing of services Billing rules Balance management Balance Users CRM Service enable/ Rules disable Balance data Balance ... Copyright 2010 Grid Dynamics
  • 22. Why is billing hard? Billing engine • 20 million users Events Balance management Events • 10^9 Objects (counters) Tariffing Write-off • payment 1000 events/sec • 50 ms latency Queries Balance Batches SCALE!! Copyright 2010 Grid Dynamics
  • 23. Traditional Approaches... Copyright 2010 Grid Dynamics
  • 24. RDBMS • Pros • Mainstream technology • Well understood programming model • Cons • Expensive • Doesn’t scale horizontally Copyright 2010 Grid Dynamics
  • 25. RDBMS + SSD • Pros • Same as RDBMS... • Speed up processing • Cons • Only improves performance, not scale Copyright 2010 Grid Dynamics
  • 26. Dedicated Hardware • Pros • Can speed up performance • Often programming model is same • Cons • Expensive to scale • Difficult to provide H/A Copyright 2010 Grid Dynamics
  • 27. In-memory database • Pros • Mature programming model • Excellent latency • Cons • Does not scale horizontally • System capacity limited Copyright 2010 Grid Dynamics
  • 28. What about IMDG? as yn c RDBMS Copyright 2010 Grid Dynamics
  • 29. IMDG • Pros • Low-latency • Horizontal scale • Built-in load balancing • Lower cost model • Cons • Programming model affected Copyright 2010 Grid Dynamics
  • 30. What’s the challenge with the programming model? Copyright 2010 Grid Dynamics
  • 31. Complex event processing Event driven model One event may trigger another event, which triggers another and so on in a cascade. Copyright 2010 Grid Dynamics
  • 32. First, some history... Copyright 2010 Grid Dynamics
  • 33. Scale Eight (2000) • Web based delivery of media files • Basically Amazon S3 • Total system capacity - several petabytes • On-site appliance for local read/write Copyright 2010 Grid Dynamics
  • 35. On-site appliance • Local cache of remote data Copyright 2010 Grid Dynamics
  • 36. On-site appliance • Local cache of remote data • Exported NAS as either NFS or SMB Copyright 2010 Grid Dynamics
  • 37. On-site appliance • Local cache of remote data • Exported NAS as either NFS or SMB • Version 1 - C++ Synchronous Threaded Copyright 2010 Grid Dynamics
  • 38. On-site appliance • Local cache of remote data • Exported NAS as either NFS or SMB • Version 1 - C++ Synchronous Threaded • Version 2 - C++ Asynchronous Event-based Copyright 2010 Grid Dynamics
  • 40. Lessons Learned Threaded Application Copyright 2010 Grid Dynamics
  • 41. Lessons Learned Threaded Application • Linear worfklows easy Copyright 2010 Grid Dynamics
  • 42. Lessons Learned Threaded Application • Linear worfklows easy • Branching worfklows hard Copyright 2010 Grid Dynamics
  • 43. Lessons Learned Threaded Application • Linear worfklows easy • Branching worfklows hard • Locking is hard Copyright 2010 Grid Dynamics
  • 44. Lessons Learned Threaded Application • Linear worfklows easy • Branching worfklows hard • Locking is hard • Context switching kills performance Copyright 2010 Grid Dynamics
  • 45. Lessons Learned Threaded Application • Linear worfklows easy • Branching worfklows hard • Locking is hard • Context switching kills performance • Complexity means large code base is unmaintainable Copyright 2010 Grid Dynamics
  • 46. Lessons Learned Threaded Application • Linear worfklows easy • Branching worfklows hard • Locking is hard • Context switching kills performance • Complexity means large code base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 47. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Branching worfklows hard • Locking is hard • Context switching kills performance • Complexity means large code base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 48. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Linear workflows complex • Branching worfklows hard • Locking is hard • Context switching kills performance • Complexity means large code base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 49. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Linear workflows complex • Branching worfklows hard • Branching workflows easy(ier) • Locking is hard • Context switching kills performance • Complexity means large code base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 50. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Linear workflows complex • Branching worfklows hard • Branching workflows easy(ier) • Locking is hard • Locking is easy • Context switching kills performance • Complexity means large code base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 51. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Linear workflows complex • Branching worfklows hard • Branching workflows easy(ier) • Locking is hard • Locking is easy • Context switching kills • Easy to max 1 CPU, hard to max performance many • Complexity means large code base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 52. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Linear workflows complex • Branching worfklows hard • Branching workflows easy(ier) • Locking is hard • Locking is easy • Context switching kills • Easy to max 1 CPU, hard to max performance many • Complexity means large code • Complexity means large code base is unmaintainable base is unmaintainable • Only experts can do it right Copyright 2010 Grid Dynamics
  • 53. Lessons Learned Threaded Application Event Based Application • Linear worfklows easy • Linear workflows complex • Branching worfklows hard • Branching workflows easy(ier) • Locking is hard • Locking is easy • Context switching kills • Easy to max 1 CPU, hard to max performance many • Complexity means large code • Complexity means large code base is unmaintainable base is unmaintainable • Only experts can do it right • Only experts can do it right Copyright 2010 Grid Dynamics
  • 54. What we need is something in between... Copyright 2010 Grid Dynamics
  • 56. Introducing SEDA... • Staged Event Driven Architecture Copyright 2010 Grid Dynamics
  • 57. Introducing SEDA... • Staged Event Driven Architecture • Introduced by Matt Welsh in 2002 as a research paper Copyright 2010 Grid Dynamics
  • 58. Introducing SEDA... • Staged Event Driven Architecture • Introduced by Matt Welsh in 2002 as a research paper • Blends threaded and event based models Copyright 2010 Grid Dynamics
  • 59. Introducing SEDA... • Staged Event Driven Architecture • Introduced by Matt Welsh in 2002 as a research paper • Blends threaded and event based models • Stages are completely independent and are threaded Copyright 2010 Grid Dynamics
  • 60. Introducing SEDA... • Staged Event Driven Architecture • Introduced by Matt Welsh in 2002 as a research paper • Blends threaded and event based models • Stages are completely independent and are threaded • Stages are connected via queues Copyright 2010 Grid Dynamics
  • 61. Introducing SEDA... • Staged Event Driven Architecture • Introduced by Matt Welsh in 2002 as a research paper • Blends threaded and event based models • Stages are completely independent and are threaded • Stages are connected via queues • Code branches occurs between stages Copyright 2010 Grid Dynamics
  • 63. SEDA Examples 1 Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 64. SEDA Examples 1 Stage 1 Stage 2 Stage 3 Stage 4 II Stage 1 Stage 2 Stage 3 Stage 4 Stage 5 Stage 6 Copyright 2010 Grid Dynamics
  • 65. SEDA Examples 1 Stage 1 Stage 2 Stage 3 Stage 4 II Stage 1 Stage 2 Stage 3 Stage 4 Stage 5 Stage 6 III Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 66. SEDA Examples 1 Stage 1 Stage 2 Stage 3 Stage 4 II Stage 1 Stage 2 Stage 3 Stage 4 Stage 5 Stage 6 III Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 67. SEDA Examples 1 Stage 1 Stage 2 Stage 3 Stage 4 II Stage 1 Stage 2 Stage 3 Stage 4 Stage 5 Stage 6 III Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 69. SEDA Benefits • Easy to design Copyright 2010 Grid Dynamics
  • 70. SEDA Benefits • Easy to design • Easy to understand Copyright 2010 Grid Dynamics
  • 71. SEDA Benefits • Easy to design • Easy to understand • Easy to test Copyright 2010 Grid Dynamics
  • 72. SEDA Benefits • Easy to design • Easy to understand • Easy to test • Easy to reuse Copyright 2010 Grid Dynamics
  • 73. SEDA Benefits • Easy to design • Easy to understand • Easy to test • Easy to reuse • Event-driven architecture, synchronous programming model Copyright 2010 Grid Dynamics
  • 74. SEDA Benefits • Easy to design • Easy to understand • Easy to test • Easy to reuse • Event-driven architecture, synchronous programming model • Easy to scale Copyright 2010 Grid Dynamics
  • 75. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 76. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 77. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 78. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 79. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 80. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 81. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 82. Distributed SEDA Stage 1 Stage 2 Stage 3 Stage 4 Copyright 2010 Grid Dynamics
  • 84. Distributed SEDA BUSINESS BUSINESS BUSINESS BUSINESS LOGIC LOGIC LOGIC LOGIC DISTRIBUTED SEDA FRAMEWORK COHERENCE Copyright 2010 Grid Dynamics
  • 85. Components... Generic processing unit, base Generic for all hierarchy Consumes inbound message Transformer and produces outbound message Routes inbound message to one of several outbound Router queues Duplicates inbound message to Fork several outbound queues Consumes several inbound Junction messages and produces outbound message. Synchronization point Copyright 2010 Grid Dynamics
  • 86. Now model Billing Processing as Network Inbound event Outbound event Search for relevant Write-off check counters Tariffing Rules processing Asynchronous Changes fixation RDBMS replication Copyright 2010 Grid Dynamics
  • 87. And scale it out... Horizontal Scaling Copyright 2010 Grid Dynamics
  • 88. How to implement it in Coherence... Copyright 2010 Grid Dynamics
  • 89. What do we need? Copyright 2010 Grid Dynamics
  • 90. What do we need? ✓ Reliable data-storage Copyright 2010 Grid Dynamics
  • 91. What do we need? ✓ Reliable data-storage ✓ Reliable queue Copyright 2010 Grid Dynamics
  • 92. What do we need? ✓ Reliable data-storage ✓ Reliable queue ✓ Route work to the data Copyright 2010 Grid Dynamics
  • 93. What do we need? ✓ Reliable data-storage ✓ Reliable queue ✓ Route work to the data ✓ RDBMS connectivity Copyright 2010 Grid Dynamics
  • 95. Results... Data Scalability Hardware Scalability 2000 2000 1800 1800 1600 1600 Events/second Events/second 1400 1400 1200 1200 1000 1000 800 800 600 600 400 400 200 200 0 0 0.5 1 2 3 4 5 2 3 4 5 Users (millions) Servers Server Characteristics: CPU 2.5GHZ Quad Core RAM 32 GB Copyright 2010 Grid Dynamics
  • 96. Best Practices • Always measure and fine-tune • Lock granularity - balance coarse vs. fine • Ordered locking - eliminate deadlocks • Optimistic locking - Detect conflicts on commit • Batching - speed up async write to DB • Incubator patterns Copyright 2010 Grid Dynamics
  • 97. Queue Pattern • Initial results - ~200 msg/s • Custom version - ~5,000 msg/s • Latest incubator - ~5,000 msg/s Copyright 2010 Grid Dynamics
  • 98. Conclusion • Demonstrated 5-10x faster than competing solutions • Highly flexible and scalable solution • Currently in acceptance testing Copyright 2010 Grid Dynamics