SlideShare a Scribd company logo
Java data structures
powered by Redis.
Introduction to
Redisson
Nikita Koksharov
Founder of
WHY REDISSON? WHY DO WE
NEED ANOTHER REDIS CLIENT?
COMMUNITY ORIENTED
OPEN SOURCE (APACHE LICENCE)
DISTRIBUTED COLLECTIONS
▸ Map *
▸ MultiMap *
▸ LocalCachedMap
▸ Set *
▸ SortedSet
▸ ScoredSortedSet
▸ LexSortedSet
▸ List
* Supports individual element eviction
▸ Queue
▸ Deque
▸ BlockingQueue
▸ BlockingDeque
▸ BoundedBlockingQueue
▸ BlockingFairQueue
▸ DelayedQueue
MAP
ConcurrentMap<Integer, MyObject> map = new ConcurrentHashMap<>();
map.put(20, new MyObject("oldobj"));
map.putIfAbsent(20, new MyObject("newobj"));
map.containsKey(1);
REDISSON MAP
ConcurrentMap<Integer, MyObject> map = redisson.getMap("someMap");
map.put(20, new MyObject("oldobj"));
map.putIfAbsent(20, new MyObject("newobj"));
map.containsKey(1);
REDISSON MAP EVICTION
RMapCache<Integer, String> map = redisson.getMapCache("someMap");
map.put(20, "oldobj", 20, TimeUnit.MINUTES);
map.containsKey(4);
map.putIfAbsent(2, "oldobj", 5, TimeUnit.SECONDS);
REDISSON SET
Set<String> set = redisson.getSet("someSet");
set.add("value");
set.contains("value");
set.remove("value");
REDISSON BLOCKINGQUEUE
BlockingQueue<MyObj> queue = redisson.getSet("someSet");
set.add(new MyObj("value"));
MyObj obj = queue.peek();
MyObj obj = queue.poll(10, TimeUnit.MINUTES);
DISTRIBUTED LOCKS
AND SYNCHRONIZERS
▸ Lock
▸ FairLock
▸ RedLock
▸ MultiLock
▸ ReadWriteLock
▸ Semaphore
▸ PermitExpirableSemaphore
▸ CountDownLatch
▸ Phaser (Planned)
REDISSON LOCK
RLock lock = redisson.getLock("lock");
lock.lock();
// or
lock.lock(10, TimeUnit.MINUTES);
//…
lock.unlock();
▸ Bucket (Object Holder)
▸ BinaryStream (Input & Output Stream)
▸ Geo (Geospatial Object Holder)
▸ BitSet
▸ AtomicLong
▸ AtomicDouble
▸ Topic (Pub/Sub)
▸ BloomFilter
▸ HyperLogLog
DISTRIBUTED OBJECTS
REDISSON PUB/SUB
RTopic<SomeMessage> topic = redisson.getTopic("someTopic");
topic.addListener(new MessageListener<SomeMessage>() {
@Override
public void onMessage(String channel, SomeMessage message) {
System.out.println(message);
}
});
// in other thread or other JVM
RTopic<SomeMessage> topic = redisson.getTopic(" someTopic");
topic.publish(new SomeMessage("new message"));
INTERGRATION WITH
FRAMEWORKS
▸ Spring Cache
▸ Hibernate Cache
▸ JCache API (JSR-107) implementation
▸ Tomcat Session Manager
▸ Spring Session
CONNECTION MODES
▸ Replicated nodes *
▸ Cluster nodes *
▸ Sentinel nodes
▸ Master with Slave nodes
▸ Single node
* Also supports AWS ElastiCache and Azure Redis Cache
DATA SERIALIZATION
▸ Jackson JSON
▸ Avro
▸ Smile
▸ CBOR
▸ MsgPack
▸ Snappy
▸ Kryo
▸ FST
▸ LZ4
▸ JDK Serialization
HOW TO START
// 1. Create config object
Config = new Config();
config.useClusterServers()
.addNodeAddress("myserver.com:7000", "myserver.com:7001");
// 2. Create Redisson instance
RedissonClient redisson = Redisson.create(config);
// 3. Get object you need
Map<String, String> map = redisson.getMap("myMap");
ASYNCHRONOUS
COMMAND EXECUTION
RMapAsync<Integer, String> map = redisson.getMap("someMap");
Future<String> putIfFuture = map.putIfAbsentAsync(20, "object");
Future<String> getFuture = map.getAsync(20);
getFuture.addListener(new FutureListener<Boolean>() {
@Override
public void operationComplete(Future<Boolean> future)
throws Exception {
//…
}
});
REACTIVE
COMMAND EXECUTION
RedissonReactive redisson = Redisson.createReactive(config);
RMapReactive<Integer, String> map = redisson.getMap("someMap");
Publisher<String> putRes = map.put(20, "object");
Publisher<String> value = map.getAsync(20);
LOW-LEVEL REDIS CLIENT
RedisClient client = new RedisClient("localhost", 6379);
RedisConnection conn = client.connect();
Future<RedisConnection> connFuture = client.connectAsync();
conn.sync(StringCodec.INSTANCE,
RedisCommands.SET, "key", "value");
Future<String> res = conn.async(StringCodec.INSTANCE,
RedisCommands.GET, "key");
USED BY
▸ Electronic Arts
▸ Baidu
▸ Infor
▸ New Relic Synthetics
▸ Singtel
▸ Crimson Hexagon
▸ Brookhaven National
Laboratory
▸ Netflix Dyno client
▸ 武林Q传
▸ Monits
▸ Ocous
▸ Invaluable
▸ Clover
▸ Apache Karaf Decanter
▸ Atmosphere Framework
▸ BrandsEye
▸ Datorama
▸ BrightCloud
▸ Azar
▸ Snapfish
…
THANK YOU!
http://redisson.org

More Related Content

What's hot

Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプCocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプMasayuki Nii
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptViliam Elischer
 
Memory leak in Javascript - Renan Bastos
Memory leak in Javascript - Renan BastosMemory leak in Javascript - Renan Bastos
Memory leak in Javascript - Renan BastosTchelinux
 
MongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and MergingMongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and MergingJason Terpko
 
rx.js make async programming simpler
rx.js make async programming simplerrx.js make async programming simpler
rx.js make async programming simplerAlexander Mostovenko
 
Compose Async with RxJS
Compose Async with RxJSCompose Async with RxJS
Compose Async with RxJSKyung Yeol Kim
 
What they don't tell you about JavaScript
What they don't tell you about JavaScriptWhat they don't tell you about JavaScript
What they don't tell you about JavaScriptRaphael Cruzeiro
 
Python queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaPython queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaOndřej Veselý
 
You will learn RxJS in 2017
You will learn RxJS in 2017You will learn RxJS in 2017
You will learn RxJS in 2017名辰 洪
 
Parallel Computing with R
Parallel Computing with RParallel Computing with R
Parallel Computing with RPeter Solymos
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streamsmattpodwysocki
 
MongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialMongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialJason Terpko
 
Nicety of java 8 multithreading for advanced, Max Voronoy
Nicety of java 8 multithreading for advanced, Max VoronoyNicety of java 8 multithreading for advanced, Max Voronoy
Nicety of java 8 multithreading for advanced, Max VoronoySigma Software
 
Add Some Fun to Your Functional Programming With RXJS
Add Some Fun to Your Functional Programming With RXJSAdd Some Fun to Your Functional Programming With RXJS
Add Some Fun to Your Functional Programming With RXJSRyan Anklam
 
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJSFunctional Reactive Programming with RxJS
Functional Reactive Programming with RxJSstefanmayer13
 
Average- An android project
Average- An android projectAverage- An android project
Average- An android projectIpsit Dash
 
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisMongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisJason Terpko
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDBJason Terpko
 
MongoDB: Intro & Application for Big Data
MongoDB: Intro & Application  for Big DataMongoDB: Intro & Application  for Big Data
MongoDB: Intro & Application for Big DataTakahiro Inoue
 

What's hot (20)

Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプCocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
Cocoa勉強会23-識別情報の変換〜文字エンコードとデータタイプ
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScript
 
Angular2 rxjs
Angular2 rxjsAngular2 rxjs
Angular2 rxjs
 
Memory leak in Javascript - Renan Bastos
Memory leak in Javascript - Renan BastosMemory leak in Javascript - Renan Bastos
Memory leak in Javascript - Renan Bastos
 
MongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and MergingMongoDB Chunks - Distribution, Splitting, and Merging
MongoDB Chunks - Distribution, Splitting, and Merging
 
rx.js make async programming simpler
rx.js make async programming simplerrx.js make async programming simpler
rx.js make async programming simpler
 
Compose Async with RxJS
Compose Async with RxJSCompose Async with RxJS
Compose Async with RxJS
 
What they don't tell you about JavaScript
What they don't tell you about JavaScriptWhat they don't tell you about JavaScript
What they don't tell you about JavaScript
 
Python queue solution with asyncio and kafka
Python queue solution with asyncio and kafkaPython queue solution with asyncio and kafka
Python queue solution with asyncio and kafka
 
You will learn RxJS in 2017
You will learn RxJS in 2017You will learn RxJS in 2017
You will learn RxJS in 2017
 
Parallel Computing with R
Parallel Computing with RParallel Computing with R
Parallel Computing with R
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
 
MongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster TutorialMongoDB - Sharded Cluster Tutorial
MongoDB - Sharded Cluster Tutorial
 
Nicety of java 8 multithreading for advanced, Max Voronoy
Nicety of java 8 multithreading for advanced, Max VoronoyNicety of java 8 multithreading for advanced, Max Voronoy
Nicety of java 8 multithreading for advanced, Max Voronoy
 
Add Some Fun to Your Functional Programming With RXJS
Add Some Fun to Your Functional Programming With RXJSAdd Some Fun to Your Functional Programming With RXJS
Add Some Fun to Your Functional Programming With RXJS
 
Functional Reactive Programming with RxJS
Functional Reactive Programming with RxJSFunctional Reactive Programming with RxJS
Functional Reactive Programming with RxJS
 
Average- An android project
Average- An android projectAverage- An android project
Average- An android project
 
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisMongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
 
Triggers In MongoDB
Triggers In MongoDBTriggers In MongoDB
Triggers In MongoDB
 
MongoDB: Intro & Application for Big Data
MongoDB: Intro & Application  for Big DataMongoDB: Intro & Application  for Big Data
MongoDB: Intro & Application for Big Data
 

Viewers also liked

Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionKent Huang
 
Clean Code - How to write comprehensible code regarding cognitive abilities o...
Clean Code - How to write comprehensible code regarding cognitive abilities o...Clean Code - How to write comprehensible code regarding cognitive abilities o...
Clean Code - How to write comprehensible code regarding cognitive abilities o...Mario Gleichmann
 
Redis training for java software engineers
Redis training for java software engineersRedis training for java software engineers
Redis training for java software engineersMoshe Kaplan
 
Empathic Programming - How to write comprehensible code
Empathic Programming - How to write comprehensible codeEmpathic Programming - How to write comprehensible code
Empathic Programming - How to write comprehensible codeMario Gleichmann
 
Writing beautiful code with Java 8
Writing beautiful code with Java 8Writing beautiful code with Java 8
Writing beautiful code with Java 8Sergiu Mircea Indrie
 
Radisson Blu Belorusskaya presentation - English
Radisson Blu Belorusskaya presentation - EnglishRadisson Blu Belorusskaya presentation - English
Radisson Blu Belorusskaya presentation - EnglishRadisson Blu
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code DevelopmentPeter Gfader
 
Clean Code (Presentacion interna en Virtual Software)
Clean Code (Presentacion interna en Virtual Software)Clean Code (Presentacion interna en Virtual Software)
Clean Code (Presentacion interna en Virtual Software)jmiguel rodriguez
 
Case analysis on radisson blue hotel
Case analysis on radisson blue hotel Case analysis on radisson blue hotel
Case analysis on radisson blue hotel Salsabil Rahman
 
100% Guest Satisfaction Program
100% Guest Satisfaction Program100% Guest Satisfaction Program
100% Guest Satisfaction ProgramJet Airways
 
المحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابورالمحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابورMahmoud Alfarra
 
Introduction to Agile
Introduction to AgileIntroduction to Agile
Introduction to Agileagorolabs
 
Marketing Mix and Market Targeting Strategies of Radisson hotel
Marketing Mix and Market Targeting Strategies of Radisson hotel Marketing Mix and Market Targeting Strategies of Radisson hotel
Marketing Mix and Market Targeting Strategies of Radisson hotel Sudipta Saha
 
Clean Code I - Best Practices
Clean Code I - Best PracticesClean Code I - Best Practices
Clean Code I - Best PracticesTheo Jungeblut
 
Java data structures for principled programmer
Java data structures for principled programmerJava data structures for principled programmer
Java data structures for principled programmerspnr15z
 
‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism‫‫Chapter4 Polymorphism
‫‫Chapter4 PolymorphismMahmoud Alfarra
 

Viewers also liked (20)

Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 Function
 
Clean Code - How to write comprehensible code regarding cognitive abilities o...
Clean Code - How to write comprehensible code regarding cognitive abilities o...Clean Code - How to write comprehensible code regarding cognitive abilities o...
Clean Code - How to write comprehensible code regarding cognitive abilities o...
 
Redis training for java software engineers
Redis training for java software engineersRedis training for java software engineers
Redis training for java software engineers
 
Empathic Programming - How to write comprehensible code
Empathic Programming - How to write comprehensible codeEmpathic Programming - How to write comprehensible code
Empathic Programming - How to write comprehensible code
 
Writing beautiful code with Java 8
Writing beautiful code with Java 8Writing beautiful code with Java 8
Writing beautiful code with Java 8
 
Radisson Blu Belorusskaya presentation - English
Radisson Blu Belorusskaya presentation - EnglishRadisson Blu Belorusskaya presentation - English
Radisson Blu Belorusskaya presentation - English
 
Clean Code Development
Clean Code DevelopmentClean Code Development
Clean Code Development
 
Clean Code (Presentacion interna en Virtual Software)
Clean Code (Presentacion interna en Virtual Software)Clean Code (Presentacion interna en Virtual Software)
Clean Code (Presentacion interna en Virtual Software)
 
Clean Code
Clean CodeClean Code
Clean Code
 
OOP Basics
OOP BasicsOOP Basics
OOP Basics
 
Case analysis on radisson blue hotel
Case analysis on radisson blue hotel Case analysis on radisson blue hotel
Case analysis on radisson blue hotel
 
100% Guest Satisfaction Program
100% Guest Satisfaction Program100% Guest Satisfaction Program
100% Guest Satisfaction Program
 
المحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابورالمحاضرة الثامنة: تراكيب البيانات الطابور
المحاضرة الثامنة: تراكيب البيانات الطابور
 
Introduction to Agile
Introduction to AgileIntroduction to Agile
Introduction to Agile
 
Marketing Mix and Market Targeting Strategies of Radisson hotel
Marketing Mix and Market Targeting Strategies of Radisson hotel Marketing Mix and Market Targeting Strategies of Radisson hotel
Marketing Mix and Market Targeting Strategies of Radisson hotel
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
Clean Code I - Best Practices
Clean Code I - Best PracticesClean Code I - Best Practices
Clean Code I - Best Practices
 
Java data structures for principled programmer
Java data structures for principled programmerJava data structures for principled programmer
Java data structures for principled programmer
 
‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism‫‫Chapter4 Polymorphism
‫‫Chapter4 Polymorphism
 
Radisson Presentation
Radisson PresentationRadisson Presentation
Radisson Presentation
 

Similar to Java data structures powered by Redis. Introduction to Redisson @ Redis Lightning Talks, May 9

NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryAlexandre Morgaut
 
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...Amazon Web Services
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsAlexander Rubin
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyAlexandre Morgaut
 
What's the deal with Android maps?
What's the deal with Android maps?What's the deal with Android maps?
What's the deal with Android maps?Chuck Greb
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourPeter Friese
 
Easy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkEasy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkZeroTurnaround
 
Example R usage for oracle DBA UKOUG 2013
Example R usage for oracle DBA UKOUG 2013Example R usage for oracle DBA UKOUG 2013
Example R usage for oracle DBA UKOUG 2013BertrandDrouvot
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSuzquiano
 
Lift 2 0
Lift 2 0Lift 2 0
Lift 2 0SO
 
Store and Process Big Data with Hadoop and Cassandra
Store and Process Big Data with Hadoop and CassandraStore and Process Big Data with Hadoop and Cassandra
Store and Process Big Data with Hadoop and CassandraDeependra Ariyadewa
 
Automated Spark Deployment With Declarative Infrastructure
Automated Spark Deployment With Declarative InfrastructureAutomated Spark Deployment With Declarative Infrastructure
Automated Spark Deployment With Declarative InfrastructureSpark Summit
 
Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchKeira Zhou
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Ayes Chinmay
 
Java Play Restful JPA
Java Play Restful JPAJava Play Restful JPA
Java Play Restful JPAFaren faren
 
Bulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & CouchbaseBulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & CouchbaseAlex Derkach
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document StoreDave Stokes
 
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinGet the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinXamarin
 

Similar to Java data structures powered by Redis. Introduction to Redisson @ Redis Lightning Talks, May 9 (20)

NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
(BDT401) Big Data Orchestra - Harmony within Data Analysis Tools | AWS re:Inv...
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of Things
 
NoSQL and JavaScript: a love story
NoSQL and JavaScript: a love storyNoSQL and JavaScript: a love story
NoSQL and JavaScript: a love story
 
What's the deal with Android maps?
What's the deal with Android maps?What's the deal with Android maps?
What's the deal with Android maps?
 
CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
Easy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkEasy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip Ozturk
 
Example R usage for oracle DBA UKOUG 2013
Example R usage for oracle DBA UKOUG 2013Example R usage for oracle DBA UKOUG 2013
Example R usage for oracle DBA UKOUG 2013
 
Hazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMSHazelcast and MongoDB at Cloud CMS
Hazelcast and MongoDB at Cloud CMS
 
Lift 2 0
Lift 2 0Lift 2 0
Lift 2 0
 
Mobile Web 5.0
Mobile Web 5.0Mobile Web 5.0
Mobile Web 5.0
 
Store and Process Big Data with Hadoop and Cassandra
Store and Process Big Data with Hadoop and CassandraStore and Process Big Data with Hadoop and Cassandra
Store and Process Big Data with Hadoop and Cassandra
 
Automated Spark Deployment With Declarative Infrastructure
Automated Spark Deployment With Declarative InfrastructureAutomated Spark Deployment With Declarative Infrastructure
Automated Spark Deployment With Declarative Infrastructure
 
Scripting GeoServer
Scripting GeoServerScripting GeoServer
Scripting GeoServer
 
Streaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & ElasticsearchStreaming using Kafka Flink & Elasticsearch
Streaming using Kafka Flink & Elasticsearch
 
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
Internet and Web Technology (CLASS-10) [Node.js] | NIC/NIELIT Web Technology
 
Java Play Restful JPA
Java Play Restful JPAJava Play Restful JPA
Java Play Restful JPA
 
Bulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & CouchbaseBulding a reactive game engine with Spring 5 & Couchbase
Bulding a reactive game engine with Spring 5 & Couchbase
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
 
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinGet the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
 

Recently uploaded

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?XfilesPro
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareinfo611746
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
 

Recently uploaded (20)

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 

Java data structures powered by Redis. Introduction to Redisson @ Redis Lightning Talks, May 9

  • 1. Java data structures powered by Redis. Introduction to Redisson Nikita Koksharov Founder of
  • 2. WHY REDISSON? WHY DO WE NEED ANOTHER REDIS CLIENT?
  • 4. DISTRIBUTED COLLECTIONS ▸ Map * ▸ MultiMap * ▸ LocalCachedMap ▸ Set * ▸ SortedSet ▸ ScoredSortedSet ▸ LexSortedSet ▸ List * Supports individual element eviction ▸ Queue ▸ Deque ▸ BlockingQueue ▸ BlockingDeque ▸ BoundedBlockingQueue ▸ BlockingFairQueue ▸ DelayedQueue
  • 5. MAP ConcurrentMap<Integer, MyObject> map = new ConcurrentHashMap<>(); map.put(20, new MyObject("oldobj")); map.putIfAbsent(20, new MyObject("newobj")); map.containsKey(1);
  • 6. REDISSON MAP ConcurrentMap<Integer, MyObject> map = redisson.getMap("someMap"); map.put(20, new MyObject("oldobj")); map.putIfAbsent(20, new MyObject("newobj")); map.containsKey(1);
  • 7. REDISSON MAP EVICTION RMapCache<Integer, String> map = redisson.getMapCache("someMap"); map.put(20, "oldobj", 20, TimeUnit.MINUTES); map.containsKey(4); map.putIfAbsent(2, "oldobj", 5, TimeUnit.SECONDS);
  • 8. REDISSON SET Set<String> set = redisson.getSet("someSet"); set.add("value"); set.contains("value"); set.remove("value");
  • 9. REDISSON BLOCKINGQUEUE BlockingQueue<MyObj> queue = redisson.getSet("someSet"); set.add(new MyObj("value")); MyObj obj = queue.peek(); MyObj obj = queue.poll(10, TimeUnit.MINUTES);
  • 10. DISTRIBUTED LOCKS AND SYNCHRONIZERS ▸ Lock ▸ FairLock ▸ RedLock ▸ MultiLock ▸ ReadWriteLock ▸ Semaphore ▸ PermitExpirableSemaphore ▸ CountDownLatch ▸ Phaser (Planned)
  • 11. REDISSON LOCK RLock lock = redisson.getLock("lock"); lock.lock(); // or lock.lock(10, TimeUnit.MINUTES); //… lock.unlock();
  • 12. ▸ Bucket (Object Holder) ▸ BinaryStream (Input & Output Stream) ▸ Geo (Geospatial Object Holder) ▸ BitSet ▸ AtomicLong ▸ AtomicDouble ▸ Topic (Pub/Sub) ▸ BloomFilter ▸ HyperLogLog DISTRIBUTED OBJECTS
  • 13. REDISSON PUB/SUB RTopic<SomeMessage> topic = redisson.getTopic("someTopic"); topic.addListener(new MessageListener<SomeMessage>() { @Override public void onMessage(String channel, SomeMessage message) { System.out.println(message); } }); // in other thread or other JVM RTopic<SomeMessage> topic = redisson.getTopic(" someTopic"); topic.publish(new SomeMessage("new message"));
  • 14. INTERGRATION WITH FRAMEWORKS ▸ Spring Cache ▸ Hibernate Cache ▸ JCache API (JSR-107) implementation ▸ Tomcat Session Manager ▸ Spring Session
  • 15. CONNECTION MODES ▸ Replicated nodes * ▸ Cluster nodes * ▸ Sentinel nodes ▸ Master with Slave nodes ▸ Single node * Also supports AWS ElastiCache and Azure Redis Cache
  • 16. DATA SERIALIZATION ▸ Jackson JSON ▸ Avro ▸ Smile ▸ CBOR ▸ MsgPack ▸ Snappy ▸ Kryo ▸ FST ▸ LZ4 ▸ JDK Serialization
  • 17. HOW TO START // 1. Create config object Config = new Config(); config.useClusterServers() .addNodeAddress("myserver.com:7000", "myserver.com:7001"); // 2. Create Redisson instance RedissonClient redisson = Redisson.create(config); // 3. Get object you need Map<String, String> map = redisson.getMap("myMap");
  • 18. ASYNCHRONOUS COMMAND EXECUTION RMapAsync<Integer, String> map = redisson.getMap("someMap"); Future<String> putIfFuture = map.putIfAbsentAsync(20, "object"); Future<String> getFuture = map.getAsync(20); getFuture.addListener(new FutureListener<Boolean>() { @Override public void operationComplete(Future<Boolean> future) throws Exception { //… } });
  • 19. REACTIVE COMMAND EXECUTION RedissonReactive redisson = Redisson.createReactive(config); RMapReactive<Integer, String> map = redisson.getMap("someMap"); Publisher<String> putRes = map.put(20, "object"); Publisher<String> value = map.getAsync(20);
  • 20. LOW-LEVEL REDIS CLIENT RedisClient client = new RedisClient("localhost", 6379); RedisConnection conn = client.connect(); Future<RedisConnection> connFuture = client.connectAsync(); conn.sync(StringCodec.INSTANCE, RedisCommands.SET, "key", "value"); Future<String> res = conn.async(StringCodec.INSTANCE, RedisCommands.GET, "key");
  • 21. USED BY ▸ Electronic Arts ▸ Baidu ▸ Infor ▸ New Relic Synthetics ▸ Singtel ▸ Crimson Hexagon ▸ Brookhaven National Laboratory ▸ Netflix Dyno client ▸ 武林Q传 ▸ Monits ▸ Ocous ▸ Invaluable ▸ Clover ▸ Apache Karaf Decanter ▸ Atmosphere Framework ▸ BrandsEye ▸ Datorama ▸ BrightCloud ▸ Azar ▸ Snapfish …