Concurrent Type Checking and Cross-Platform Development in Go

OpenIM cross-platform source code type checking tool start question In the automation path of OpenIM, it involves more and more comprehensive automated design and testing. In the process, I encountered a problem, so I completed a full set of experience from go language type detection to integrated local and CI. The problem is this issue: https://github.com/openimsdk/open-im-server/issues/1807 Our Go code encountered an integer overflow issue when running on a 32-bit system (linux/386). This problem occurs because the int type in Go has different sizes depending on the architecture: on 32-bit systems it is equivalent to int32, and on 64-bit systems it is equivalent to int64. ...

January 24, 2024 · 31 min · 6471 words · Xinwei Xiong, Me
Vector database learning

Vector Database Learning

Vector database learning I learned rust today and found that rust is a very suitable language for writing databases. I found a treasure project tikv. Its github project address is https://github.com/tikv/tikv . It is a very active project, but today I The topic is vector database in the field of AI. Without further ado, let’s get started right away. prerequisites 0.1 Introduction to basic knowledge: Understand the basic definition of vector database and its difference from traditional database. 0.2 Data Structure Basics: Learn vectors and other basic data structures, and how to represent and manipulate these structures in databases. 0.3 Introduction to Linear Algebra: Introduction to vector operations, including vector addition, subtraction and dot multiplication. 0.4 Similarity measures: Learn how to calculate similarity between vectors, such as cosine similarity. 0.5 Basics of Database Index: Introduces the basic concepts of database index, especially its application in vector databases. 0.6 Preliminary Search Algorithms: Learn basic search algorithms and understand how to perform effective searches in large data sets. 0.7 Application case studies: Study the application of vector databases in different fields (such as recommendation systems, image recognition). ...

January 20, 2024 · 39 min · 8125 words · Xinwei Xiong, Me

OpenIM: Version Control & Testing Workflow

The success of an open-source project largely depends on its quality management and collaborative processes. In the OpenIM open-source community, the standardization of project management and testing processes is crucial to ensure the quality and stability of the codebase. This document provides a brief overview of our testing strategy, branch management, quality control policies, and how they are applied to the main branch, PR testing branches, and stable release branches to meet the needs of developers, testers, and community managers. Additionally, we will introduce the standards, testing schemes, and project management strategies of the OpenIM open-source community, aiming to provide clear guidance to ensure project stability and sustainability. ...

January 15, 2024 · 5 min · 1023 words · Xinwei Xiong, Me

Emerging Challenges and Trends in 2024

Large language model sharing meeting on January 6, 2024 Limitations of the model: Deep learning Pre-trained model Large language model The emergent power of large language models: 💡 Relevant research on emergence phenomena has been done for a long time in the discipline of complex systems. So, what is “emergent phenomenon”? When a complex system is composed of many tiny individuals, these tiny individuals come together and interact with each other. When the number is large enough, they exhibit special phenomena that cannot be explained by the microscopic individuals at the macro level. This can be called an "emergent phenomenon." Link: ...

January 14, 2024 · 10 min · 2002 words · Xinwei Xiong, Me

GitOps Practice Theory: In-Depth Analysis of Kubernetes Deployment Strategies

Today we will take a look at the theory and practice of kubernetes and gitops Command introduction First, let’s take a look at the subnaming supported by kubectl for our convenience: kubectl apply - applies the definition of one or more resources. Typically used to deploy applications or update resources. kubectl get - displays information about one or more resources. This is a common command to view the status of resources in a Kubernetes cluster. kubectl describe - Displays details of one or more resources, such as events, status, and configuration. kubectl delete - Delete resources in the Kubernetes cluster. kubectl exec - Execute commands in containers in the cluster. kubectl logs - Print container logs. kubectl create - Create one or more resources from a file or standard input. kubectl edit - Edit resources in the cluster. This will open an editor to modify the resource’s configuration. kubectl port-forward - Forward local ports to Pods in the cluster. kubectl run - Run a specified image in the cluster. kubectl scale - Adjust the number of replicas of resources (such as Deployment, ReplicaSet). kubectl rollout - Manage the deployment of resources, such as viewing status, pausing, resuming or rolling back updates. **In addition to the above commands, kubectl in Kubernetes also supports annotations: ** ...

November 25, 2023 · 42 min · 8858 words · Xinwei Xiong, Me

Deployment and Design of Management Backend and Monitoring

OpenIM offers various flexible deployment options to suit different environments and requirements. Here is a simplified and optimized description of these deployment options: Source Code Deployment: Regular Source Code Deployment: Deployment using the nohup method. This is a basic deployment method suitable for development and testing environments. For details, refer to the Regular Source Code Deployment Guide . Production-Level Deployment: Deployment using the system method, more suitable for production environments. This method provides higher stability and reliability. For details, refer to the Production-Level Deployment Guide . Cluster Deployment: Kubernetes Deployment: Provides two deployment methods, including deployment through Helm and sealos. This is suitable for environments that require high availability and scalability. Specific methods can be found in the Kubernetes Deployment Guide . Docker Deployment: Regular Docker Deployment: Suitable for quick deployments and small projects. For detailed information, refer to the Docker Deployment Guide . Docker Compose Deployment: Provides more convenient service management and configuration, suitable for complex multi-container applications. Next, we will introduce the specific steps, monitoring, and management backend configuration for each of these deployment methods, as well as usage tips to help you choose the most suitable deployment option according to your needs. ...

November 15, 2023 · 7 min · 1366 words · Xinwei Xiong, Me

Hugo Advanced Tutorial

136: Hugo Advanced Coming to the advanced part, you need to learn some advanced Hugo techniques in depth. Module Hugo modules are the core building blocks of Hugo. A module can be your main project or a smaller module that provides one or more of the 7* component types defined in Hugo: static, content, layouts, data, assets, i18n and archetypes. You can combine modules in any combination you like, and you can even mount directories from non-Hugo projects to form a large virtual union file system. ...

November 6, 2023 · 34 min · 7121 words · Xinwei Xiong, Me

Kubernetes for Kustomize Learning

Introduction About Kustomize GitHub Repository Get Started Kustomize is an open-source configuration management tool designed specifically for Kubernetes. It helps users customize Kubernetes objects and manage them declaratively without modifying the original YAML files . This means you can retain the basic settings for applications and components while overriding default settings with declarative YAML documents called “patches” without altering the original files. Kustomize provides a declarative approach that aligns with Kubernetes philosophy and allows customization of Kubernetes configurations in a reusable, fast, debuggable, and scalable manner. ...

October 31, 2023 · 24 min · 4998 words · Xinwei Xiong, Me

OpenIM Use Harbor Build Enterprise Mirror Repositories

Requirements OpenIM provides various public image registry addresses, such as aliyun, github, Docker Hub, and more. Read https://github.com/openimsdk/open-im-server/blob/main/docs/conversions/images.md for more image building guidelines. Most enterprises choose to set up their own image repository using Harbor, integrating it into their CI/CD pipeline to eventually replace Docker Hub and further reduce image storage costs. Additionally, in a production environment, Harbor generally enables TLS, so you will also need to prepare a valid domain name. ...

October 25, 2023 · 5 min · 1009 words · Xinwei Xiong, Me

Learn About Automated Testing

Automated testing practices and strategies for GitHub open source Go projects in the cloud native field introduce As OpenIM, a popular project on Github, how to create value in the cloud native era is very important. OpenIM is a small and high-quality team, and we do not have particularly in-depth insights in automation. Continuous Integration and Continuous Delivery (CI/CD) using GitHub Actions: GitHub Actions provides a platform to automatically build and test Go language projects. By configuring GitHub Actions workflows, you can automatically run tests when your code changes, ensuring the quality and functionality of your code (https://docs.github.com/en/actions/automating-builds-and-tests) . KubeVela project practice: KubeVela is a cloud-native and open-source project in Go that shows how to organize CI/CD processes, including automated testing, in a cloud-native environment. KubeVela uses declarative workflows to coordinate the CI/CD process. You can refer to KubeVela’s GitHub repository to understand and apply these [Practice 3](https://www.alibabacloud.com/blog/kubevela-one-of-the- hottest-golang-cloud-native-and-open-source-project_597465)4 [5](https://github.com/kubevela/workflow# :~ :text=KubeVela Workflow is an open,engine in your own repository). Cloud native testing framework and tools: In cloud native development, Contract Testing is a common testing practice, which ensures that communication between services complies with predefined API protocols. For example, Pact is used in Cloud-Native Toolkit for contract testing. By writing and integrating tests, you can verify that communication between services works as expected 6 . Code Coverage Check: When doing automated testing, it is a good practice to check code coverage. Many testing frameworks have built-in code coverage checking capabilities, and they can be configured to report code coverage of tests. For example, use the SonarQube tool to read and report code coverage information 6 . Utilize open source tools and frameworks: You can use open source tools and frameworks for testing, such as using Cypress to test cloud native applications[7](https://dev.to/litmus-chaos/cloud-native-application-testing-automation-2bh5# : ~:text=Cloud Native Application %26 Testing,Testing Using Cypress for). There are other projects and resources, such as the learning-cloud-native-go/myapp repository on GitHub, which provide completed examples of cloud native Go projects. You can refer to these examples to understand and apply cloud native testing practices[8] (https://medium.com/learning-cloud-native-go/lets-get-it-started-dc4634ef03b#:~:text=The completed project can be,The completed API). Customized automated testing process: By combining GitHub Actions and open source tools, you can customize your project’s CI/CD process, including automated testing and verification steps9 . Quantify the value of automated testing Automation obviously means that the manual cost in the later period is very low. That is to say, as time goes by and the number of automation runs increases, the value of automation and ROI becomes higher. ...

October 14, 2023 · 60 min · 12628 words · Xinwei Xiong, Me