Tag:lua

  • Redis + Lua realize distributed lock (springboot version)

    Time:2020-1-19

    Design thinking Since it is to implement distributed lock, it must ensure the exclusiveness of multiple connection centralized requests for a resource, and the single thread feature of redis meets this demand well. The set method provided by redis is the key to meet this demand. The figure below is a simple process to realize […]

  • Some optimizations and precautions of using Lua in redis

    Time:2020-1-18

    Eval, evalsha command RedisAvailable from version 2.6.0evalCommand, via the built-inLuaInterpreter, which allows the user to execute a paragraphLuaScript and return data. becauseRedisThe characteristics of single thread model can guarantee theAtomicity(Lua is only used in recent projects). Please move to official documents for detailed usage. Script performance RedisIt ensures the atomicity of script execution, so before […]

  • Implementation of current limiting algorithm (redis + Lua)

    Time:2020-1-17

    Current limiting algorithm Common current limiting algorithms Counter algorithm Leaky bucket algorithm Token Bucket Counter algorithm As the name implies, counter algorithm refers to a fixed number of requests allowed in a certain time window. For example, 10 requests are allowed in 2S, 100 requests are allowed in 30s, etc. if the finer the time […]

  • The record of socket stepping on the hole

    Time:2020-1-16

    Socket brief introduction Socket (duplex protocol)Two programs in the network exchange data through a two-way connection. We call one end of the connection socket Socket characteristics Built in connection retention Can realize two-way communication Socket classification Socket based on TCP Socket based on UDP Socket based on rawip Socket based on link layer Socket actual […]

  • Teach you to use lualocks to create rock packages

    Time:2020-1-15

    1. What is luarocks? Lualocks is a Lua package manager. Based on the development of Lua language, it provides a command-line way to manage Lua package dependencies, install third-party Lua packages, etc. it is one of the most popular package managers in the community, and there is another luadist. There are more packages in lualocks […]

  • Netfox glory 6701 / 6801 mobile phone package release

    Time:2020-1-14

    1. Preface This article will introduce the APK and IOS compilation process of Android packaged in the project of cocos2dx Lua, vs2015 simulation run and debugging, and Lua script hot update.For the compilation and operation of the service side of the Internet fox, please check the compilation and test deployment of the service side of […]

  • Mac [Linux] uses lsyncd to synchronize multiple files of two machines in real time

    Time:2020-1-13

    What is lsyncd? Lsyncd is a lightweight real-time file backup solution, which is very easy to install and use. It can be used to synchronize files between machines for two days. Please refer to https://github.com/axkibe/lsyncd for more usage plans install brew install lsyncdbrew install rsync configuration file ~/MyApp/sync.lua settings { Logfile = “/ var / […]

  • How to use data architecture to drive enterprise growth?

    Time:2020-1-12

    For architects, the development of technology is endless. In the process of building and practicing intelligent data architecture, architects will encounter some doubts and challenges more or less. How to solve some problems encountered in the architecture construction? What are the new industry trends and technical methods in the field of architecture construction? Recently, on […]

  • Lsyncd — a real-time file synchronization artifact for multiple machines

    Time:2020-1-11

    Lsyncd is a real-time, bi-directional, multi machine multi-mode file synchronization tool. Using Lua language to encapsulate the inotify and Rsync tools, using the inotify trigger mechanism in Linux kernel (2.6.13 and later), and then using Rsync to de differential synchronization, achieving real-time effect. install To install on the source file server: yum -y install lsyncd […]

  • Installing Lua for Mac

    Time:2020-1-10

    Preparation The official website is http://www.lua.org/download.html. I downloaded the latest version of lua-5.3.5.tar.gz. install 1. Decompress the downloaded compressed package, run the terminal and enter the decompressed folder2. Execute the command make Mac OSX3. Execute the command make test The following results are displayed: src/lua -v Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio 4. Execute […]

  • Centos7 install nginx integrate Lua

    Time:2020-1-9

    Preface My computer is Mac, and the operating system is Mac OS Mojave. A virtual machine is installed on the computer.Install centos7 operating system on the virtual machine, and install nginx and Luau class libraries on it. The whole process is to start recording after the system installation.It is recommended to take a snapshot before […]

  • Baidu yunqu Xianping: how to systematically solve operation and maintenance problems with operation and maintenance data in the age of aiops?

    Time:2020-1-8

    This article is based on the sharing content of the 13th Meizu technology open day “Baidu cloud intelligent operation and maintenance practice” speech hosted by Qu Xianping, the head of Baidu cloud intelligent operation and maintenance, in msup, together with Meizu, flyme and Baidu cloud on October 20. Content introduction: This paper mainly introduces Baidu […]