Understanding Lua Coroutines and Debugging Techniques
Coroutines
Lua coroutines invert the relationship between caller and callee, providing a flexible solution to the question of which routine controls the main execution flow. This generalization addresses seemingly unrelated problems like event-driven programming, iterator construction, and cooperative multitasking, offering an efficient and str ...
Posted on Sun, 13 Sep 2026 16:33:18 +0000 by emfung
Advanced Redis Scripting with Lua
Redis and Lua IntegrationRedis provides built-in support for the Lua scripting language, allowing developers to execute complex logic directly on the server side. This functionality is conceptually similar to stored procedures in SQL databases, enabling efficient data manipulation close to the storage layer.Benefits of Lua ScriptingUtilizing Lu ...
Posted on Tue, 01 Sep 2026 16:47:32 +0000 by jimbo2150
Core Lua Scripting Techniques
Invoking Lua from the Shell
Lua modules can be executed directly via the command line interface without creating a separate script file. This is useful for quick tasks or integrating with system workflows.
lua -e "require('sys.network').verify('127.0.0.1')"
Processing Command Line Arguments
When a script is executed, arguments are st ...
Posted on Thu, 27 Aug 2026 16:09:27 +0000 by yandoo
System Integration with LuaJIT
Check for support
zcat /proc/config.gz | grep -i binfmt_misc
Expected output:
CONFIG_BINFMT_MISC=y
You can locate the mount point using the `findmnt` tool: ```
# Locate the control interface
findmnt binfmt_misc
# Example output:
TARGET SOURCE FSTYPE OPTIONS
/proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc rw,relat ...
Posted on Thu, 20 Aug 2026 16:25:57 +0000 by EODC
Redis Internals: Pub/Sub and Transactions
Pub/Sub Pattern
While Redis lists can be used to implement simple message queues (using rpush and blpop), they have a key limitation: they support only a single consumer. This is a one-to-one model, not a one-to-many distribution system. To achieve one-to-many message distribution, Redis offers the Publish/Subscribe (Pub/Sub) pattern.
In this a ...
Posted on Sat, 08 Aug 2026 16:29:19 +0000 by ecxzqute
Building a Web Application Firewall with Nginx and Lua
Overview
A Web Application Firewall (WAF) filters HTTP/HTTPS traffic to protect web applications from common exploits such as SQL injection, cross-site scripting (XSS), and DDoS/CC attacks. By leveraging Nginx’s event-driven architecture and Lua’s lightweight scripting capabilities via the lua-nginx-module, a high-performence, rule-based WAF ca ...
Posted on Fri, 03 Jul 2026 17:00:20 +0000 by EriRyoutan
Configuring RabbitMQ Dead Letter Exchanges, Redis Seckill with Redisson, Elasticsearch Logging, and Redis-Driven Features
RabbitMQ Setup with Dead Letter Handling
To handle timed‑order expiry, a RabbitMQ infrastructure consisting of a direct exchange, a durable queue, and a dedicated dead‑letter exchange (DLX) is defined. The queue is declared with arguments that route expired (unconsumed) messages to the DLX after a configured TTL. Below is the Spring configurati ...
Posted on Mon, 15 Jun 2026 16:42:04 +0000 by emfung
Implementing Sequential Data Structures in Lua
Sequential Data via Tables
Lua does not implement a distinct array data type; instead, sequential data structures are represented using tables. These tables function as dynamic arrays that can automatically resize to accommodate new elements. Because Lua tables are flexible, they can store values of any type, including numbers, strings, boolean ...
Posted on Wed, 13 May 2026 03:53:24 +0000 by CJLeah
Integrating Redis with Spring Boot for Caching, Lua Scripting, and Session Sharing
Integrating Redis as a Cache in Spring Boot
To use Redis as a caching layer in Spring Boot, include the spring-boot-starter-cache and spring-boot-starter-data-redis dependencies. Spring Boot auto-configures a RedisTemplate and, when caching is enabled, a RedisCacheManager.
Required Dependencies
<dependency>
<groupId>org.springfr ...
Posted on Sat, 09 May 2026 21:29:26 +0000 by katlis
Integrating Lua with Nginx for High-Performance Scripting
Lua Syntax Fundamentals
Nginx and Lua Environment
Objective: Use Nginx combined with Lua to implement a canary release strategy.
Lua Overview
A lightweight, compact, and highly extensible scripting language.
Nginx+Lua Advantages
Combines the efficient concurrency handling of Nginx's event-driven mechanism (epoll) with the agility of Lua, makin ...
Posted on Thu, 07 May 2026 13:09:47 +0000 by jdpatrick