20
Pat Patterson Community Champion @metadaddy [email protected]

RedisConf17 - Cache All the Things! Data Integration via Jedis

Embed Size (px)

Citation preview

Page 1: RedisConf17 - Cache All the Things! Data Integration via Jedis

Pat PattersonCommunity Champion

@[email protected]

Page 2: RedisConf17 - Cache All the Things! Data Integration via Jedis

Enterprise Data DNA

Commercial Customers Across Verticals

200,000 downloads50 of the Fortune 100Doubling each quarter

Strong Partner Ecosystem Open Source Success

Mission: empower enterprises to harness their data in motion.

Page 3: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 4: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 5: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 6: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 7: RedisConf17 - Cache All the Things! Data Integration via Jedis

●●

Page 8: RedisConf17 - Cache All the Things! Data Integration via Jedis

●●●●

Page 9: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 10: RedisConf17 - Cache All the Things! Data Integration via Jedis

https://github.com/xetorthio/jedis

Page 11: RedisConf17 - Cache All the Things! Data Integration via Jedis

import redis.clients.jedis.Jedis;

Jedis jedis = new Jedis();

jedis.set("foo", "bar");

String s = jedis.get("foo");

Page 12: RedisConf17 - Cache All the Things! Data Integration via Jedis

jedis.hset("pat", "employer", "StreamSets");

jedis.hset("pat", "position", "Community Champion");

String employer = jedis.hget("pat", "employer");

Map<String, String> fields = jedis.hgetAll("pat");

String position = fields.get("position");

Page 13: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 14: RedisConf17 - Cache All the Things! Data Integration via Jedis

Pipeline p = jedis.pipelined();

p.hset("pat", "employer", "StreamSets");

p.hset("pat", "position", "Community Champion");

...lots more operations…

p.sync();

Page 15: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 16: RedisConf17 - Cache All the Things! Data Integration via Jedis

JedisPool pool = new JedisPool(new JedisPoolConfig(), "localhost");

...

try (Jedis jedis = pool.getResource()) {

jedis.set("foo", "bar");

}

...

pool.destroy();

Page 17: RedisConf17 - Cache All the Things! Data Integration via Jedis

Transaction t = jedis.multi();

t.hset("pat", "employer", "StreamSets");

t.hset("pat", "position", "Community Champion");

...lots more operations…

t.exec();

Page 18: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 19: RedisConf17 - Cache All the Things! Data Integration via Jedis
Page 20: RedisConf17 - Cache All the Things! Data Integration via Jedis

Pat PattersonCommunity Champion

@[email protected]