redis4.0.11 can be used to install the production environment

redis4.0.11 can be used to install the production environmentThe operating system version is CentOS 6.5 Execute the initialization.sh optimization script first. For details, see Initialization scriptWe use redis-4.0.11.tar.gz onlineOptimize according to the log content / / it will be processed later. We can execute it first here. For those wh ...

Posted by rofl on Fri, 22 Nov 2019 16:45:19 +0100

The implementation of go like waitGroup multi concurrent scheduling with toolefy based on Toole

Swoolefy is a lightweight and high-performance memory resident API and Web application service framework based on swoole. It highly encapsulates http, websocket, udp server, and extensible rpc service based on tcp. At the same time, it supports the installation and deployment of composer package. Based on practical application, swoolefy abstrac ...

Posted by BrandonRoy on Tue, 19 Nov 2019 15:48:58 +0100

Daily use: spring boot custom parameter resolver

SpringBoot custom parameter resolver We all know that SpringMvc's Controller method can receive various parameters, such as HttpServletRequest or HttpServletResponse, various annotations @ RequestParam, @ RequestHeader, @ RequestBody, @ PathVariable, @ ModelAttribute. Where are these parameters obtained? These parameters are parsed for us by di ...

Posted by seidel on Fri, 15 Nov 2019 07:11:18 +0100

Redis cache in AOP mode using AspectCore

This time, the goal is to implement caching by labeling Attribute s, streamline code, and reduce code intrusion into business code. Cached content is the summary content of Service queries, without other high-level functions, to improve the response speed of multiple queries in a short time, and to properly reduce the pressure on the database. ...

Posted by esukf on Thu, 14 Nov 2019 06:40:27 +0100

redis pipeline mass storage

pipeline is a way for redis to submit in batch, that is, to establish a connection for multiple command operations and send them to redis for execution. In terms of performance, it will be much better than a single circular submission. Performance comparison Circular single submission The code is as follows: public void testOne ...

Posted by contex on Sat, 09 Nov 2019 17:33:12 +0100

The implementation of swoole general process pool

Before Gorang40 lines of code to realize common process pool Today, I read the relevant documents of swoole and implemented one in PHP. Since swoole does not have the select of golang, the implementation is a little simple, but the practicability is OK, and the universality is realized through factory functions. swoole's official pool is for Re ...

Posted by cooldude832 on Thu, 07 Nov 2019 19:11:59 +0100

Microservice architecture case (04): middleware integration, public service encapsulation

Source code: GitHub point here || GitEE point here Update progress (6 sections in total): 01: brief introduction of project technology selection and schematic description of structure02: business architecture design, system hierarchical management03: database selection, business data design and planning04: middleware integration, public servic ...

Posted by nincha on Mon, 04 Nov 2019 22:50:33 +0100

redis paging implemented by redisTemplate in spring

Recently, we need to cache the data in mysql table into redis, and the list display also needs to use paging to query. At first, we thought that HASH structure can meet the needs, and then we can use ZSET and HASH structure to store data to realize redis paging. The steps are as follows: 1. First, use ZSET to store the id in table A in the form ...

Posted by jsladek on Sun, 03 Nov 2019 02:45:34 +0100

Don't let your microservice run naked anymore. Based on Spring Session & Spring Security microservice permission control

Microservice architecture Gateway: route the user's request to the specified service and forward the Session information contained in the front-end Cookie; User service: user login Authentication, user authorization, and Redis Session Management Other services: rely on user information in Redis for interface request verification Structure d ...

Posted by spudly on Tue, 29 Oct 2019 17:18:57 +0100

Spring boot uses annotation to integrate Redis

1. First import the jar package using Maven <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId&gt ...

Posted by ball420 on Sun, 27 Oct 2019 09:16:28 +0100