In-‐Memory NoSQL
Miko Matsumura, VP of Marke9ng and Developer Rela9ons, Hazelcast
Why NoSQL-‐Venkat Said It Best!
• Impedance Mismatch or “impotence” mismatch?
• Using OODB
• CAP Theorem and eventual consistency
Company Snapshot
• Founded in 2008 • Open source business model • Headquarters in Palo Alto, CA • R&D in Istanbul, Turkey • $2.5M Series A funding led by Bain Capital (June 2013)
• Key investors/advisors include Rod Johnson, founder of Spring Source, and Ali Kutay, CEO of WebLogic and Golden Gate So\ware
Open source, Apache v2 License
2MB Jar with no Dependency
In-Memory
Embeddable
Dynamic Clustering, Backup and Failover
Partitioned
Highly Available
Scalable
Hazelcast is
In-Memory Data Grid
Distributed (Elastic) Cache
NoSQL Key-Value Store
Clustering, Scalability, Partitioning, Big Data
Cloud Computing
Keywords
Who Uses Hazelcast?
Projects that use Hazelcast
GETTING RID OF IMPEDENCE
All you need is Map
James Gosling Creator of Java
Map
import java.util.Map; !import java.util.HashMap;!!Map map = new HashMap();!map.put(“1”, “value”); !map.get(“1”);!
Thread Safe Map
import java.util.Map; !import java.util.concurrent.*;!!Map map = new ConcurrentHashMap();!map.put(“1”, “value”); !map.get(“1”);!
Distributed Map
import java.util.Map; !import com.hazelcast.core.Hazelcast;!!HazelcastInstance h;!h = Hazelcast.newHazelcastInstance();!Map map = h.getMap(“mymap”);!map.put(“1”, “value”); !map.get(“1”);!
Map
Queue
Set
List
MultiMap
AtomicNumber
CountdownLatch
Lock
Semaphore
Topic
IdGeneretor
Hazelcast Data Structures
Database
Application
Hazelcast
We scale the applica9on 9er
Big Data Sharing/Caching
Session Replication
Hibernate 2nd Level Cache
Producer - Consumer
Spring Cache
Parallel Processing
Pub/Sub Messaging
Use Cases
All you need is JCache
Greg Luck Creator of Ehcache
Co Spec Lead Jsr107 JCache
Hazelcast leads standardiza9on • Hazelcast CTO Greg Luck is the newest addi_on to the
management team
• Greg Co-‐led the standardiza9on effort with Oracle which makes Hazelcast one of the standard-‐bearers
• Greg has credibility in this market having founded Ehcache, the world’s most popular Java cache
• Jcache will be released Mon March 17th by JCP and widely implemented by IMDG vendors and embedded in Java EE 8 and Spring
• The caching standard will expand IMDG market and adop9on of Hazelcast
19
JCache is the standard way for Java to talk to caches
From Local Cache to
Distributed Cache
From Local to Distributed Caching
Req Local Caching
Req
V =
read(K)
Local Caching
Req
K: V
Local Caching
Req
K: V
Local Caching
V =
read(K)
Req
Local Caching
K: V
K: V
Req
K: V
Local Caching
Local Caching
K: V K: V
Req Local Caching
K: V K: V
Req
V =
read(K)
Local Caching
K: V K: V
Req Local Caching
K: V K: V K: V
Req
Adding a new Node increases load on Backend!
Local Caching
K: V K: V K: V
Req
Hazelcast Cluster 2X capacity
Distributed Caching
Req
V =
read(K)
Hazelcast Cluster 2X capacity
Distributed Caching
Use Case - Distributed Caching
Req
K: V Hazelcast Cluster 2X capacity
K: V
Req
Hazelcast Cluster 2X capacity
Distributed Caching
K: V
Req
Hazelcast Cluster 3X capacity
Distributed Caching
Features
• Java Concurrency API – Lock, Semaphore, CountdownLatch, ExecutorService
• Java Collec_on API: – Map, Queue, Set, List
• Mul_Map • Topics (PubSub) • EntryProcessor • Predicate API (Secondary Indexes) • SQL Query • Off-‐Heap Support * • Na_ve Client: C#*, C++*, Java, REST, Memcache • Dynamic Discovery, Redundancy and Recovery
Features…
• WAN Replica_on • Backup Groups • Indexing Key, values and value proper_es • Distributed SQL-‐like Query and Predicate API • Write Behind / Write Through Persistence • 2PC Transac_ons (v3) • EntryListeners • EntryProcessors (v3) • Automa_c Evic_on • Data Affinity • HTTP Session Clustering • Spring & Hibernate 2nd Level Cache • Control Par__oning (v 3) • EC2 Auto Discovery
Features…
• SPI (v3) • Con_nuous Query (v3) • Custom Pluggable Serializa_on • Portable Serializa_on (v3) • Par_al Deserializa_on (v3) • Binary and/or Object Storage (v3) • Dynamic Indexing (v3) • 2PC Transac_ons (v3) • Server Side Before and A\er Interceptors (v3) • JAAS Authen_ca_on and Authoriza_on (v3) * • Socket Encryp_on
Management Center *
Roadmap 2014
Scale Up • Second Genera_on off-‐heap
– 200GB+ versus 20GB in 3.1 – Exposed via API – In addi_on to map:
• Queue • Set
Roadmap 2014
Opera_onal Store • Persistence
– Faster restart and data load – Opera_onal storage rather than DB
Roadmap 2014
Distributed Compute • Map/Reduce • Scheduled Executor Service
Roadmap 2014
Cache • JCache
– New standard December 2013 – Being implemented by most vendors (Hazelcast, Coherence, Infinispan, Gemfire, Terracona)
– February 2014 – javax.cache – To be included in Java EE 8, Spring
Hazelcast V3