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

Service governance - Resilience4j (current limiting)

Bulkhead Bulkhead is generally used for service calling clients to limit the number of concurrent requests for a specific service. It has the following functions:1. Prevent downstream dependency from being impacted by concurrent requests2. Prevention of continuous failure 1. Configure rule "order" //Maximum number of concurrent allow ...

Posted by canishk on Wed, 06 Nov 2019 22:39:07 +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

Integrating asp.net identity to realize token authentication in gRPC

Enable identity authentication in asp.net core 3.0 asp.net core 3.0 identity packages and core 2.2 that need to be imported have some changes: <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="3.0.0-preview5-19227-01" /> <PackageReference Include="Microsoft.AspNetCore.Identi ...

Posted by marcnyc on Sun, 03 Nov 2019 20:30:52 +0100

Go dependency management tool dep

https://segmentfault.com/a/1190000013561841 Go dependency management tool Go dependency management tool Environmental requirements Golang >= 1.9 Dep Current version: dep: version : devel build date : git hash : go version : go1.10 go compiler : gc platform : linux/amd64 Last release is v0.4.1 install go ...

Posted by Youko on Sun, 03 Nov 2019 07:53:25 +0100

Spring boot exception handling unified encapsulation

brief introduction I'll write the repetition function. In the spring boot project, there are global exception handling and return packaging. The return front end is to bring fields such as succ, code, msg and data. It's easy to solve in the case of a single project. When there are many micro service modules, in many cases, the development is to ...

Posted by neomhm on Sat, 02 Nov 2019 16:58:13 +0100

Decorator mode of design mode

Decorator mode There are two main roles in decorator mode: Decorator (jacket, hat) Decorated object (Lao Wang) The decorator and the object to be decorated have two characteristics, which are also the key to the decorator mode: They implement the same interface Decorated objects are used in the decorator Use: /** * <p> *Define an in ...

Posted by pcjackson06 on Fri, 01 Nov 2019 20:48:42 +0100

Realize your own Protobuf Any

Preface In some cases, google.protobuf.Any is not so convenient. I hope it has more convenient design. From the source code of protobuf, we can easily know that google.protobuf.Any is also a proto class, which can be completely replaced by its own defined proto class. Any of Protobuf: google.Protobuf.any google.protobuf.Any is also defined by t ...

Posted by Sikk Industries on Fri, 01 Nov 2019 07:03:05 +0100

Spring Boot 2.X: Mail Service

Preface E-mail service is very common in the development, such as using e-mail to register an account, using e-mail as a way to retrieve password, using for subscription content regular e-mail push and so on. The following is a brief introduction of e-mail implementation. Get ready A mailbox for sending. This article uses Tencent's domain name ...

Posted by dcro2 on Thu, 31 Oct 2019 07:13:59 +0100

Redux source code series - Redux thunk source code analysis

#Understand what middleware is https://github.com/zp1112/blog/issues/11 thunk Middleware Let's see how middleware works. index.js import {Provider} from 'react-redux' import storeData from './reducerfile/index.js' import {createStore, applyMiddleware} from 'redux' import thunk from 'redux-thunk' co ...

Posted by Hillu on Wed, 30 Oct 2019 20:01:23 +0100