Book Image

Learning Redis

By : Vinoo Das
Book Image

Learning Redis

By: Vinoo Das

Overview of this book

Table of Contents (16 chapters)
Learning Redis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Learning Redis is meant to be a guide and handbook for developers, architects, solution providers, consultants, engineers, and anyone planning to learn, design, and architect an Enterprise Solution and looking for an in-memory datastore that is agile and fast and extends its capabilities beyond just storing data.

This book starts with an introduction to the evolving landscape of NoSQL, explores commands in easy-to-understand examples, and then uses Redis in a few sample applications, with Redis as the backbone. The later sections of the book focus on the management of Redis for performance and scalability.

This book covers core concepts to design and create fast, agile, and concurrent applications, but it is not meant to be a replacement for the official documentation guide for Redis, published by Redis.io.

What this book covers

Chapter 1, Introduction to NoSQL, covers the ecosystem of NoSQL. It discusses the evolution of the NoSQL landscape and provides an introduction to the various types of NoSQL and their characteristics.

Chapter 2, Getting Started with Redis, taps into the world of Redis. It also covers areas such as the installation of Redis on various platforms and running a sample program in Java to connect to Redis.

Chapter 3, Data Structures and Communicating Protocol in Redis, covers data structures that are available in Redis and the communicating protocol in Redis. It also covers examples that the user can execute and get a feel of using it. By the end of this chapter, you should have a basic feel of the capabilities of Redis.

Chapter 4, Functions in the Redis Server, takes you from learning commands to the various in-built capabilities of Redis. These capabilities include messaging in Redis, transactions, and the pipeline capabilities in Redis, which have differences between them. The chapter also introduces the users to a scripting language called LUA.

Chapter 5, Handling Data in Redis, focuses on the in-depth data handling capability of Redis. This includes the master-slave arrangement, the way data is stored in Redis, and various options it provides to persist data.

Chapter 6, Redis in Web Applications, is all about positioning Redis in web applications. To make it interesting, there are some example applications, which you can take ideas from, about the wide range of use cases where Redis can be used.

Chapter 7, Redis in Business Applications, is all about positioning Redis in business applications. To expand its applicability further in the Enterprise Solution design landscape, some example applications have been explained from which you can see its versatility.

Chapter 8, Clustering, talks about the clustering capability, how the end user can make use of various patterns in clustering for Redis, and use these patterns accordingly in their solutions.

Chapter 9, Maintaining Redis, is all about maintaining Redis in a production environment.

What you need for this book

The following software is required for this book:

  • Redis

  • JDK 1.7

  • Jedis ( the Java client for Redis)

  • Eclipse, the IDE for development

Who this book is for

This book is meant for developers, architects, solution providers, consultants, and engineers. Primarily the book requires knowledge of Java but it can also be understood by anybody with a bit of programming background.

Apart from this, there is information about how to design solutions and maintain them in production for which coding skills are not required.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The following code is for the new Hello World program, which is now called HelloWorld2:"

A block of code is set as follows:

package org.learningredis.chapter.two;

public class Helloworld2  {
  JedisWrapper jedisWrapper = null;
  public Helloworld2() {
    jedisWrapper = new JedisWrapper();
  }

  private void test() {
    jedisWrapper.set("MSG", "Hello world 2 ");
    
    String result = jedisWrapper.get("MSG");
    System.out.println("MSG : " + result);
  }

  
  public static void main(String[] args) {
    Helloworld2 helloworld2 = new Helloworld2();
    helloworld2.test();
  }
}

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Note the last line showing on the Command Prompt: The servers now ready to accept connections on port 6379."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.