Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ServiceStack 4 Cookbook

You're reading from   ServiceStack 4 Cookbook Over 70 recipes to create web services, build message-based apps, and work with object-relational mapping

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher
ISBN-13 9781783986569
Length 444 pages
Edition 1st Edition
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Configuration and Routing FREE CHAPTER 2. Services and Data Transfer Objects 3. Testing and Logging 4. Object Relational Mapping (OrmLite) 5. HTML and Form Data 6. Filters and Validators 7. Security and Authentication 8. Working with Redis 9. Integrating with Other Technologies A. Getting Started B. Testing Locally Index

Scripting Redis with Lua


Many modern NoSQL data stores offer a way to evaluate scripts within the remote server, often by way of sending bits of code to the remote server for execution. Redis offers this capability too, using the popular Lua scripting language. This unlocks capabilities not currently offered by the official Redis API or the ServiceStack Redis client API. In the RDBMS world, this might be like creating a stored procedure.

Scripts evaluated will be compiled and cached on the Redis server. Calling them again in the future will simply execute the cached, compiled function. Scripts can be stored on the server and named so that they can be referenced without resending the full text of the script over the wire.

We'll cover some very basic concepts about how you can script Redis operations in Lua, without getting into the full language specification. Lua itself is a lightweight, multi-paradigm programming language designed as a scripting language. Based on C, it's portable across...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image