Analysis of NIO selector principle

Non-blocking io uses a single thread or only a small number of multi-threads. Each connection shares a single thread. Thread resources can be released to handle other requests while waiting (without events). The main thread allocates resources to handle related events by notifying (waking up) the main thread through event-driven model when even ...

Posted by idevlin on Mon, 24 Jun 2019 23:05:43 +0200

SEandroid Security Mechanism - File Security Context

2 File Security Context SEAndroid is a MAC security mechanism based on security policy. This security strategy is implemented in the security context of the subject and the object. This means that before the implementation of the security policy, the primary and secondary objects in the SEAndroid security mechanism already have security conte ...

Posted by phpnew on Sun, 23 Jun 2019 21:30:45 +0200

Source Code Analysis of Bootstrap Initialization Process--Start of netty Client

Bootstrap initialization process netty's client boot class is Bootstrap. Let's take a look at the initialization process of Bootstrap in the client part of spark's rpc. TransportClientFactory.createClient(InetSocketAddress address) Simply post out the Bootstrap initialization code // Client boot object Bootstrap bootstrap = new Bootstrap(); // ...

Posted by gonsman on Sat, 22 Jun 2019 21:04:18 +0200

epoll for Linux programming

Now there's a scene like this: I'm a busy big boss. I have 100 mobile phones. When my mobile phone comes to information, my secretary will tell me, "Boss, your mobile phone is coming to information."I'm very angry. That's how my secretary does it. Every time a message comes from my mobile phone, only tell me it. The boss goes to see i ...

Posted by Yippee on Mon, 17 Jun 2019 18:47:40 +0200

Learning Linux-4.12 Kernel Network Protocol Stack (2) - System Initialization (sock_init)

When initializing, the first call is sock_init, which mainly completes: 1. Creation of sysctl file 2. skb cache initialization, which creates two nodes skbuff_head_cache and skbuff_fclone_cache in slab 3. Register and hang socket file system static int __init sock_init(void) { int err; /* * Initialize the network s ...

Posted by desmi on Sun, 16 Jun 2019 01:25:15 +0200

UDP for socket programming of network socket

Summary I wrote about TCP in my last blog. Now that I have learned TCP, I have to mention UDP. TCP and UDP are like two inseparable partners, always mentioned and compared with each other. As for the advantages and disadvantages of the two protocols, I will not describe them here. Next, we mainly learn how to write UDP server communication. I ...

Posted by paulieo10 on Sat, 15 Jun 2019 04:33:07 +0200

P2P Chat Based on Socket Communication

Introduction of Socket Communication Socket is an abstract layer between application layer and transport layer. It abstracts the complex operation of TCP/IP layer into several simple interface supply layer calls to realize process communication in the network. Socket is an implementation of "open-read/write-close" mode. Server and c ...

Posted by dvayne on Fri, 14 Jun 2019 20:04:51 +0200

Android 7.0 System Start

The Linux kernel is booted by Bootloader loading configuration first, and the Android system is booted only after the Linux kernal is booted. 1. Start the init process After the Linux kernel starts, the first android user process Init ( system core init init. cpp) will be opened. The key code is as follows: int main(int argc, char** ar ...

Posted by WhiteHawksan on Sat, 08 Jun 2019 23:46:47 +0200

SpringBoot-WebSocket Broadcast Message + Single Message (Message sent by specified user)

Preface The introduction of WebSocket in Springboot will not be repeated here. There are more introductions on the Internet. This paper mainly solves the problem of broadcasting messages (for a topic) and sending messages to specific users. No more nonsense, start our realization. Environmental Science Only the core technical points are l ...

Posted by 1bigbear on Fri, 07 Jun 2019 23:29:04 +0200

mysql Source Analysis mysql Authentication Phase Roaming

client initiates a connection request, shakes hands three times and exchanges validation information. How does mysql complete the validation work during this period? Process (three handshakes) How information is encrypted client: hash_stage1 = sha1(password) hash_stage2 = sha1(hash_stage1) reply = sha1(scramble, hash_stage2) ^ hash_stage1 ...

Posted by jerr0 on Sat, 01 Jun 2019 23:43:59 +0200