Tag:queue

  • Redis learning notes – (5) – list (stack / queue / blocking queue)

    Time:2022-5-6

    Previous: redis learning notes – (4) – set List related commands: lpush/rpush/lpop/rpop/brpop/blpop 5.1 stack = lpush + lpop (in and out of the same end) lpush+lpop 127.0.0.1:6379> lpush juc synchronized volatile aqs thread (integer) 4 127.0.0.1:6379 > lpop JUC # last in, first out “thread” 127.0.0.1:6379 > lpop JUC # penultimate “aqs” 127.0.0.1:6379 > lpop […]

  • Android 9.0 native looper mechanism (principle)

    Time:2022-5-4

    *Standing on the shoulders of giants can see further*   Android 9.0 native looper mechanism (principle) Android 9.0 native looper mechanism (application)   preface When analyzing the native layer code of Android framework, looper, an important auxiliary class in Android system, is used in many places to communicate between threads or design processing logic. This […]

  • Laravel event broadcast driven by redis

    Time:2022-5-1

    1、 Foreword In the previous project, laravel’s event broadcast was needed, and the project planned to use redis as the driver, but it was found that most of the online materials were driven by pusher, so I had to grope for a service. Now record this process, hoping to help others. 2、 Project environment Redis […]

  • [TCP] start with an online problem and explain the TCP semi connection queue and full connection queue in detail

    Time:2022-4-30

    Starting from an online problem, explain the TCP semi connection queue and full connection queue in detail https://network.51cto.com/article/687595.html https://www.cnblogs.com/sidesky/p/6844228.html https://developer.aliyun.com/article/79972 About parameters such as listenoverflows of netstat https://blog.csdn.net/weixin_34256074/article/details/89079053 About the time-consuming things of TCP connection https://zhuanlan.zhihu.com/p/266540301 What happens when the TCP semi connection queue and full connection queue are full, and how to deal with […]

  • Linux at command details

    Time:2022-4-27

    Hello, I’m Liang Xu. In life, we have too many scenes that need to use the alarm clock, such as getting up at 7 a.m., having a meeting at 4 p.m., shopping at 8 p.m., and so on. In Linux system, we also have similar requirements. For example, we want to upload files to the […]

  • Plumelog distributed log component instruction manual

    Time:2022-4-26

    System introduction The intrusion free distributed log system collects logs based on log4j, log4j2 and logback, and sets the link ID to facilitate the query of associated logs. Based on elasticsearch as the query engine. High throughput and high query efficiency. The whole process does not occupy the local disk space of the application and […]

  • 1.5 implement a priority queue

    Time:2022-4-22

    Problem description How to implement a prioritized queue? And each pop operation always returns the element with the highest priority? Solution Use belowheapqThe module implements a simple priority queue class: import heapq class PriorityQueue: “”” Simple priority queue class “”” def __init__(self): self._queue = [] self._index = 0 def push(self, item, priority: int): “”” Add […]

  • Android multitasking file breakpoint download and upload (high imitation vivo application market) can be used directly

    Time:2022-4-22

    The author is a face bully. He has interviewed 200 + times and worked as an examiner: he has met 300 + times, has been to the top 500 and has been to a start-up company. If you pay attention to me, you can reach the master level. I finally dare to say that the […]

  • Rabbitmq project development practical skills – very useful

    Time:2022-4-21

    Rabbitmq message queue usage test In the last blog post, it has been published in CentOS 7 Complete the construction of message queue server on 2. Here is a test to see if you can push and receive messages normally.Because in project development, using good unit testing skills can double your development efficiency and facilitate […]

  • Event loop I know, what the hell is a macro task or a micro task?

    Time:2022-4-20

    Before introducing macro tasks and micro tasks, throw a question. I believe you will encounter similar questions during the interview: setTimeout(function(){undefined console.log(‘1’) }); new Promise(function(resolve){undefined console.log(‘2’); resolve(); }).then(function(){undefined console.log(‘3’) }); console.log(‘4’); Please say the data printed on the console. After careful consideration, many small partners will confidently say the answers: 2, 4, 1, 3. But when […]

  • Dry goods sharing | deep analysis of cloud native message queue AMQP

    Time:2022-4-20

    Editor’s recommendation: The author of the article is China Mobile cloud capability center, and the reprint of the article has been authorized. This article will analyze the background and overall design of cloud native message queue AMQP based on Apache pulsar in detail. The following article is from the cloud native middleware team of Suyan […]

  • Six implementation schemes of delay queue

    Time:2022-4-19

    1、 Application of delay queue What is a delay queue? As the name suggests: first, it should have the characteristics of queue, and then add a function to delay the consumption of queue messages, that is, it can specify the time point at which the messages in the queue are consumed. Delay queue is still […]