ways to implement transactionsmulti (Open transaction) +exec (commit) +discard (Discard transaction) +watch (CAS optimistic lock) Lua script
the characteristics of Redis affairsAll methods in a transaction are executed serially, the execution is not
Structure Type
values stored by the structure
the ability to read and write structures
String
can make strings, integers, floating-point numbers
Performs an operation on an entire string or part of a string, and
Brief introduction
MongoDB is more like MySQL, Support for field indexing, cursor operations, the advantage is that the query function is more powerful, good at querying JSON data, can store large amounts of data, but does not support transactions.
First, download the latest version of the Redis cd/usr/local/src wget-c https://redis.googlecode.com/files/redis-2.6.14.tar.gz
Second, compile and install Redis TAR-ZXVF redis-2.6.14.tar.gz cd redis-2.6.14 make sudo do install you need to install
/********************************* general *********************************/ // Whether to run as a daemon daemonize yes // such as a later process, you need to specify a PID, the default is/var/run/ redis.pid
Redis is a NoSQL database based on key-value pairs (key-value), which contains a variety of data structures. The number given on official web is read and write performance can reach 100,000/sec, visible speed.
As a simple example, open 5 Redis
This blog post mainly describes how to implement cache development using SPRINGAOP + Redis + annotations. First, term description 1, Springaop AOP (Aspect oriented programming), the technology of aspect-oriented programming. AOP is a useful
1 The meaning of Rdb
Redis provides RDB persistence, which keeps the Redis database state in memory on disk to avoid accidental loss of data. RDB persistence can be performed either manually or periodically based on server configuration options,
Edis is the official preferred Java client development package for Redis. In this article we will describe how to use the Sorted set sort collection (Zsets).
Sorted set is the same as a collection, it does not have duplicate values, the biggest
first, there are two ways of Redis persistence:
1.RDB: Snapshots of In-memory database state
2.AOF: Write every write command to the file, similar to the MySQL binlog log
RDB: Save the Redis in-memory database state to disk, RDB file is a
A
We are now on a server, through 6 ports to simulate the Redis cluster deployment, to build the model is: three primary database 7001,7002,7003, each has one from the database 7004,7005,7006.
First create the directory/usr/local/redis-cluster, and
Redis capacity and usage planningIn the use of Redis process, we found that a lot of redis different from the memcached, but also different from the characteristics of MySQL.
(This article mainly discusses Redis is not enabled for VM support) 1.
Java Redis Storage Objects
Import redis.clients.RedisClinet; Import Redis.clients.SerializeUtil; Import Redis.clients.jedis.Jedis;
public class Test {
/** * Jiachengwin * @param args * public static void main
The first figure, the use of the Redistemplate interface to call the data to find the result is empty, this is strange, the data written in the visual software to find out is this:
Classpathxmlapplicationcontext classpathxmlapplicationcontext = new
Https://github.com/xetorthio/jedis explains how to add Jedis dependencies to spring boot.
Add the following code under Pom.xml
redis.clients
jedis
2.8.0
jar
compile
Adding in the main function
Jedis Jedis = new
Redis Data Bulk Import Export
One way to do this is to export and import Redis data from one server to a new server in a work-redis-dump tool, but he needs to install a ruby environment, and there may be unexpected errors in the installation
What is a redis, what are the pros and cons, and what are the application scenarios
Redis is a high-performance NoSQL database based on memory, which can be used as a database, caching system and message middleware by storing data in the form of Key-
Redis is a NoSQL database. This series of blogs is mainly for the installation of the server environment problems encountered. Using NoSQL databases can improve the efficiency of data access. Because I used redis in my project, and now I need to
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