<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="https://umn0mtkzgkj46tygt32g.julianrbryant.com/2005/Atom">
  <channel>
    <title>Redis programmability on Docs</title>
    <link>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/</link>
    <description>Recent content in Redis programmability on Docs</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Redis functions</title>
      <link>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/functions-intro/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/functions-intro/</guid>
      <description>&lt;p&gt;Redis Functions is an API for managing code to be executed on the server. This feature, which became available in Redis 7, supersedes the use of &lt;a href=&#34;https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/eval-intro/&#34;&gt;EVAL&lt;/a&gt; in prior versions of Redis.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prologue-or-whats-wrong-with-eval-scripts&#34; class=&#34;group relative&#34;&gt;&#xA;  Prologue (or, what&#39;s wrong with Eval Scripts?)&#xA;  &lt;a href=&#34;#prologue-or-whats-wrong-with-eval-scripts&#34; class=&#34;header-link opacity-0 group-hover:opacity-100 transition-opacity duration-200 ml-1 align-baseline&#34; aria-label=&#34;Link to this section&#34; title=&#34;Copy link to clipboard&#34;&gt;&#xA;    &lt;svg class=&#34;inline-block w-4 h-4 align-baseline&#34; fill=&#34;currentColor&#34; viewBox=&#34;0 0 20 20&#34; xmlns=&#34;https://umn0mtkzgkj46tygt32g.julianrbryant.com/2000/svg&#34;&gt;&#xA;      &lt;path fill-rule=&#34;evenodd&#34; d=&#34;M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z&#34; clip-rule=&#34;evenodd&#34;&gt;&lt;/path&gt;&#xA;    &lt;/svg&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Prior versions of Redis made scripting available only via the &lt;a href=&#34;https://un5pn9hmggug.julianrbryant.com/docs/latest/commands/eval/&#34;&gt;&lt;code&gt;EVAL&lt;/code&gt;&lt;/a&gt; command, which allows a Lua script to be sent for execution by the server.&#xA;The core use cases for &lt;a href=&#34;https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/eval-intro/&#34;&gt;Eval Scripts&lt;/a&gt; is executing part of your application logic inside Redis, efficiently and atomically.&#xA;Such script can perform conditional updates across multiple keys, possibly combining several different data types.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Scripting with Lua</title>
      <link>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/eval-intro/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/eval-intro/</guid>
      <description>&lt;p&gt;Redis lets users upload and execute Lua scripts on the server.&#xA;Scripts can employ programmatic control structures and use most of the &lt;a href=&#34;https://un5pn9hmggug.julianrbryant.com/docs/latest/commands/&#34;&gt;commands&lt;/a&gt; while executing to access the database.&#xA;Because scripts execute in the server, reading and writing data from scripts is very efficient.&lt;/p&gt;&#xA;&lt;p&gt;Redis guarantees the script&#39;s atomic execution.&#xA;While executing the script, all server activities are blocked during its entire runtime.&#xA;These semantics mean that all of the script&#39;s effects either have yet to happen or had already happened.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Redis Lua API reference</title>
      <link>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/lua-api/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/lua-api/</guid>
      <description>&lt;p&gt;Redis includes an embedded &lt;a href=&#34;https://un5gmtkzgjttpm6gt32g.julianrbryant.com/&#34;&gt;Lua 5.1&lt;/a&gt; interpreter.&#xA;The interpreter runs user-defined &lt;a href=&#34;https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/eval-intro/&#34;&gt;ephemeral scripts&lt;/a&gt; and &lt;a href=&#34;https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/functions-intro/&#34;&gt;functions&lt;/a&gt;. Scripts run in a sandboxed context and can only access specific Lua packages. This page describes the packages and APIs available inside the execution&#39;s context.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sandbox-context&#34; class=&#34;group relative&#34;&gt;&#xA;  Sandbox context&#xA;  &lt;a href=&#34;#sandbox-context&#34; class=&#34;header-link opacity-0 group-hover:opacity-100 transition-opacity duration-200 ml-1 align-baseline&#34; aria-label=&#34;Link to this section&#34; title=&#34;Copy link to clipboard&#34;&gt;&#xA;    &lt;svg class=&#34;inline-block w-4 h-4 align-baseline&#34; fill=&#34;currentColor&#34; viewBox=&#34;0 0 20 20&#34; xmlns=&#34;https://umn0mtkzgkj46tygt32g.julianrbryant.com/2000/svg&#34;&gt;&#xA;      &lt;path fill-rule=&#34;evenodd&#34; d=&#34;M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z&#34; clip-rule=&#34;evenodd&#34;&gt;&lt;/path&gt;&#xA;    &lt;/svg&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;The sandboxed Lua context attempts to prevent accidental misuse and reduce potential threats from the server&#39;s environment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debugging Lua scripts in Redis</title>
      <link>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/lua-debugging/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://un5pn9hmggug.julianrbryant.com/docs/latest/develop/programmability/lua-debugging/</guid>
      <description>&lt;p&gt;Starting with version 3.2 Redis includes a complete Lua debugger, that can be&#xA;used in order to make the task of writing complex Redis scripts much simpler.&lt;/p&gt;&#xA;&lt;p&gt;The Redis Lua debugger, codenamed LDB, has the following important features:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;It uses a server-client model, so it&#39;s a remote debugger.&#xA;The Redis server acts as the debugging server, while the default client is &lt;code&gt;redis-cli&lt;/code&gt;.&#xA;However other clients can be developed by following the simple protocol implemented by the server.&lt;/li&gt;&#xA;&lt;li&gt;By default every new debugging session is a forked session.&#xA;It means that while the Redis Lua script is being debugged, the server does not block and is usable for development or in order to execute multiple debugging sessions in parallel.&#xA;This also means that changes are &lt;strong&gt;rolled back&lt;/strong&gt; after the script debugging session finished, so that&#39;s possible to restart a new debugging session again, using exactly the same Redis data set as the previous debugging session.&lt;/li&gt;&#xA;&lt;li&gt;An alternative synchronous (non forked) debugging model is available on demand, so that changes to the dataset can be retained.&#xA;In this mode the server blocks for the time the debugging session is active.&lt;/li&gt;&#xA;&lt;li&gt;Support for step by step execution.&lt;/li&gt;&#xA;&lt;li&gt;Support for static and dynamic breakpoints.&lt;/li&gt;&#xA;&lt;li&gt;Support from logging the debugged script into the debugger console.&lt;/li&gt;&#xA;&lt;li&gt;Inspection of Lua variables.&lt;/li&gt;&#xA;&lt;li&gt;Tracing of Redis commands executed by the script.&lt;/li&gt;&#xA;&lt;li&gt;Pretty printing of Redis and Lua values.&lt;/li&gt;&#xA;&lt;li&gt;Infinite loops and long execution detection, which simulates a breakpoint.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;quick-start&#34; class=&#34;group relative&#34;&gt;&#xA;  Quick start&#xA;  &lt;a href=&#34;#quick-start&#34; class=&#34;header-link opacity-0 group-hover:opacity-100 transition-opacity duration-200 ml-1 align-baseline&#34; aria-label=&#34;Link to this section&#34; title=&#34;Copy link to clipboard&#34;&gt;&#xA;    &lt;svg class=&#34;inline-block w-4 h-4 align-baseline&#34; fill=&#34;currentColor&#34; viewBox=&#34;0 0 20 20&#34; xmlns=&#34;https://umn0mtkzgkj46tygt32g.julianrbryant.com/2000/svg&#34;&gt;&#xA;      &lt;path fill-rule=&#34;evenodd&#34; d=&#34;M12.586 4.586a2 2 0 112.828 2.828l-3 3a2 2 0 01-2.828 0 1 1 0 00-1.414 1.414 4 4 0 005.656 0l3-3a4 4 0 00-5.656-5.656l-1.5 1.5a1 1 0 101.414 1.414l1.5-1.5zm-5 5a2 2 0 012.828 0 1 1 0 101.414-1.414 4 4 0 00-5.656 0l-3 3a4 4 0 105.656 5.656l1.5-1.5a1 1 0 10-1.414-1.414l-1.5 1.5a2 2 0 11-2.828-2.828l3-3z&#34; clip-rule=&#34;evenodd&#34;&gt;&lt;/path&gt;&#xA;    &lt;/svg&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;A simple way to get started with the Lua debugger is to watch this video&#xA;introduction:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
