Category:MongoDB

  • [Mr. Zhao Qiang] what is redis cluster

    Time:2021-10-27

    (1) What is redis cluster? Redis cluster is redis’s distributed solution. It was officially launched in redis version 3.0, which effectively solves redis’s distributed requirements. In case of single machine memory, concurrency, traffic and other bottlenecks, cluster architecture can be used to achieve the purpose of load balancing. Bottlenecks encountered in redis usage In our […]

  • Mongodb introduction and Development Guide

    Time:2021-10-26

    catalogue1、 Introduction to mongodb2、 Build mongodb3、 Java with mongodb4、 Spring session mongodb5、 Mongodb development specifications and examples6、 Mongodb + nodejs See Annex: mongodb introduction and Development Guide for details_ 20200409224211.pdf Mongodb learning exchange group:

  • [Mr. Zhao Qiang] use mongodb’s Web console

    Time:2021-10-25

    Mongodb can monitor the database through the web interface. By default, this option is turned off and needs to be turned on at startup.Enableweb Console, need to be startedmongodbAdd:–httpinterface Start mongodb and observe the output log information:   Use the browser to access port 28017 to see mongodb’s Web console interface.  

  • [redis] cluster NETCORE practice

    Time:2021-10-23

    Environmental preparation one   Redis cluster(Windows cluster setup) Start the redis cluster and add a title to each node start “Redis – 6379” /min redis-server.exe redis.6379.conf start “Redis – 6380” /min redis-server.exe redis.6380.conf start “Redis – 6381” /min redis-server.exe redis.6381.conf start “Redis – 6382” /min redis-server.exe redis.6382.conf start “Redis – 6383” /min redis-server.exe redis.6383.conf start […]

  • [Mr. Zhao Qiang] redis case analysis: using setbit to count active users

    Time:2021-10-21

    1、 Demand background First, let’s take a look at the requirements: the website counts the number of user logins, as follows: The website has 100 million users, including those who log in frequently and those who log in infrequently How to record user login information How to query active users: for example, log in three […]

  • [mongodb] Introduction

    Time:2021-10-19

    summary Mongodb is a database based on distributed file storage. Written in C + +. It aims to provide scalable high-performance data storage solutions for web applications. Mongodb is a product between relational database and non relational database. It is the most functional and relational database among non relational databases Mongodb uses bson structure as […]

  • [Mr. Zhao Qiang] use mongodb’s command line tool: mongoshell

    Time:2021-10-18

    1、 Start Mongo shell After mongodb is installed, execute the following commands directly on the command line terminal: mongo As shown in the figure below: The optional parameters are as follows: It can also be abbreviated as: To use an external editor in Mongo shell, such as: VI, you only need to set the environment […]

  • [Mr. Zhao Qiang] mongodb insert document

    Time:2021-10-17

    Mongodb is the representative of non relational database NoSQL. As a distributed storage database, the operation of documents is the top priority of mongodb. In this article, we will focus on how to insert documents in mongodb. Mongodb provides us with three ways to insert documents: DB. Collection. Insertone(): inserts a specified document DB. Collection. […]

  • [mongodb] transaction

    Time:2021-10-16

      summary Mongodb 4.0 supports multi document transactions for replica sets Mongodb 4.2 supports multi document transactions in fragmented clusters A single server does not support transactions, so to learn transactions, you need to build a replica set / fragment cluster In addition, it should be noted that a single document operation is an atomic […]

  • The three popular databases of NoSQL are memcached, redis and mongodb

    Time:2021-10-15

    NoSQL generally refers to non relational databases. With the continuous development of the Internet, the traditional relational database has been unable to cope with the websites of the new Internet model, especially the super large-scale and highly concurrent SNS type pure dynamic websites, which has exposed many insurmountable problems, while the non relational database has […]

  • Redis string implementation: simple dynamic string – the difference between SDS and C string

    Time:2021-10-14

    2.1 definition of SDS struct { //The number of bytes used in buf is equal to the length of the string saved in SDS int len; //Unused byte length in buf int free; //Byte array to hold string char[] buf; } 2.2 difference between SDS and C string C string SDS The complexity of getting […]

  • Redis linked list implementation

    Time:2021-10-13

    //Each linked list node uses a listnode structure to represent a typedef struct listnode{ //Front node struct ListNode *prev; //Post node struct ListNode *next; //Node value void *value; } ListNode;    // typedef struct List{ //Head node struct ListNode *head; //Tail node struct ListNode *tail; //Number of nodes contained in the linked list unsigned long […]