Using Redis 2019 01 08 KISTI Yeonghun Chae
- Slides: 31
Using Redis 2019 -01 -08, KISTI, Yeonghun Chae
Redis
In-memory Database Software
Redis 활용
Redis 명령어 ▪ Redis 접속 및 Get / Set > redis-cli -h 127. 0. 0. 1 > get testkey > set testkey testvalue > set testint 1 > INCR testint > INCRBY testint 10 > mget testkey testint
Redis 명령어 ▪ List & Hash > rpush testlist test 1 test 2 test 3 > lrange testlist 0 -1 > rpop testlist > hmset testhash name user 1 birth 2000 > hget testhash name > hgetall testhash
Redis 명령어 ▪ Set & Sorted Set > sadd testset v 1 v 2 v 3 > smembers testset > zadd testsortedset 1 v 3 > zadd testsortedset 3 v 1 > zadd testsortedset 2 v 2 > zrange testsortedset 0 -1
Redis 명령어 ▪ 데이터 삭제 > keys * > del testlist > flushall
Redis 명령어 ▪ Pub-Sub > subscribe ch 1 ch 2 > publish ch 1 hello, world!
Redis 응용 - Session
app. js > npm install express -session connect-redis ioredis > node app. js
Example Redis Node. js/Socket. io Web. Server
const Redis = require("ioredis") let redis = new Redis({ host: "127. 0. 0. 1", port: 6379 }) redis. subscribe("channel") redis. on("message", (channel, message)=> { console. log(message) }) const Redis = require("ioredis") let redis = new Redis({ host: "127. 0. 0. 1", port: 6379 }) redis. publish("channel", "Hello, World!") ioredis > npm install ioredis
Redis 응용 - Message Brocker
const mosca = require("mosca") let ascoltatore = { type: "redis", redis: require("redis"), db: 12, port: 6379, return_buffers: true, host: "127. 0. 0. 1" } let mosca. Settings = { port: 1883, backend: ascoltatore, persistence: { factory: mosca. persistence. Redis } } let server = new mosca. Server(mosca. Settings) server. on("ready", ()=> console. log("Server Running")) server. on("client. Connected", (client)=> console. log(client. id)) server. on("publish", (packet, client)=> console. log(client. topic, client. payload) ) Mosca > npm install mosca --save > https: //github. com/mcollina/ mosca
THANK YOU proin@kisti. re. kr
- Chae certification
- Cranes by hwang sunwon summary
- Young kwang chae md
- Freemartinizm
- Porensefalik
- Blake poş kisti
- Kisti supercomputing center
- Blake pouch kisti nedir
- Epididim kisti antibiyotik
- Histogenez nedir
- What was redis hypothesis
- Choco install redis
- Mq redis
- Flash redis
- Redis
- Codis proxy
- Redis remote dictionary server
- System collections generic
- Defrost using internal heat is accomplished using
- Cic annual report 2019
- Conclusion in sba
- Lcow windows server 2019
- Article 10 the teacher and business
- Nmls resource center
- Act score range
- Pergub 409 tahun 2016
- Astro quiz 2018 questions and answers
- Gradual dose reduction guidelines cms 2019
- Cobit 2019 design and implementation exam questions
- Sql server 2019 bdc deployment
- Fasfaa conference
- Cisco connect 2019