SlideShare a Scribd company logo
Gridify
your Spring application
    with Grid Gain
           Sergio Bossa
      Pro-Netics / Sourcesense
About me
✔   Software architect and engineer
    ➔   Pro-Netics (http://www.pronetics.it)
    ➔   Sourcesense (http://www.sourcesense.com)
✔   Blogger
    ➔   http://sbtourist.blogspot.com
✔   Open Source Enthusiast
    ➔   Lead at Scarlet - Clustering for Jira (http://scarlet.sf.net)
    ➔   Committer at Spring Modules
        (http://springmodules.dev.java.net)
    ➔   Committer at Taconite Ajax Framework
        (http://taconite.sourceforge.net/)
Agenda
✔   Common ground.
    ➔   Why Grid?
    ➔   Performance and Scalability.
    ➔   Map / Reduce.
✔   Grid Gain and The Spring Framework.
    ➔   Grid Gain concepts.
    ➔   Grid Gain on Spring.
    ➔   A practical example.
Why grid?
                     Social changes
✔   Cheaper hardware.
    ➔   Computer as an off-the-shelf product.
✔   Web explosion.
    ➔   Everything is on the web.
    ➔   Everyone is on the web.
        ➔   More and more users.
        ➔   More and more transactions.
Why grid?
               Technological changes
✔   Cheaper hardware.
    ➔   We have more power.
        ➔   We want more speed.
✔   Moore's Law: the number of transistors that can be
    inexpensively placed on an integrated circuit is
    increasing exponentially.
    ➔   But we had to go from single-core processors to multi-
        core ones ...
    ➔   So your for-loop will always run at the same speed.
        ➔   Forever.
Why grid?


   +

   =
Performance
It's all about doing one thing.
             Faster.
Scalability
It's all about doing the same one thing.
             In a bigger way.
Performance vs Scalability

✔   Performance is about how fast.
✔   Scalability is about how much.
✔   Nowadays, if you want to save your job and hears
    (remember that Boss screaming at your face) ...
    ➔   You have to scale.
Scalability in two words
✔   Vertical scalability is about adding more and more
    power (CPU, RAM ...) to your single computer.
    ➔   Also known as scaling-in.
    ➔   Finite and costly.
✔   Horizontal scalability is about adding more and more
    computers.
    ➔   Also known as scaling-out.
    ➔   Infinite and cheaper, because using commodity
        hardware.
✔   Guess what, we want to scale-out ...
The scalability factor

✔   Available resources while scaling out.
    ➔   Linear scalability.
    ➔   Supra-linear scalability.
    ➔   Sub-linear scalability.
    ➔   Negative scalability.
✔   A scalable application should always strive for (almost)
    linear scalability.
The scalability problem


✔   Amdahl's Law: performance decreases as number of
    processors increases once there is even a small
    percentage of non-parallelizable code.
    ➔   Most of the software is written in a non-parallelizable
        way.
    ➔   Writing software that scales out is perceived as hard.
Entering Map / Reduce

✔   From Google Labs.
    ➔   Is it enough?
Map / Reduce explained
✔   Programming model for linearly scaling out.
✔   De-facto standard for parallelizing intensive processing
    tasks.
✔   Based on:
    ➔   Splitting tasks into several parallelizable jobs grouped
        by key.
    ➔   Mapping jobs to processing units, optionally taking
        into account the job key.
    ➔   Merging jobs results, joining them into a global task
        result.
Map / Reduce illustrated
   Counting words
Grid computing with Map / Reduce

✔   Grid computing.
    ➔   Basically, a way to exploit multi-core / multi-
        processors / multi-computer environments for
        achieving horizontal scalability.
✔   Map / Reduce.
    ➔   Common paradigm in grid computing for
        implementing scalable applications.
Entering Grid Gain
✔   Open Source Grid Computing Framework.
    ➔   Web : http://www.gridgain.com
    ➔   Created and supported by Grid Gain Systems.
        ➔   Community support.
        ➔   Professional support.
✔   Powerful, yet simple, yet fun, Map / Reduce
    implementation.
✔   Integrated with major servlet containers and application
    servers.
✔   Integrated with major data grid solutions.
✔   Integrated with the Spring Framework.
Map / Reduce in Grid Gain

               -1-
               Task arrives to the first grid node, where is
               split into three jobs.
               First job is self-assigned and processed.
               -2-
               Second job is sent to the second grid node,
               where is processed.
               -3-
               Third job is sent to a the third grid node,
               where is processed.
               -4-
               Result from the second job is collected by
               the task on the first node.
               -5-
               Result from the third job is collected by the
               task on the first node.
               -6-
               Collected job results, together with the
               result from the first job, are reduced by the
               task and returned as a global result.
Grid Gain Quick Start
✔   GridTask.
    ➔   Implements the Map / Reduce logic.
✔   GridJob.
    ➔   Implements the processing logic.
✔   GridFactory.
    ➔   Provides access to the grid for executing tasks.
✔   Automatic deployment.
    ➔   Tasks are automatically deployed to the grid.
✔   Peer class loading.
    ➔   Needed classes are automatically loaded from peers.
Grid Gain Advanced
✔   SPI (Service Provider Interface) based configuration.
    ➔   Discovery SPI.
    ➔   Topology SPI.
    ➔   Checkpoint SPI.
    ➔   Load Balancing SPI.
    ➔   Collision SPI.
    ➔   Failover SPI.
    ➔   Metrics SPI.
    ➔   ...
Entering Spring Framework

The leading full-stack Java/JEE application framework.
Grid Gain on Spring


✔   POJO configuration.
✔   AOP grid execution.
✔   Resource Look-up.
Spring-based configuration
✔   POJO-based.
✔   Spring-based.
✔   GridConfiguration
    ➔   Configure grid parameters.
    ➔   Configure actual SPI implementations.
    ➔   Declared as a Spring bean.
✔   GridFactory
    ➔   GridFactory.start(GridConfiguration cfg)
    ➔   GridFactory.start(String springCfg)
AOP-based grid execution
✔   Parallelization on grid as a cross-cutting concern.
✔   Transparent task deployment and execution.
✔   Gridify
    ➔   Annotation to identify methods that must be executed
        on grid.
✔   GridifySpringEnhancer
    ➔   Proxy-based enhancer for executing annotated object
        methods on grid as an aspect.
Container-based resource look-
                 up.
✔   Spring application context as a source for resources
    needed by tasks and jobs.
✔   GridSpringApplicationContextResource
    ➔   Annotation for injecting the Spring application context
        into tasks and jobs.
✔   GridFactory.start(GridConfiguration cfg,
    ApplicationContext springCtx)
    ➔   Starts grid with a specific context to use for looking-up
        resources.
An Example
The Business Problem
An Example
The Grid Task
An Example
The Grid Job
An Example
Grid Configuration
An Example
Grid Starter
An Example
Grid Tester (...)
An Example
Grid Tester (... continued)
Q&A
Thank you
       Sergio Bossa
   s.bossa@pronetics.it
s.bossa@sourcesense.com

More Related Content

What's hot

Collecting metrics with Graphite and StatsD
Collecting metrics with Graphite and StatsDCollecting metrics with Graphite and StatsD
Collecting metrics with Graphite and StatsD
itnig
 
Google Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowGoogle Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlow
Hayato Yoshikawa
 
Resource Scheduling using Apache Mesos in Cloud Native Environments
Resource Scheduling using Apache Mesos in Cloud Native EnvironmentsResource Scheduling using Apache Mesos in Cloud Native Environments
Resource Scheduling using Apache Mesos in Cloud Native Environments
Sharma Podila
 
GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享
Simon Su
 
Scaling Graphite At Yelp
Scaling Graphite At YelpScaling Graphite At Yelp
Scaling Graphite At Yelp
Paul O'Connor
 
Building Robust Pipelines with Airflow
Building Robust Pipelines with AirflowBuilding Robust Pipelines with Airflow
Building Robust Pipelines with Airflow
Erin Shellman
 
Apache Beam and Google Cloud Dataflow - IDG - final
Apache Beam and Google Cloud Dataflow - IDG - finalApache Beam and Google Cloud Dataflow - IDG - final
Apache Beam and Google Cloud Dataflow - IDG - final
Sub Szabolcs Feczak
 
Using A100 MIG to Scale Astronomy Scientific Output
Using A100 MIG to Scale Astronomy Scientific OutputUsing A100 MIG to Scale Astronomy Scientific Output
Using A100 MIG to Scale Astronomy Scientific Output
Igor Sfiligoi
 
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow managementIntro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Burasakorn Sabyeying
 
The Future starts with a Promise
The Future starts with a PromiseThe Future starts with a Promise
The Future starts with a Promise
Alexandru Nedelcu
 
Cloud native java script apps
Cloud native java script appsCloud native java script apps
Cloud native java script apps
Gary Sieling
 
Airflow at WePay
Airflow at WePayAirflow at WePay
Airflow at WePay
Chris Riccomini
 
BlazingSQL & Graphistry - Netflow Demo
BlazingSQL & Graphistry - Netflow DemoBlazingSQL & Graphistry - Netflow Demo
BlazingSQL & Graphistry - Netflow Demo
Rodrigo Aramburu
 
Hadoop & Spark Performance tuning using Dr. Elephant
Hadoop & Spark Performance tuning using Dr. ElephantHadoop & Spark Performance tuning using Dr. Elephant
Hadoop & Spark Performance tuning using Dr. Elephant
Akshay Rai
 
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Joseph Luchette
 
AWS re:Invent 2014 talk: Scheduling using Apache Mesos in the Cloud
AWS re:Invent 2014 talk: Scheduling using Apache Mesos in the CloudAWS re:Invent 2014 talk: Scheduling using Apache Mesos in the Cloud
AWS re:Invent 2014 talk: Scheduling using Apache Mesos in the Cloud
Sharma Podila
 
Airflow Clustering and High Availability
Airflow Clustering and High AvailabilityAirflow Clustering and High Availability
Airflow Clustering and High Availability
Robert Sanders
 
Device status anomaly detection
Device status anomaly detectionDevice status anomaly detection
Device status anomaly detection
David Tung
 
Graphs as Streams: Rethinking Graph Processing in the Streaming Era
Graphs as Streams: Rethinking Graph Processing in the Streaming EraGraphs as Streams: Rethinking Graph Processing in the Streaming Era
Graphs as Streams: Rethinking Graph Processing in the Streaming Era
Vasia Kalavri
 
Graphite
GraphiteGraphite
Graphite
Adrian Moisey
 

What's hot (20)

Collecting metrics with Graphite and StatsD
Collecting metrics with Graphite and StatsDCollecting metrics with Graphite and StatsD
Collecting metrics with Graphite and StatsD
 
Google Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlowGoogle Cloud Dataflow meets TensorFlow
Google Cloud Dataflow meets TensorFlow
 
Resource Scheduling using Apache Mesos in Cloud Native Environments
Resource Scheduling using Apache Mesos in Cloud Native EnvironmentsResource Scheduling using Apache Mesos in Cloud Native Environments
Resource Scheduling using Apache Mesos in Cloud Native Environments
 
GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享GCPUG.TW - GCP學習資源分享
GCPUG.TW - GCP學習資源分享
 
Scaling Graphite At Yelp
Scaling Graphite At YelpScaling Graphite At Yelp
Scaling Graphite At Yelp
 
Building Robust Pipelines with Airflow
Building Robust Pipelines with AirflowBuilding Robust Pipelines with Airflow
Building Robust Pipelines with Airflow
 
Apache Beam and Google Cloud Dataflow - IDG - final
Apache Beam and Google Cloud Dataflow - IDG - finalApache Beam and Google Cloud Dataflow - IDG - final
Apache Beam and Google Cloud Dataflow - IDG - final
 
Using A100 MIG to Scale Astronomy Scientific Output
Using A100 MIG to Scale Astronomy Scientific OutputUsing A100 MIG to Scale Astronomy Scientific Output
Using A100 MIG to Scale Astronomy Scientific Output
 
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow managementIntro to Airflow: Goodbye Cron, Welcome scheduled workflow management
Intro to Airflow: Goodbye Cron, Welcome scheduled workflow management
 
The Future starts with a Promise
The Future starts with a PromiseThe Future starts with a Promise
The Future starts with a Promise
 
Cloud native java script apps
Cloud native java script appsCloud native java script apps
Cloud native java script apps
 
Airflow at WePay
Airflow at WePayAirflow at WePay
Airflow at WePay
 
BlazingSQL & Graphistry - Netflow Demo
BlazingSQL & Graphistry - Netflow DemoBlazingSQL & Graphistry - Netflow Demo
BlazingSQL & Graphistry - Netflow Demo
 
Hadoop & Spark Performance tuning using Dr. Elephant
Hadoop & Spark Performance tuning using Dr. ElephantHadoop & Spark Performance tuning using Dr. Elephant
Hadoop & Spark Performance tuning using Dr. Elephant
 
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
Unlimited Virtual Computing Capacity using the Cloud for Automated Parameter ...
 
AWS re:Invent 2014 talk: Scheduling using Apache Mesos in the Cloud
AWS re:Invent 2014 talk: Scheduling using Apache Mesos in the CloudAWS re:Invent 2014 talk: Scheduling using Apache Mesos in the Cloud
AWS re:Invent 2014 talk: Scheduling using Apache Mesos in the Cloud
 
Airflow Clustering and High Availability
Airflow Clustering and High AvailabilityAirflow Clustering and High Availability
Airflow Clustering and High Availability
 
Device status anomaly detection
Device status anomaly detectionDevice status anomaly detection
Device status anomaly detection
 
Graphs as Streams: Rethinking Graph Processing in the Streaming Era
Graphs as Streams: Rethinking Graph Processing in the Streaming EraGraphs as Streams: Rethinking Graph Processing in the Streaming Era
Graphs as Streams: Rethinking Graph Processing in the Streaming Era
 
Graphite
GraphiteGraphite
Graphite
 

Similar to Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008

Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With Terracotta
PT.JUG
 
DOSUG GridGain Java Grid Computing Made Simple
DOSUG GridGain Java Grid Computing Made SimpleDOSUG GridGain Java Grid Computing Made Simple
DOSUG GridGain Java Grid Computing Made Simple
Matthew McCullough
 
GridGain - Java Grid Computing Made Simple
GridGain - Java Grid Computing Made SimpleGridGain - Java Grid Computing Made Simple
GridGain - Java Grid Computing Made Simple
Matthew McCullough
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
catherinewall
 
Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)
Julien SIMON
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
Ross Lawley
 
[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice
javablend
 
Empowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorEmpowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with Alternator
ScyllaDB
 
Profiling & Testing with Spark
Profiling & Testing with SparkProfiling & Testing with Spark
Profiling & Testing with Spark
Roger Rafanell Mas
 
Galaxy
GalaxyGalaxy
Galaxy
bosc
 
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Nane Kratzke
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test tool
Knoldus Inc.
 
Gatling
GatlingGatling
Gatling
Tengwen Wang
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
Andrew Rota
 
Deep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech TalksDeep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Amazon Web Services
 
Deep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech TalksDeep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Amazon Web Services
 
10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production
Paris Data Engineers !
 
Spark: The State of the Art Engine for Big Data Processing
Spark: The State of the Art Engine for Big Data ProcessingSpark: The State of the Art Engine for Big Data Processing
Spark: The State of the Art Engine for Big Data Processing
Ramaninder Singh Jhajj
 
vega
vegavega
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09
Chris Purrington
 

Similar to Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008 (20)

Lightweight Grids With Terracotta
Lightweight Grids With TerracottaLightweight Grids With Terracotta
Lightweight Grids With Terracotta
 
DOSUG GridGain Java Grid Computing Made Simple
DOSUG GridGain Java Grid Computing Made SimpleDOSUG GridGain Java Grid Computing Made Simple
DOSUG GridGain Java Grid Computing Made Simple
 
GridGain - Java Grid Computing Made Simple
GridGain - Java Grid Computing Made SimpleGridGain - Java Grid Computing Made Simple
GridGain - Java Grid Computing Made Simple
 
Castles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App EngineCastles in the Cloud: Developing with Google App Engine
Castles in the Cloud: Developing with Google App Engine
 
Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)Deep Learning on AWS (November 2016)
Deep Learning on AWS (November 2016)
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
 
[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice
 
Empowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with AlternatorEmpowering the AWS DynamoDB™ application developer with Alternator
Empowering the AWS DynamoDB™ application developer with Alternator
 
Profiling & Testing with Spark
Profiling & Testing with SparkProfiling & Testing with Spark
Profiling & Testing with Spark
 
Galaxy
GalaxyGalaxy
Galaxy
 
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
Smuggling Multi-Cloud Support into Cloud-native Applications using Elastic Co...
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test tool
 
Gatling
GatlingGatling
Gatling
 
Ten practical ways to improve front-end performance
Ten practical ways to improve front-end performanceTen practical ways to improve front-end performance
Ten practical ways to improve front-end performance
 
Deep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech TalksDeep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive on Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
 
Deep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech TalksDeep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
Deep Dive: Amazon EC2 Elastic GPUs - May 2017 AWS Online Tech Talks
 
10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production10 things i wish i'd known before using spark in production
10 things i wish i'd known before using spark in production
 
Spark: The State of the Art Engine for Big Data Processing
Spark: The State of the Art Engine for Big Data ProcessingSpark: The State of the Art Engine for Big Data Processing
Spark: The State of the Art Engine for Big Data Processing
 
vega
vegavega
vega
 
AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09AWS (Hadoop) Meetup 30.04.09
AWS (Hadoop) Meetup 30.04.09
 

More from Sergio Bossa

To be relational, or not to be relational? That's NOT the question!
To be relational, or not to be relational? That's NOT the question!To be relational, or not to be relational? That's NOT the question!
To be relational, or not to be relational? That's NOT the question!
Sergio Bossa
 
Three Languages in Thirty Minutes
Three Languages in Thirty MinutesThree Languages in Thirty Minutes
Three Languages in Thirty Minutes
Sergio Bossa
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
Sergio Bossa
 
Actor concurrency for the JVM: a case study
Actor concurrency for the JVM: a case studyActor concurrency for the JVM: a case study
Actor concurrency for the JVM: a case study
Sergio Bossa
 
Scalable Databases - From Relational Databases To Polyglot Persistence
Scalable Databases - From Relational Databases To Polyglot PersistenceScalable Databases - From Relational Databases To Polyglot Persistence
Scalable Databases - From Relational Databases To Polyglot Persistence
Sergio Bossa
 
Scale Your Database And Be Happy
Scale Your Database And Be HappyScale Your Database And Be Happy
Scale Your Database And Be Happy
Sergio Bossa
 
Clustering In The Wild
Clustering In The WildClustering In The Wild
Clustering In The Wild
Sergio Bossa
 
Real Terracotta
Real TerracottaReal Terracotta
Real Terracotta
Sergio Bossa
 

More from Sergio Bossa (8)

To be relational, or not to be relational? That's NOT the question!
To be relational, or not to be relational? That's NOT the question!To be relational, or not to be relational? That's NOT the question!
To be relational, or not to be relational? That's NOT the question!
 
Three Languages in Thirty Minutes
Three Languages in Thirty MinutesThree Languages in Thirty Minutes
Three Languages in Thirty Minutes
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
 
Actor concurrency for the JVM: a case study
Actor concurrency for the JVM: a case studyActor concurrency for the JVM: a case study
Actor concurrency for the JVM: a case study
 
Scalable Databases - From Relational Databases To Polyglot Persistence
Scalable Databases - From Relational Databases To Polyglot PersistenceScalable Databases - From Relational Databases To Polyglot Persistence
Scalable Databases - From Relational Databases To Polyglot Persistence
 
Scale Your Database And Be Happy
Scale Your Database And Be HappyScale Your Database And Be Happy
Scale Your Database And Be Happy
 
Clustering In The Wild
Clustering In The WildClustering In The Wild
Clustering In The Wild
 
Real Terracotta
Real TerracottaReal Terracotta
Real Terracotta
 

Recently uploaded

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 

Recently uploaded (20)

Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 

Gridify your Spring application with Grid Gain @ Spring Italian Meeting 2008

  • 1. Gridify your Spring application with Grid Gain Sergio Bossa Pro-Netics / Sourcesense
  • 2. About me ✔ Software architect and engineer ➔ Pro-Netics (http://www.pronetics.it) ➔ Sourcesense (http://www.sourcesense.com) ✔ Blogger ➔ http://sbtourist.blogspot.com ✔ Open Source Enthusiast ➔ Lead at Scarlet - Clustering for Jira (http://scarlet.sf.net) ➔ Committer at Spring Modules (http://springmodules.dev.java.net) ➔ Committer at Taconite Ajax Framework (http://taconite.sourceforge.net/)
  • 3. Agenda ✔ Common ground. ➔ Why Grid? ➔ Performance and Scalability. ➔ Map / Reduce. ✔ Grid Gain and The Spring Framework. ➔ Grid Gain concepts. ➔ Grid Gain on Spring. ➔ A practical example.
  • 4. Why grid? Social changes ✔ Cheaper hardware. ➔ Computer as an off-the-shelf product. ✔ Web explosion. ➔ Everything is on the web. ➔ Everyone is on the web. ➔ More and more users. ➔ More and more transactions.
  • 5. Why grid? Technological changes ✔ Cheaper hardware. ➔ We have more power. ➔ We want more speed. ✔ Moore's Law: the number of transistors that can be inexpensively placed on an integrated circuit is increasing exponentially. ➔ But we had to go from single-core processors to multi- core ones ... ➔ So your for-loop will always run at the same speed. ➔ Forever.
  • 7. Performance It's all about doing one thing. Faster.
  • 8. Scalability It's all about doing the same one thing. In a bigger way.
  • 9. Performance vs Scalability ✔ Performance is about how fast. ✔ Scalability is about how much. ✔ Nowadays, if you want to save your job and hears (remember that Boss screaming at your face) ... ➔ You have to scale.
  • 10. Scalability in two words ✔ Vertical scalability is about adding more and more power (CPU, RAM ...) to your single computer. ➔ Also known as scaling-in. ➔ Finite and costly. ✔ Horizontal scalability is about adding more and more computers. ➔ Also known as scaling-out. ➔ Infinite and cheaper, because using commodity hardware. ✔ Guess what, we want to scale-out ...
  • 11. The scalability factor ✔ Available resources while scaling out. ➔ Linear scalability. ➔ Supra-linear scalability. ➔ Sub-linear scalability. ➔ Negative scalability. ✔ A scalable application should always strive for (almost) linear scalability.
  • 12. The scalability problem ✔ Amdahl's Law: performance decreases as number of processors increases once there is even a small percentage of non-parallelizable code. ➔ Most of the software is written in a non-parallelizable way. ➔ Writing software that scales out is perceived as hard.
  • 13. Entering Map / Reduce ✔ From Google Labs. ➔ Is it enough?
  • 14. Map / Reduce explained ✔ Programming model for linearly scaling out. ✔ De-facto standard for parallelizing intensive processing tasks. ✔ Based on: ➔ Splitting tasks into several parallelizable jobs grouped by key. ➔ Mapping jobs to processing units, optionally taking into account the job key. ➔ Merging jobs results, joining them into a global task result.
  • 15. Map / Reduce illustrated Counting words
  • 16. Grid computing with Map / Reduce ✔ Grid computing. ➔ Basically, a way to exploit multi-core / multi- processors / multi-computer environments for achieving horizontal scalability. ✔ Map / Reduce. ➔ Common paradigm in grid computing for implementing scalable applications.
  • 17. Entering Grid Gain ✔ Open Source Grid Computing Framework. ➔ Web : http://www.gridgain.com ➔ Created and supported by Grid Gain Systems. ➔ Community support. ➔ Professional support. ✔ Powerful, yet simple, yet fun, Map / Reduce implementation. ✔ Integrated with major servlet containers and application servers. ✔ Integrated with major data grid solutions. ✔ Integrated with the Spring Framework.
  • 18. Map / Reduce in Grid Gain -1- Task arrives to the first grid node, where is split into three jobs. First job is self-assigned and processed. -2- Second job is sent to the second grid node, where is processed. -3- Third job is sent to a the third grid node, where is processed. -4- Result from the second job is collected by the task on the first node. -5- Result from the third job is collected by the task on the first node. -6- Collected job results, together with the result from the first job, are reduced by the task and returned as a global result.
  • 19. Grid Gain Quick Start ✔ GridTask. ➔ Implements the Map / Reduce logic. ✔ GridJob. ➔ Implements the processing logic. ✔ GridFactory. ➔ Provides access to the grid for executing tasks. ✔ Automatic deployment. ➔ Tasks are automatically deployed to the grid. ✔ Peer class loading. ➔ Needed classes are automatically loaded from peers.
  • 20. Grid Gain Advanced ✔ SPI (Service Provider Interface) based configuration. ➔ Discovery SPI. ➔ Topology SPI. ➔ Checkpoint SPI. ➔ Load Balancing SPI. ➔ Collision SPI. ➔ Failover SPI. ➔ Metrics SPI. ➔ ...
  • 21. Entering Spring Framework The leading full-stack Java/JEE application framework.
  • 22. Grid Gain on Spring ✔ POJO configuration. ✔ AOP grid execution. ✔ Resource Look-up.
  • 23. Spring-based configuration ✔ POJO-based. ✔ Spring-based. ✔ GridConfiguration ➔ Configure grid parameters. ➔ Configure actual SPI implementations. ➔ Declared as a Spring bean. ✔ GridFactory ➔ GridFactory.start(GridConfiguration cfg) ➔ GridFactory.start(String springCfg)
  • 24. AOP-based grid execution ✔ Parallelization on grid as a cross-cutting concern. ✔ Transparent task deployment and execution. ✔ Gridify ➔ Annotation to identify methods that must be executed on grid. ✔ GridifySpringEnhancer ➔ Proxy-based enhancer for executing annotated object methods on grid as an aspect.
  • 25. Container-based resource look- up. ✔ Spring application context as a source for resources needed by tasks and jobs. ✔ GridSpringApplicationContextResource ➔ Annotation for injecting the Spring application context into tasks and jobs. ✔ GridFactory.start(GridConfiguration cfg, ApplicationContext springCtx) ➔ Starts grid with a specific context to use for looking-up resources.
  • 32. An Example Grid Tester (... continued)
  • 33. Q&A
  • 34. Thank you Sergio Bossa s.bossa@pronetics.it s.bossa@sourcesense.com