• Socket.io namespaces and rooms


    Preface Looking up the official document of socket.io on the Internet, it seems that no latest Chinese document has been found. For example, this (socket.io Chinese document) is 2017. The example on the official website is almost the same as most of the entry-level examples on the Internet. It’s too simple to use a group […]

  • Kafka producers ensure reliable data transmission


    Kafka is one of many MQ (message queue). MQ generally faces the problem of message loss. There are many reasons for message loss, such as: The producer sends the message, but does not ensure that it reaches MQ MQ received a message, but the message was lost … The Kafka used in this experiment is […]

  • Detailed introduction to Kafka


    Kafka Kafka core concept What is Kafka Kafka is an open source stream processing platform developed by the Apache Software Foundation, which is written by Scala and Java. The goal of this project is to provide a unified, high throughput and low latency platform for real-time data processing. Its persistence layer is essentially a “large-scale […]

  • Kafka message too long details


    The size of messages sent by Kafka ⚠ the Kafka version of this experiment is 2.11 Message overview The message in Kafka refers to a producer record. In addition to carrying the data sent, it also includes: Topic sent to Partition to Headers header information Key data Value data Timestamp long timestamp Producer production message […]

  • Simple encapsulation of stompjs application


    A simple application of stompjs Online demo Online demo: click heregithub: https://github.com/chuxiaoguo/wrapper-stompjs introduce sockjs-client Sockjs client is a communication module separated from sockjs for client use. So let’s take a look at sockjs.sockjs is a JavaScript Library of browser, which provides a network like object. Sockjs provides a coherent, cross browser JavaScript API, which creates […]

  • Getting started with rocketmq


    1: What is MQ MQ is message middleware.   2: Why MQ Scene: e-commerce double 11:00 seconds. At that moment, requests from users will surge, and if nothing is done, the service is likely to be overwhelmed. But we can’t directly discard these requests. In order to expand the capacity of the machine in such […]

  • I wrote a very low code


    I don’t know what the problem is. Do you have a great God to teach me? It’s paid var socket = null, Online_users = [], // list of online tourists Current UUID = ‘; // the current tourist. Here is the information to be processed. If it is not the current tourist’s window var client […]

  • The implementation of group chat function with websocket


    What is websocket WebSocketIt is a new way of communication between web client and server, which is still based on HTTP protocol. With websocket connections, web applications can perform real-time interaction, rather than the previous poll mode. WebSocketHTML5 started to provide a full duplex communication protocol on a single TCP connection, which can be used […]

  • Kafka compression details (first draft)


    Kafka compression Generalization If you need to understand Kafka compression, you need to understand Kafka’s storage format Kafka storage format RecordBatch baseOffset: int64 batchLength: int32 partitionLeaderEpoch: int32 magic: int8 (current magic value is 2) crc: int32 attributes: int16 bit 0~2: 0: no compression 1: gzip 2: snappy 3: lz4 4: zstd bit 3: timestampType bit […]

  • Big data series Kafka learning notes


    1. Big data field data type 1.1 bounded data ​ General batch processing (a file or a batch of files), no matter how large, can be measured ​ mapreduce hive sparkcore sparksql 1.2 unbounded data ​ A stream of flowing data ​ Storm SparkStreaming 2. Message queue Message Data transmitted between two computers or two […]

  • Compared with 5 mainstream distributed MQ message queues in multiple dimensions, mom is no longer worried about my technology selection


    1, introduction For instant messaging system (including IM, message push system, etc.), MQ message middleware is a very common basic software. However, there are many kinds of MQ message middleware products with different strengths in the market, how to choose? This is a problem! For many inexperienced developers, the total number of users of an […]

  • Source code analysis of Android system: Exploration of handler extended knowledge (I)


    Blog Homepage After analyzing the handler source code, there are many unknown secrets. Next, analyze it. Classes involved:Handlerthread, intentservice, asynctask, Messenger, idlehandler, looper.observer, messagelogging, etc The first half: handlerthread, intentservice, asynctaskIn the second half of the lecture: Messenger, idlehandler, looper.observer, messagelogging 1. HandlerThread Background: in Android system, message mechanism is used to deliver messages between […]