<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Scripting Redict with Lua on Redict</title>
    <link>https://redict.io/docs/scripting/</link>
    <description>Recent content in Scripting Redict with Lua on Redict</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <atom:link href="https://redict.io/docs/scripting/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Executing Lua scripts</title>
      <link>https://redict.io/docs/scripting/eval-intro/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://redict.io/docs/scripting/eval-intro/</guid>
      <description>&lt;h1 id=&#34;executing-lua-scripts-in-redict&#34;&gt;&#xA;  Executing Lua scripts in Redict&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#executing-lua-scripts-in-redict&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Redict 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://redict.io/docs/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;Redict guarantees the script&amp;rsquo;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&amp;rsquo;s effects either have yet to happen or had already happened.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Lua functions</title>
      <link>https://redict.io/docs/scripting/functions-intro/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://redict.io/docs/scripting/functions-intro/</guid>
      <description>&lt;h1 id=&#34;redict-functions&#34;&gt;&#xA;  Redict Functions&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#redict-functions&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Redict Functions is an API for managing code to be executed on the server. They are an evolutionary step from ephemeral scripting.&lt;/p&gt;&#xA;&lt;p&gt;Functions provide the same core functionality as scripts but are first-class software artifacts of the database.&#xA;Redict manages functions as an integral part of the database and ensures their availability via data persistence and replication.&#xA;Because functions are part of the database and therefore declared before use, applications aren&amp;rsquo;t required to load them during runtime nor risk aborted transactions.&#xA;An application that uses functions depends only on their APIs rather than on the embedded script logic in the database.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debugging Lua scripts</title>
      <link>https://redict.io/docs/scripting/debugging/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://redict.io/docs/scripting/debugging/</guid>
      <description>&lt;h2 id=&#34;debugging-lua-scripts-in-redict&#34;&gt;&#xA;  Debugging Lua scripts in Redict&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#debugging-lua-scripts-in-redict&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Redict includes a complete Lua debugger, that can be&#xA;used in order to make the task of writing complex Redict scripts much simpler.&lt;/p&gt;&#xA;&lt;blockquote class=&#34;book-hint danger&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Please make sure to avoid debugging Lua scripts using your Redict&#xA;production server. Use a development server instead. Also note that using the&#xA;synchronous debugging mode (which is NOT the default) results in the Redict&#xA;server blocking for all the time the debugging session lasts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>API reference</title>
      <link>https://redict.io/docs/scripting/api/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://redict.io/docs/scripting/api/</guid>
      <description>&lt;h1 id=&#34;redict-lua-api-reference&#34;&gt;&#xA;  Redict Lua API reference&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#redict-lua-api-reference&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Redict includes an embedded &lt;a href=&#34;https://www.lua.org/&#34;&gt;Lua 5.1&lt;/a&gt; interpreter. The&#xA;interpreter runs user-defined &lt;a href=&#34;https://redict.io/docs/scripting/eval-intro&#34;&gt;ephemeral scripts&lt;/a&gt; and&#xA;&lt;a href=&#34;https://redict.io/docs/scripting/functions-intro&#34;&gt;functions&lt;/a&gt;. Scripts run in a sandboxed context and can&#xA;only access specific Lua packages. This page describes the packages and APIs&#xA;available inside the execution&amp;rsquo;s context.&lt;/p&gt;&#xA;&lt;h2 id=&#34;sandbox-context&#34;&gt;&#xA;  Sandbox context&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#sandbox-context&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;The sandboxed Lua context attempts to prevent accidental misuse and reduce&#xA;potential threats from the server&amp;rsquo;s environment.&lt;/p&gt;&#xA;&lt;p&gt;Scripts should never try to access the Redict server&amp;rsquo;s underlying host systems.&#xA;That includes the file system, network, and any other attempt to perform a&#xA;system call other than those supported by the API.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
