New in Go 1.18: Multi-Module workspace mode

Go’s dependency management, or Go Module, has been around for some years now, and has been the subject of much criticism and refinement. Go 1.18 will introduce a new feature, Multi-Module Workspaces, to support multiple workspaces for modules, which will solve a number of problems. Background When working with Go projects on a daily basis, there are 2 classic problems that are particularly tedious. They are as follows. relying on

Igor Sysoev, father of NGINX, departs from F5

NGINX announced the departure of founder Igor Sysoev from NGINX and F5. and writes: “Igor Sysoev has chosen to leave F5 in order to spend more time with his family and friends, as well as personal projects. Thank you for everything you have done to make the world’s websites better.” According to the NGINX blog, Igor Sysoev started developing NGINX in the spring of 2002. Igor Sysoev observed the rapid growth of the Internet and found that the way Apache HTTP Server handled connections did not scale to meet the growing needs of the Internet.

Shortcomings of the Jetpack-LiveData component and strategies for dealing with them

Preface In order to solve the problem of confusing architecture design that has existed since Android-App development, Google has launched the Jetpack-MVVM series of solutions. As the core of the whole solution - LiveData, with its lifecycle security, memory security and other advantages, and even gradually replace EventBus, RxJava as the trend of Android side state distribution components. The mall app team has encountered some difficulties in the process of

Kubernetes HPA Controlled Elastic Scaling based on Prometheus Custom Metrics

There are three main types of elastic scaling in Kubernetes: HPA, VPA, and CA. Here we will focus on Pod Horizontal Scaling HPA. With the release of Kubernetes v1.23, the HPA API came to a stable version autoscaling/v2: Scaling based on custom metrics Scaling based on multiple metrics Configurable scaling behaviour From the initial v1 version of HPA, which only supported CPU and memory utilisation scaling, to the later support for custom metrics and aggregation layer APIs, to v1.

App Deep Linking and Delayed Deep Linking

APP Wakeup and Scene Restoration In App launch promotion, waking up users is a common operation strategy. To get users active again and convert their behavior, the path of users must be restored from the scene to find the mystery of user growth from the root. In this era of advertising, I believe most users have encountered a similar scenario when using an app: when using an information app, they

Java to introduce new object types to solve memory utilization problems

What new features and improvements are coming to Java in 2022 is something I’m sure many Java developers would like to know. Combine that with some recent sharing from Java language architect Brian Goetz (Brian Goetz). Here are some blurbs. Valhalla Brian Goetz published a piece late last year called State of Valhalla, which Very informative, it mentions that back in 2014 the Java project team started a project called Valhalla, which will bring more flexible, flat data types to the JVM platform.

string and []byte conversion problem in golang

Let’s look at the problematic code, similar string and []byte conversion code is very common on the web. 1 2 3 4 5 6 7 8 func StringToSliceByte(s string) []byte { l := len(s) return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ Data: (*(*reflect.StringHeader)(unsafe.Pointer(&s))).Data, Len: l, Cap: l, })) } The reason why people don’t want to convert a string to a []byte directly via []byte(string) is because that would involve a memory copy, whereas a type conversion via unsafe.

Notes on the use of Golang's defer keyword

Golang provides the defer keyword to perform cleanup before a function exits. We won’t go into the basics of how to use it. Here’s a summary of some things to keep in mind. defer execution order 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 package main import "fmt" func TestFunc() { defer func() { fmt.Println("A") }() defer

Git: Failed sending HTTP2 data solution

In recent times I’ve noticed strange errors in Git Clone on my Debian machine, and after a bit of Googling I’ve finally discovered that it’s a bug in the libcurl3-gnutls library. 2021-10-01 Update: Buster-backports has not yet fixed this issue, but Bullseye has incorporated a new version that does. 2021-06-19 Update: The fix is still not incorporated into backports, and the problem seems to be due to a problem with the TLSv1.

Linux kernel page replacement algorithms

Previously, Yu Zhao from Google submitted a Patch to the Linux kernel that modified the page swap algorithm in the kernel memory management module, proposing a multi-level LRU. This article takes you through the advantages of the page swap algorithm and multi-level LRU. What are pages and page replacement We know that memory paging mechanisms are used on almost all modern operating systems and processors. In some embedded operating systems and in special cases where processor resources are tight and there is no need to consider inter-process safety, or even the concept of threads, memory paging is not necessary.

Linux malware on the rise: XorDDoS, Mirai and Mozi most popular

Linux powers most of today’s cloud infrastructure and web servers, as well as mobile and IoT devices. In a newly released report, security firm CrowdStrike notes that malware targeting Linux-based operating systems typically deployed in Internet of Things (IoT) devices increases by 35 percent in 2021 compared to 2020, with the top three malware families accounting for 22 percent of all Linux-based IoT malware in 2021. 35% increase in malware targeting Linux systems in 2021 compared to 2020 XorDDoS, Mirai and Mozi malware families account for more than 22% of the threats targeting Linux observed by CrowdStrike in 2021 10x increase in the number of Mozi malware samples observed in 2021 compared to 2020 XorDDoS, Mirai and Mozi are the most prevalent Linux-based malware families observed by CrowdStrike in 2021.

Firefox Relay blacklisted by GitHub's 'Temporary Mailbox' project, users protest

Recently the maintainers of the GitHub ‘Temporary Mailbox’ project decided to add Firefox Relay to that list, causing many of the service’s many users of the service were outraged and protested. “Temporary mailboxes” (or one-off mailboxes) are a type of mail service, such as the best known 10minutemail, which provides users with a randomly generated mailbox name that is valid for 10 minutes, during which time they can use the mailbox to register for some Internet accounts and receive verification codes.

CPython performance to be improved by 5x? faster-python project PEP 659 source code interpretation

Earlier in 2021, Python author Guido van Rossum was rehired by Microsoft to continue work on CPython, and they have proposed a faster-cpython project to improve the performance of CPython by a factor of 5 over 4 years. The whole project is open on GitHub’s faster-cpython group, and some of the ideas have been implemented and verified through Activity. In this article, we will read and analyse the source code of one of the project’s key proposals, PEP 659, and learn how to optimise virtual machine performance at the bytecode level.

Understanding python asynchronous programming and simple implementation of asyncio

Asynchronous programming Before we start to explain asynchronous programming, let’s first understand a few related concepts. Blocking The state in which a program is hung when it has not been given the computational resources it needs. A program is said to be blocking on an operation if it cannot do anything else on its own while waiting for that operation to complete. Common forms of blocking are: network I/O blocking,

Three new concepts related to interfaces since Go 1.18

The meaning of Go’s interfaces has changed since Go 1.18, and there are three new concepts related to Go interfaces that many people are not aware of: type set, specific type and structural type. type set The type set is called a type set and is a new concept added to Go 1.18 for those who follow Go generics. Unlike Java, which requires a class to be defined explicitly to

Time Wheel for Timed Tasks

Basics of Timed Tasks First of all, let’s understand what is a timer task? Timers have very many scenarios, which you should encounter frequently in your normal work, such as generating monthly statistical reports, financial reconciliation, membership points settlement, email push, etc., are all scenarios of timer usage. Timers generally have three forms of performance: execution at a fixed period, execution after a certain delay, and execution at a specified

The shebang line of linux shell programming

You will often encounter shell scripts starting with #! /bin/bash, #! is called a shebang or hashbang. shebang plays an important role in shell scripting, especially when dealing with different types of shells. In this tutorial we will explain what shebang is, how it plays a role in shell scripting. And how to specify an interpreter for shell scripts. We will use the two shells, bash and zsh, for comparison. All shell programming tutorials can be used in many Linux distributions such as Ubuntu, Debian, Fedora, Redhat, CentOS, Suse, Arch, Gentoo etc.

3 ways to check the Linux kernel version from the command line

When you are debugging drivers like you do, you may want to know which Linux kernel version your system is using? Here are three ways to check the kernel version in the Linux terminal. I am using Ubuntu at the time of writing this article, but these commands are generic and can be used on Fedora, Debian, CentOS, SUSE Linux or any other Linux distribution. Using the uname command to find the Linux kernel version uname is a Linux command used to get information about your system.

read,source,mapfile commands and shell programming

Bash is a fairly powerful programming language and easy to get to grips with. Here are some little-known but useful bash commands that will help make the shell scripts you write clearer and easier to maintain. After all, it’s almost always the shell you see when you open a terminal. There are some powerful commands in Bash that you may not be aware of, even if you are fairly proficient in the language.

Postfix & Dovecot Build Your Own Mailbox Service

example.com hostname password in this article please change to your own configuration environment CentOS 7 postfix dovecot mariadb opendkim nginx Installation of essential software 1 2 3 4 yum -y update && \ yum -y install epel-release && \ yum -y update && \ yum -y install dovecot dovecot-mysql mariadb-server nginx opendkim python2-certbot-nginx nginx Modify the hosts file 1 2 127.0.0.1 localhost.localdomain localhost 你的公网ip hostname.example.com