how to implement pagination with multiple Redis ordered collection combinations
Requirements: Now put the different categories of data into different Redis ordered set key, the query does not distinguish between categories, to conduct a unified
installation and use of Redis 4.0 and Php-redis extensions on Ubuntu16.04
Install Redis
$ wget http://download.redis.io/release-4.0.1.tar.gz #从官网下载Redis 4.0.1
$ tar-zxvf redis-4.0.1.tar.gz #解压到当前目录
$ cd redis-4.0.1 #进入解压后的文件夹
$
Redis Subscribe and publish Messages
First, the publisher starts the Redis-server.exe servicePublishing End pub.py
#!/usr/bin/env python
#-*-coding:utf-8-*-
' Created on
2015-9-9
@author: Sxli
'
import Redis
Import sys
class Publishchannel (object)
To connect the Redis cache steps via the Jedis client:
1. Add Jar Package:
POM Coordinates:
redis.clients
jedis
2.7.0
The jar package is as follows: Commons-pool2-2.3.jar Jedis-2.7.0.jar2. Single Instance connection
To connect the Redis service
Package Com.alex.xiyoubang;
Import Java.util.Set;
Import Redis.clients.jedis.Jedis;
public class Jedisset {static Jedis Jedis = new Jedis ("192.168.1.171", 6379);
public static void Main (string[] args) {System.out.println ("==set==")
Official Information https://redis.io/topics/cluster-tutorial,
First download redis,http://download.redis.io/releases/redis-4.0.6.tar.gz
Tar zxvf redis-4.0.6.tar.gz
CD redis-4.0.6
Make
Make error GCC diagnostic not allowed inside functions, check
One:/usr/bin/env:ruby:no such file or directory
Yum-y Install ruby Ruby-rdoc
Two:./redis-trib.rb:24:in ' require ': No such file to load--rubygems (Loaderror)
http://rubygems.org/pages/download/
Unzip Rubygems-2.4.2.zip
CD rubygems-2.4.2
View the status of a Redis native
Redis-cli-h 192.168.12.12-p 6379-a a603fd9c-f96a-43d9-8913-c49947ee14fe info Replication start Redis service
Sudo/usr/bin/redis-server/etc/redis/redis.conf starting the Redis service as a Redis identity
Sudo-u
One: Problem Description:Using supervisor to manage the celery process, the broker uses Redis, and the Gevent pool runs Task,celery uses a version of 4.0.2, randomly appearing missed hearbeat worker, running normally after restarting the
Installation:1. Get Redis Resourceswget http://download.redis.io/releases/redis-4.0.8.tar.gz2. UnzipTar xzvf redis-4.0.8.tar.gz3. InstallationCD redis-4.0.8MakeCD srcMake install Prefix=/usr/local/redis4. Move the configuration file to the
Method Introduction1.sadd ()Description: Adds a value to a key. If this value is already in this key, it returns false. Parameter: Key value return value: Successful return true, failed false2.delete ()Description: Delete the specified key parameter:
Jeesz is a distributed framework that provides modular, service-based, hot-swappable ideas for project-based Java EE Rapid development platforms with high package security.Jeesz itself integrates Dubbo service control, zookeeper Registration Center,
Store data in the list advanced (left-forward)Lpush names A B C D EStore Data LIFO (right-forward) in the listRpush names G P H KTo view the data in the list:Lrange names 0 (starting from 0)-1Slice:Lrange names start end (start end stands for
Unordered Collection SaddThe set set is directly de-Xiao and only outputs the heheSadd names3 Xiao Xiao hehe heheGets all the values of the collection Names3, and the collection cannot get the value as a slice because it is
Store data in the list advanced (left-forward)Lpush names A B C D EStore Data LIFO (right-forward) in the listRpush names G P H KTo view the data in the list:Lrange names 0 (starting from 0)-1Slice:Lrange names start end (start end stands for
Download Link:Https://github.com/MicrosoftArchive/redis/releases--window under installation packagehttps://redisdesktop.com/--window Visualization SoftwareAttention:Protected-mode was added after version 3.2If you need to set up a remote link, you
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service