OkHttp3 source code details okhttp connection pool reuse mechanism
1. Overview
To improve network performance optimization, it is very important to reduce latency and improve response speed.
Usually, when we make a request in the browser, the header part is like this
Keep alive is to keep a long connection between the browser and the server, which can be reused. It is enabled by default in HTTP 1.1.
Why does ...
Posted by tempa on Mon, 18 Nov 2019 02:01:01 -0800
Swoole learning notes: getting started with Hprose
1. What is RPCRPC is a way of communication between processes, the full name is "remote call procedure".When a client sends a request to the server, it is not sent directly to the target server, but to the RPC Server, which schedules it.RPC provides remote calling methods that are no different from calling local methods.
2. Introduct ...
Posted by Eddie Fisher on Sun, 17 Nov 2019 13:45:17 -0800
Using PHP framework to realize WebSocket online chat communication system
To use Swoole in ThinkPHP, you need to install the think Swoole composer package, provided that the system has installed the Swoole PECL extension
To install think swoole, execute the composer command in the project root directory of tp5:
composer require topthink/think-swoole
If you don't say much, go straight to the code:
To create a WebSocke ...
Posted by stevenszabo on Fri, 15 Nov 2019 07:01:21 -0800
Try to learn many times, and finally understand NIO!
NIO—NonBlocking IO(new IO)
io flow oriented programming can only be used as one of the input or output flows. It is synchronous blocking. Every connection needs to create a thread to handle. The thread context switching overhead is very large, which creates a big bottleneck
So the pseudo blocking IO implemented by thread pool solves the proble ...
Posted by phast1 on Thu, 14 Nov 2019 22:25:57 -0800
Upgrade ideas of in place for MySQL 5.7.25
I. description
It is found that MySQL has a low-risk vulnerability. You can write your own scheme, test yourself, and upgrade yourself.
Version: upgrade MySQL 5.7.25 to the latest version of MySQL 5.7.28.
Architecture: master-slave architecture
II. Upgrading process
1. Download the latest database software MySQL 5.7.28
2. Upload to the spec ...
Posted by adityakonda on Thu, 14 Nov 2019 06:02:08 -0800
WebSocket online chat communication system can also be developed with PHP framework
To use Swoole in ThinkPHP, you need to install the think Swoole composer package, provided that the system has installed the Swoole PECL extension
To install think swoole, execute the composer command in the project root directory of tp5:
composer require topthink/think-swoole
If you don't say much, go straight to the code:
To create a WebSocke ...
Posted by Xzone5 on Wed, 13 Nov 2019 10:54:37 -0800
http.createServer process analysis of nodejs
github:https://github.com/theanarkh/read-nodejs-code
Here is the code for nodejs to create a server. Let's analyze the process together.
var http = require('http');
http.createServer(function (request, response) {
response.end('Hello World\n');
}).listen(9297);
First, let's go to the lib/http.js module to see the code of this function.
func ...
Posted by Morbius on Mon, 11 Nov 2019 23:11:45 -0800
Deep analysis of source code for building native network model with go netpol I / O multiplexing
introduction
Go builds a simple and high-performance native network model (I/O multiplexing netpoll based on go) based on I/O multiplexing and goroutine, which provides a simple network programming mode such as goroutine per connection. In this mode, developers use the synchronous mode to write asynchronous logic, which greatly reduces the ment ...
Posted by robertvideo on Sat, 09 Nov 2019 07:14:14 -0800
Network communication socket: network communication addressing, protocol cluster and socket type finding service information
11.2.1.2 find service information
In addition to the IP address, each socket address includes an integer port number. Many applications can run on the same host and listen to an IP address, but only one socket can use the port of that address at a time. By combining IP address, protocol and port number, a communication ...
Posted by mayanktalwar1988 on Fri, 08 Nov 2019 13:18:31 -0800
TCP upload case (basic) client file upload to server
Requirement Description: make a "file upload case"
Requirement: upload a picture in the project to the server through the client
Operation steps:
1. Create the server and wait for the client to connect
2. Create a client Socket and connect to the server
3. Get the output stream in the Socket stream. Function: ...
Posted by jackmn1 on Fri, 08 Nov 2019 12:28:48 -0800