7

基础知识_中间件相关

 3 years ago
source link: http://taowusheng.cn/2020/08/01/20200801%20%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86_%E4%B8%AD%E9%97%B4%E4%BB%B6%E7%9B%B8%E5%85%B3/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Nginx

Redis

Protobuf

int32编码原理

  • 一个字节8位,该编码使用后7位用来储存数据,第一位用来表示当前字节的下一个字节是不是当前数字的一部分。
  • 300的二进制是‭00000000100101100‬,按7位分割后0000010 0101100,转换网络序后(网络序是大端序吗?)0101100 0000010,然后添加第一位的0或1后,10101100 00000010.

sint32编码原理

  • 在int32中,负数总是被翻译为一个巨大的正整数,需要10个字节表示,改用sint32更节省空间,其对负数采用zigzag编码。
    0   0
    -1 1
    1 2
    -2 3
    2 4
    2147483647 4294967294
    2147483648 4294967295

Kafka

ZeroMQ

LevelDB


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK