SlideShare a Scribd company logo
1 of 40
Download to read offline
Apache Ignite 🕯
Do-It-All Key/Value DB?
hello!
I am Zaar Hai
Cloud Architect at DoiT International
linkedin.com/in/zaar
2
1.
In a nutshell
3
A shortlist of features
✘ Key / Value DB
✘ Both in-memory and on-disk
✘ True (easy) clustering
✘ Transactions
✘ ANSI-99 SQL, with JDBC and ODBC support
✘ Grid computing
4
2.
Use Cases
5
Memory only
6
Distributed memory cache
Node
RAM
Node
RAM
Node
RAM
Memory only
7
Distributed memory cache
Node
RAM
Node
RAM
Node
RAM
Redis-like
performance
Memory + persistence
8
Distributed memory cache
Node
RAM
Node
RAM
Node
RAM
Node
Disc
Node
Disc
Node
Disc
Memory + persistence
9
Distributed memory cache
Node
RAM
Node
RAM
Node
RAM
Persistent Redis
done rightNode
Disc
Node
Disc
Node
Disc
Memory + LOTS of persistence
10
Distributed memory cache
Node
RAM
Node
RAM
Node
RAM
Node
Disc
Node
Disc
Node
Disc
Memory + LOTS of persistence
11
Node
RAM
Node
RAM
Node
RAM
Couch DB, ES,
Cassandra, etc.
Node
Disc
Node
Disc
Node
Disc
Distributed memory cache
3.
Easy Clustering
12
Cache data layout
13
Cache
P3P2P1
Cache data layout
14
Cache
P3P2P1
▩ pri
▧ bak1
▧ bak2
Cache data layout
15
Cache
P3P2P1
▩ pri
▧ bak1
▧ bak2
Node3
Node1
Node2
✘ Replication factor
✘ Distributed store
✘ Zone awareness
✘ Consistency level
Inside a node
16
Sync modes
Fsync / buffer cache
Inside a node
17
Off-heap
No strong masters
18
🔑
key1
P3P2P1
No strong masters
19
🔑
key1
Pnum
= hash(key, P_count)
P3P2P1
No strong masters
20
🔑
key1
Pnum
= hash(key, P_count)
Consistent hashing
E.g “modulo”
P3P2P1
No strong masters
21
P3P2P1
▩ pri
▧ bak1
▧ bak2
Node3
Node1
Node2
🔑
key1
P1
= hash(key1
, P_count)
Node6
Node4
Node5
No strong masters
22
P3P2P1
▩ pri
▧ bak1
▧ bak2
Node3
Node1
Node2
🔑
key1
P1
= hash(key1
, P_count)
r_hash(P1
, N_count) = N4
, N2
, N3
,
N6
, N5
, N1
Node6
Node4
Node5
Rendezvous hashing
No strong masters
23
P3P2P1
▩ pri
▧ bak1
▧ bak2
Node3
Node1
Node2
🔑
key1
P1
= hash(key1
, P_count)
Rendezvous hashing
Node6
Node4
Node5
r_hash(P1
, N_count) = N4
, N2
, N3
,
N6
, N5
, N1
Grid Computing
24
✘ Write your own function
✘ Load them as Jars into Ignite nodes
✘ Run computations close to your data
Cheap Setup That Makes Sense
25
✘ 2 x (2 CPU / 16 GB RAM) x 2 zones, 1 TB PD SSD per node
✘ Less than $250/TB
✘ 9 thin clients during random inserts, updates, and reads:
○ 3,682 inserts/s, 3.8ms median latency
○ 4,229 updates/s, 4.8ms median latency
○ 3,952 reads/s, 4.2ms median latency
✘ Completely CPU bound - you pay mainly for storage
4.
DevOps
Theory to practice
26
Running on K8s
27
✘ There are official docker images for Ignite Server
✘ There are guides for EKS, GKE, etc.
✘ Our improvements: https://github.com/doitintl/ignite-gke
No backups
28
✘ Snapshotting can work but quite tricky
Configuration
29
It’s all XML with Java Beans
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="dataStorageConfiguration">
<bean class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="persistenceEnabled" value="true"/>
</bean>
</property>
</bean>
</property>
...
Tools
30
✘ Couldn’t get CLI to work
✘ Web Console
○ Overcomplicated
○ Outdated docker images
Tools
31
✘ Couldn’t get CLI to work
✘ Web Console
○ Overcomplicated
○ Outdated docker images
Node3
Node1
Node2
Mongo
Tools
32
✘ Couldn’t get CLI to work
✘ Web Console
○ Overcomplicated
○ Outdated docker images
Node3
Node1
Node2
Mongo
Web
FE
Web
BE
Tools
33
✘ Couldn’t get CLI to work
✘ Web Console
○ Overcomplicated
○ Outdated docker images
Node3
Node1
Node2
Mongo
Web
FE
Web
BE
agent
REST
REST API
✘ Not really REST - more like HTTP RPC
GET /ignite?cmd=getorcreate&cacheName=foo
34
REST API
✘ Not really REST - more like HTTP RPC
GET /ignite?cmd=getorcreate&cacheName=foo
✘ Even better 😨
# Fetch cache partitions list
GET /ignite?cmd=exe&
name=org.apache.ignite.internal.visor.compute.VisorGatewayTask&
p1=nid1;nid2;nid3&
p2=org.apache.ignite.internal.visor.cache.VisorCachePartitionsTask&
p3=org.apache.ignite.internal.visor.cache.VisorCachePartitionsTaskArg&
p4=my_cache
35
Supported Client Protocols
✘ HTTP “REST” API
✘ Memcached-compatible Binary Protocol
✘ Redis client protocol (partial support)
✘ Ignite Binary Client Protocol
○ “Ignite binary client protocol enables user applications to
communicate with an existing Ignite cluster without starting a
full-fledged Ignite node. An application can connect to the
cluster through a raw TCP socket.”
36
Native Thin Client Libraries
✘ Java
✘ .NET
✘ C++
✘ Node.JS
✘ Python
✘ PHP
37
Thin Client Example (Java)
38
public static void main(String[] args) {
ClientConfiguration cfg = new ClientConfiguration().setAddresses("127.0.0.1:10800");
try (IgniteClient igniteClient = Ignition.startClient(cfg)) {
System.out.println(">>> Thin client put-get example started.");
final String CACHE_NAME = "put-get-example";
ClientCache<Integer, Address> cache = igniteClient.getOrCreateCache(CACHE_NAME);
System.out.format(">>> Created cache [%s].n", CACHE_NAME);
Integer key = 1;
Address val = new Address("1545 Jackson Street", 94612);
cache.put(key, val);
System.out.format(">>> Saved [%s] in the cache.n", val);
Address cachedVal = cache.get(key);
System.out.format(">>> Loaded [%s] from the cache.n", cachedVal);
}
catch (ClientException e) {
System.err.println(e.getMessage());
}
catch (Exception e) {
System.err.format("Unexpected failure: %sn", e);
}
}
Output:
>>> Thin client put-get example started.
>>> Created cache [put-get-example].
>>> Saved [Address [street=1545 Jackson Street, zip=94612]] in the cache.
>>> Loaded [Address [street=1545 Jackson Street, zip=94612]] from the cache.
Final thoughts
39
✓ Interesting tech
✓ Flexible performance
✓ Feature rich
✘ Tools are immature
✘ Docs need improvement
✘ For Java nuts?
thanks!
Any questions?
40

More Related Content

What's hot

My two cents about Mysql backup
My two cents about Mysql backupMy two cents about Mysql backup
My two cents about Mysql backupAndrejs Vorobjovs
 
Capturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLCapturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLPadraig O'Sullivan
 
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)err
 
Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)err
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case StudyRonald Bradford
 
Remove php calls and scale your site like crazy !
Remove php calls and scale your site like crazy !Remove php calls and scale your site like crazy !
Remove php calls and scale your site like crazy !Wim Godden
 
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015Dave Stokes
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!Arawn Park
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBAntony T Curtis
 
Cloud, Cache, and Configs
Cloud, Cache, and ConfigsCloud, Cache, and Configs
Cloud, Cache, and ConfigsScott Taylor
 
Drupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hoodDrupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hoodPiyuesh Kumar
 
Drupal as a web framework
Drupal as a web frameworkDrupal as a web framework
Drupal as a web frameworkAdam Kalsey
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS AzureJohannes Hoppe
 
Status of Hadoop 0.23 Operations at Yahoo
Status of Hadoop 0.23 Operations at YahooStatus of Hadoop 0.23 Operations at Yahoo
Status of Hadoop 0.23 Operations at YahooDataWorks Summit
 

What's hot (19)

Algotitmo Moinho
Algotitmo MoinhoAlgotitmo Moinho
Algotitmo Moinho
 
My two cents about Mysql backup
My two cents about Mysql backupMy two cents about Mysql backup
My two cents about Mysql backup
 
Capturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQLCapturing, Analyzing, and Optimizing your SQL
Capturing, Analyzing, and Optimizing your SQL
 
JConsole with OpenIDM
JConsole with OpenIDMJConsole with OpenIDM
JConsole with OpenIDM
 
Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)Kickin' Ass with Cache-Fu (without notes)
Kickin' Ass with Cache-Fu (without notes)
 
Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)Kickin' Ass with Cache-Fu (with notes)
Kickin' Ass with Cache-Fu (with notes)
 
10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study10x Performance Improvements - A Case Study
10x Performance Improvements - A Case Study
 
Remove php calls and scale your site like crazy !
Remove php calls and scale your site like crazy !Remove php calls and scale your site like crazy !
Remove php calls and scale your site like crazy !
 
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015MySQL's new Secure by Default Install -- All Things Open October 20th 2015
MySQL's new Secure by Default Install -- All Things Open October 20th 2015
 
[Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아![Spring Camp 2013] Java Configuration 없인 못살아!
[Spring Camp 2013] Java Configuration 없인 못살아!
 
Using Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDBUsing Perl Stored Procedures for MariaDB
Using Perl Stored Procedures for MariaDB
 
Cloud, Cache, and Configs
Cloud, Cache, and ConfigsCloud, Cache, and Configs
Cloud, Cache, and Configs
 
Drupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hoodDrupal 8 Cache: Under the hood
Drupal 8 Cache: Under the hood
 
Drupal as a web framework
Drupal as a web frameworkDrupal as a web framework
Drupal as a web framework
 
hadoop
hadoophadoop
hadoop
 
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
2012-03-20 - Getting started with Node.js and MongoDB on MS Azure
 
Hadoop on aws amazon
Hadoop on aws amazonHadoop on aws amazon
Hadoop on aws amazon
 
Exploring App fabric
Exploring App fabricExploring App fabric
Exploring App fabric
 
Status of Hadoop 0.23 Operations at Yahoo
Status of Hadoop 0.23 Operations at YahooStatus of Hadoop 0.23 Operations at Yahoo
Status of Hadoop 0.23 Operations at Yahoo
 

Similar to Apache ignite - a do-it-all key-value db?

Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best PracticesEric Bottard
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula Sorin Chiprian
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersRonald Bradford
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudArun Gupta
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourWim Godden
 
Power Hadoop Cluster with AWS Cloud
Power Hadoop Cluster with AWS CloudPower Hadoop Cluster with AWS Cloud
Power Hadoop Cluster with AWS CloudEdureka!
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Arun Gupta
 
Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Combell NV
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudArun Gupta
 
Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Combell NV
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Arun Gupta
 
Spark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting GuideSpark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting GuideIBM
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012Arun Gupta
 
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014zshoylev
 
企业级软件的组件化和动态化开发实践
企业级软件的组件化和动态化开发实践企业级软件的组件化和动态化开发实践
企业级软件的组件化和动态化开发实践Jacky Chi
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Arun Gupta
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Arun Gupta
 
Zend Server Data Caching
Zend Server Data CachingZend Server Data Caching
Zend Server Data CachingEl Taller Web
 

Similar to Apache ignite - a do-it-all key-value db? (20)

Cloud Best Practices
Cloud Best PracticesCloud Best Practices
Cloud Best Practices
 
J boss
J bossJ boss
J boss
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula
 
MySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and DevelopersMySQL For Oracle DBA's and Developers
MySQL For Oracle DBA's and Developers
 
Running your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the CloudRunning your Java EE 6 Applications in the Cloud
Running your Java EE 6 Applications in the Cloud
 
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTourCaching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
 
Power Hadoop Cluster with AWS Cloud
Power Hadoop Cluster with AWS CloudPower Hadoop Cluster with AWS Cloud
Power Hadoop Cluster with AWS Cloud
 
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
Running your Java EE 6 applications in the Cloud @ Silicon Valley Code Camp 2010
 
Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012
 
JFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the CloudJFokus 2011 - Running your Java EE 6 apps in the Cloud
JFokus 2011 - Running your Java EE 6 apps in the Cloud
 
Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012
 
Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)Running your Java EE 6 applications in the Cloud (FISL 12)
Running your Java EE 6 applications in the Cloud (FISL 12)
 
Spark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting GuideSpark 2.x Troubleshooting Guide
Spark 2.x Troubleshooting Guide
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
Taming the Cloud Database with Apache jclouds, ApacheCon Europe 2014
 
企业级软件的组件化和动态化开发实践
企业级软件的组件化和动态化开发实践企业级软件的组件化和动态化开发实践
企业级软件的组件化和动态化开发实践
 
Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds Running your Java EE 6 applications in the clouds
Running your Java EE 6 applications in the clouds
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
 
infra-as-code
infra-as-codeinfra-as-code
infra-as-code
 
Zend Server Data Caching
Zend Server Data CachingZend Server Data Caching
Zend Server Data Caching
 

More from Zaar Hai

When Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
When Less is More - Save Brain Cycles with GKE Autopilot and Cloud RunWhen Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
When Less is More - Save Brain Cycles with GKE Autopilot and Cloud RunZaar Hai
 
Google auth dispelling the magic
Google auth   dispelling the magicGoogle auth   dispelling the magic
Google auth dispelling the magicZaar Hai
 
Google auth - dispelling the magic
Google auth - dispelling the magicGoogle auth - dispelling the magic
Google auth - dispelling the magicZaar Hai
 
Deep into Prometheus
Deep into PrometheusDeep into Prometheus
Deep into PrometheusZaar Hai
 
Dip into prometheus
Dip into prometheusDip into prometheus
Dip into prometheusZaar Hai
 
Advanced Python, Part 2
Advanced Python, Part 2Advanced Python, Part 2
Advanced Python, Part 2Zaar Hai
 
Advanced Python, Part 1
Advanced Python, Part 1Advanced Python, Part 1
Advanced Python, Part 1Zaar Hai
 

More from Zaar Hai (7)

When Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
When Less is More - Save Brain Cycles with GKE Autopilot and Cloud RunWhen Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
When Less is More - Save Brain Cycles with GKE Autopilot and Cloud Run
 
Google auth dispelling the magic
Google auth   dispelling the magicGoogle auth   dispelling the magic
Google auth dispelling the magic
 
Google auth - dispelling the magic
Google auth - dispelling the magicGoogle auth - dispelling the magic
Google auth - dispelling the magic
 
Deep into Prometheus
Deep into PrometheusDeep into Prometheus
Deep into Prometheus
 
Dip into prometheus
Dip into prometheusDip into prometheus
Dip into prometheus
 
Advanced Python, Part 2
Advanced Python, Part 2Advanced Python, Part 2
Advanced Python, Part 2
 
Advanced Python, Part 1
Advanced Python, Part 1Advanced Python, Part 1
Advanced Python, Part 1
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Apache ignite - a do-it-all key-value db?

  • 2. hello! I am Zaar Hai Cloud Architect at DoiT International linkedin.com/in/zaar 2
  • 4. A shortlist of features ✘ Key / Value DB ✘ Both in-memory and on-disk ✘ True (easy) clustering ✘ Transactions ✘ ANSI-99 SQL, with JDBC and ODBC support ✘ Grid computing 4
  • 6. Memory only 6 Distributed memory cache Node RAM Node RAM Node RAM
  • 7. Memory only 7 Distributed memory cache Node RAM Node RAM Node RAM Redis-like performance
  • 8. Memory + persistence 8 Distributed memory cache Node RAM Node RAM Node RAM Node Disc Node Disc Node Disc
  • 9. Memory + persistence 9 Distributed memory cache Node RAM Node RAM Node RAM Persistent Redis done rightNode Disc Node Disc Node Disc
  • 10. Memory + LOTS of persistence 10 Distributed memory cache Node RAM Node RAM Node RAM Node Disc Node Disc Node Disc
  • 11. Memory + LOTS of persistence 11 Node RAM Node RAM Node RAM Couch DB, ES, Cassandra, etc. Node Disc Node Disc Node Disc Distributed memory cache
  • 14. Cache data layout 14 Cache P3P2P1 ▩ pri ▧ bak1 ▧ bak2
  • 15. Cache data layout 15 Cache P3P2P1 ▩ pri ▧ bak1 ▧ bak2 Node3 Node1 Node2 ✘ Replication factor ✘ Distributed store ✘ Zone awareness ✘ Consistency level
  • 16. Inside a node 16 Sync modes Fsync / buffer cache
  • 19. No strong masters 19 🔑 key1 Pnum = hash(key, P_count) P3P2P1
  • 20. No strong masters 20 🔑 key1 Pnum = hash(key, P_count) Consistent hashing E.g “modulo” P3P2P1
  • 21. No strong masters 21 P3P2P1 ▩ pri ▧ bak1 ▧ bak2 Node3 Node1 Node2 🔑 key1 P1 = hash(key1 , P_count) Node6 Node4 Node5
  • 22. No strong masters 22 P3P2P1 ▩ pri ▧ bak1 ▧ bak2 Node3 Node1 Node2 🔑 key1 P1 = hash(key1 , P_count) r_hash(P1 , N_count) = N4 , N2 , N3 , N6 , N5 , N1 Node6 Node4 Node5 Rendezvous hashing
  • 23. No strong masters 23 P3P2P1 ▩ pri ▧ bak1 ▧ bak2 Node3 Node1 Node2 🔑 key1 P1 = hash(key1 , P_count) Rendezvous hashing Node6 Node4 Node5 r_hash(P1 , N_count) = N4 , N2 , N3 , N6 , N5 , N1
  • 24. Grid Computing 24 ✘ Write your own function ✘ Load them as Jars into Ignite nodes ✘ Run computations close to your data
  • 25. Cheap Setup That Makes Sense 25 ✘ 2 x (2 CPU / 16 GB RAM) x 2 zones, 1 TB PD SSD per node ✘ Less than $250/TB ✘ 9 thin clients during random inserts, updates, and reads: ○ 3,682 inserts/s, 3.8ms median latency ○ 4,229 updates/s, 4.8ms median latency ○ 3,952 reads/s, 4.2ms median latency ✘ Completely CPU bound - you pay mainly for storage
  • 27. Running on K8s 27 ✘ There are official docker images for Ignite Server ✘ There are guides for EKS, GKE, etc. ✘ Our improvements: https://github.com/doitintl/ignite-gke
  • 28. No backups 28 ✘ Snapshotting can work but quite tricky
  • 29. Configuration 29 It’s all XML with Java Beans <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean class="org.apache.ignite.configuration.IgniteConfiguration"> <property name="dataStorageConfiguration"> <bean class="org.apache.ignite.configuration.DataStorageConfiguration"> <property name="defaultDataRegionConfiguration"> <bean class="org.apache.ignite.configuration.DataRegionConfiguration"> <property name="persistenceEnabled" value="true"/> </bean> </property> </bean> </property> ...
  • 30. Tools 30 ✘ Couldn’t get CLI to work ✘ Web Console ○ Overcomplicated ○ Outdated docker images
  • 31. Tools 31 ✘ Couldn’t get CLI to work ✘ Web Console ○ Overcomplicated ○ Outdated docker images Node3 Node1 Node2 Mongo
  • 32. Tools 32 ✘ Couldn’t get CLI to work ✘ Web Console ○ Overcomplicated ○ Outdated docker images Node3 Node1 Node2 Mongo Web FE Web BE
  • 33. Tools 33 ✘ Couldn’t get CLI to work ✘ Web Console ○ Overcomplicated ○ Outdated docker images Node3 Node1 Node2 Mongo Web FE Web BE agent REST
  • 34. REST API ✘ Not really REST - more like HTTP RPC GET /ignite?cmd=getorcreate&cacheName=foo 34
  • 35. REST API ✘ Not really REST - more like HTTP RPC GET /ignite?cmd=getorcreate&cacheName=foo ✘ Even better 😨 # Fetch cache partitions list GET /ignite?cmd=exe& name=org.apache.ignite.internal.visor.compute.VisorGatewayTask& p1=nid1;nid2;nid3& p2=org.apache.ignite.internal.visor.cache.VisorCachePartitionsTask& p3=org.apache.ignite.internal.visor.cache.VisorCachePartitionsTaskArg& p4=my_cache 35
  • 36. Supported Client Protocols ✘ HTTP “REST” API ✘ Memcached-compatible Binary Protocol ✘ Redis client protocol (partial support) ✘ Ignite Binary Client Protocol ○ “Ignite binary client protocol enables user applications to communicate with an existing Ignite cluster without starting a full-fledged Ignite node. An application can connect to the cluster through a raw TCP socket.” 36
  • 37. Native Thin Client Libraries ✘ Java ✘ .NET ✘ C++ ✘ Node.JS ✘ Python ✘ PHP 37
  • 38. Thin Client Example (Java) 38 public static void main(String[] args) { ClientConfiguration cfg = new ClientConfiguration().setAddresses("127.0.0.1:10800"); try (IgniteClient igniteClient = Ignition.startClient(cfg)) { System.out.println(">>> Thin client put-get example started."); final String CACHE_NAME = "put-get-example"; ClientCache<Integer, Address> cache = igniteClient.getOrCreateCache(CACHE_NAME); System.out.format(">>> Created cache [%s].n", CACHE_NAME); Integer key = 1; Address val = new Address("1545 Jackson Street", 94612); cache.put(key, val); System.out.format(">>> Saved [%s] in the cache.n", val); Address cachedVal = cache.get(key); System.out.format(">>> Loaded [%s] from the cache.n", cachedVal); } catch (ClientException e) { System.err.println(e.getMessage()); } catch (Exception e) { System.err.format("Unexpected failure: %sn", e); } } Output: >>> Thin client put-get example started. >>> Created cache [put-get-example]. >>> Saved [Address [street=1545 Jackson Street, zip=94612]] in the cache. >>> Loaded [Address [street=1545 Jackson Street, zip=94612]] from the cache.
  • 39. Final thoughts 39 ✓ Interesting tech ✓ Flexible performance ✓ Feature rich ✘ Tools are immature ✘ Docs need improvement ✘ For Java nuts?