oreolasvegas.blogg.se

Lua script in fastoredis
Lua script in fastoredis





lua script in fastoredis
  1. #Lua script in fastoredis update
  2. #Lua script in fastoredis software

Pros: Use a full-blown debugger for your Lua code.Ĭons: Requires a degree of non-trivial setup. While this doesn’t exactly let you debug the code in vivo, it’s the closest you can get and for all practical purposes is as good. His blog post takes you through the steps to accomplish that feat, and even includes sample code for the Redis-specific commands wrapper. The gist of Marijan’s idea is using a freely-available Lua debugger to debug your Lua code and adding Redis-specific commands with thin wrapping code. This clever trick provided by Marijan Šuflaj from gives you exactly that – a debugger for your Lua scripts with Redis. Use a Lua DebuggerĪdding tracing to your code can only get you so far when you’re trying to grok a piece of code, because sometimes you really need/want a full-fledged debugger at your disposal. Pros: Little overhead, real-time display of messages.Ĭons: Pub/Sub’s delivery isn’t guaranteed, so there’s a chance you could miss a revealing log message (but that’s really a long shot). To make this somewhat easier (and perhaps save your wall from a few bangs), here are five ways you can gain Superman-like X-Ray vision into your Lua redis-cli SUBSCRIBE log That’s because your code runs within the server itself, making it much harder to gain visibility into the code’s innards. When developing Lua scripts for Redis (a feature that’s available from version 2.6 onwards) this can become even trickier. It requires patience, effort and in many cases a touch of inspiration to correctly identify the root cause of a failure. Tracking down these issues isn’t an easy task. Even if you are a good programmer who writes good code (or a great programmer who steals it), use proven methodologies and design patterns, employ only best-of-breed tools, and submit to peers’ code reviews… despite your best efforts, you’re likely to find yourself time and time again banging your head against the wall because of an elusive gremlin.

#Lua script in fastoredis software

Software defects are a fact of life because software is made by fleshware, and humans err. “In this world nothing is certain, except death, taxes … and BUGS.” If you’ve ever written even a single line of code, you know that Benjamin Franklin’s famous quote should be amended to:

#Lua script in fastoredis update

Update 1: I’ve followed up on the topic with a vastly superior debugging method so check out part 2 – redis-lua-debugger and its accompanying post <- mini-update: rld is no longer maintained as it isn’t compatible with v3+. Mother of all Updates: Redis v3.2 features its very own Lua debugger.







Lua script in fastoredis