Java using Redis
installation
Before we start using Redis in Java, we need to make sure that the Redis service and the Java Redis Drive are installed and that Java is available on your machine. Java installation configuration can refer to the Java
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
I use the redis3.0 version. The 3.0 version mainly increased the Redis cluster function.
Prerequisites for Installation: Install Gcc:yum install gcc-c++
1, download the Redis source package.
2, the source package uploaded to the Linux server
3,
Nginx+tomcat+redis Configure session sharing and load balancing
Using Nginx as a front-end server, the required session is deposited into the Redis, and the session can be taken from the Redis when one of Tomcat hangs.
There are two options
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
Redis is a high-performance key-value database. The emergence of Redis, to a large extent, compensates for the shortage of such keyvalue storage in memcached, and in some cases can complement the relational database well. It provides a
I. Understanding of Redis
1, NoSQL overviewBefore you know Redis, you should know the NoSQL.
(1) Nosql=not only SQL (read "N" "O" SQL instead of "no" SQL), is a relational database.
(2) Why need to use NoSQL. Gao Performance: High concurrent read
Redis installation under Windows
Redis official does not provide Windows version, but the Microsoft Open source organization develops and maintains the Redis window version, therefore cannot download in Redis website to the Windows edition, may go
Redis as a database of non relational, unexpectedly also has the transaction operation with the RDBMS, let me feel quite surprised. In Redis, there are files that are involved in performing transactions. It also gives us a glimpse of how transaction
Basic Learning process Please check the Mason's bloghttp://www.bysocket.com/?cat=72
Examples of his various subsectionsHttps://github.com/JeffLi1993/springboot-learning-example
Sms-server
POM. XML, because the project is mainly used to send text
Article reproduced from: http://hot66hot.iteye.com/blog/2050676
Reprint Please indicate the source: http://hot66hot.iteye.com/admin/blogs/2050676
Recently studied Redis-cluster, just built an environment, encountered a lot of pits, the system's
Redis can be used not only as a caching server, but also as a message queue. Its list type is inherently supported as a message queue. As shown in the following illustration:
Because the list of Redis is implemented using a two-way link, the root
Hredis provides asynchronous interfaces, and can be used in conjunction with Libevent, Libev and other message frameworks;
Sample code (combined with libevent use, libevent Reference):
Test_asyn.c
#include #include #include #include # include
One: Pom file:
redis.clients
jedis
2.9.0
Two: Configuration file: Spring-jedis.xml
The value and idle connection > maximum number of idle connections Value= "10000"/> ;p Roperty Name=
Antirez, the author of Redis, released the first RC version of Redis 4.0 in a blog post three days ago through the blogger candidate of Redis 4.0 was out, which he said in a blog post, because the new version of the There have been a number of
installation under CentOS
Reference-Download Compressed package wget http://download.redis.io/releases/redis-3.2.6.tar.gz Installation
CD redis-3.2.6 make
&& make install
Start
Src/redis-server
redis-server/etc/redis.conf #启动时指定配置文件
CP
Upload files to the server, install Lrzsz, and upload the local files to the Linux system.If it is CentOS, it can be installed with Yum install Lrzsz command, more convenient. Or: yum-y install LRZSZ command installation, more more convenient.
2, Springcloud+mybatis+redisRedis is a NoSQL database that stores data in the form of a key value , which is compared to a database such as MySQL, which is equivalent to the difference between read and write memory and hard disk reading, so it is
Brief introductionRedis is a cache database, but it is useful not only for databases, but for use as message queues and caches.As with RABBITMQ, it is also based on socket communication, so be aware that the format of the data is byte.BasicUsing
SOURCE structureJeesz-Driven Project constructionBuilt-in efficient and reliable code generatorSupport a variety of data models, based on database tables to generate regular repetitive code, so that research and development engineers focus on the
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.