Below you will find pages that utilize the taxonomy term “Advanced”
Plumego Advanced Guide: Designing Explicit, Scalable Go Services
Plumego Advanced Guide: Designing Explicit, Scalable Go Services
Introduction: Beyond the Basics
The introductory Plumego documentation explains what Plumego is and why it exists. This guide focuses on a different question:
How do you design serious, long-lived systems with Plumego?
This article assumes that you already understand:
- Go fundamentals
- HTTP server basics
- The core Plumego APIs
- The philosophy of explicitness
What follows is an advanced, production-oriented tutorial. We will explore architectural patterns, not just APIs. The emphasis is on design decisions, trade-offs, and operational correctness—the areas where Plumego provides leverage without hiding complexity.
Lua Advanced: Metatables, Coroutines, and Powerful Patterns
Lua is simple on the surface, but extremely powerful underneath.
This article explores metatables, metamethods, coroutines, advanced module design, and a set of practical patterns used in games, tools, and embedded systems.
All examples are fully runnable with standard Lua 5.3/5.4.
1. Metatables: Lua’s Custom Behavior Engine
Metatables let you customize how tables behave—similar to operator overloading, custom indexing, inheritance, and more.
1.1 Basic Example: __index Fallback
local defaults = {hp = 100, mp = 50}
local player = {}
setmetatable(player, {
__index = defaults
})
print(player.hp) -- 100
print(player.mp) -- 50
Explanation: