How Redis scratched an itch — and changed databases forever

Why would you ever write a new database? Particularly an in-memory database, which, back in 2009, made zero sense to the ruling database class of the time. Salvatore Sanfilippo didn’t really care. He wasn’t trying to change anyone’s minds about what a database should be. He just needed to scale a real-time analytics engine, and MySQL couldn’t do so cost-effectively.

So he built Redis, as one does, and changed the database market forever.

[ Also on InfoWorld: Remember when open source was fun? ]
In a series of conversations with open source project founders like Sanfilippo over the past few weeks, I’ve been struck by how often they started with trying to answer a specific need — an “itch,” in the open source parlance — but ended up changing the way whole product categories work. They weren’t trying to be clever. They were just trying to be useful.

Which makes me wonder. If your organization is trying to figure out new ways to innovate, have you tried encouraging your employees to dive more deeply into open source?

Explore new things

Sometimes we get stuck in the comfortable routines of legacy technology. Sanfilippo said as much in a Twitter conversation, pointing out that it’s “possible to explore new things” in certain software fields even if everything looks “solved.” The relational database (RDBMS) market was somewhat stagnant for decades. Yes, we saw new functionality emerge, and even cool new open source databases (MySQL, PostgreSQL), but we kept shoving things into rows and columns because that was the “right way” to work with data.

Even though it wasn’t. Not always, at least. And maybe not even most of the time.

Yes, some data absolutely fits the relational model, particularly systems of record like an ERP system. But as the world has moved to systems of engagement, very little of that data is structured/semi-structured. The relational model requires data be flattened into two-dimensional, tabular structures. A document database like MongoDB, by contrast, offers a rich, dynamic data model that better fits with the structure of objects in modern programming languages.

This isn’t to say that one database is better than another; each does its job well. Rather, it’s to suggest that we wasted a lot of years trying to squeeze unstructured data into a relational format. We figured the database was a “solved” problem, as Sanfilippo put it. That mistake cost us significant amounts of productivity.

#redis #databases #twitter conversation

What is GEEK

Buddha Community

How Redis scratched an itch — and changed databases forever
Loma  Baumbach

Loma Baumbach

1596679140

Redis Transactions & Long-Running Lua Scripts

Redis offers two mechanisms for handling transactions – MULTI/EXEC based transactions and Lua scripts evaluation. Redis Lua scripting is the recommended approach and is fairly popular in usage.

Our Redis™ customers who have Lua scripts deployed often report this error – “BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE”. In this post, we will explain the Redis transactional property of scripts, what this error is about, and why we must be extra careful about it on Sentinel-managed systems that can failover.

Redis Lua Scripts Diagram - ScaleGrid Blog

Transactional Nature of Redis Lua Scripts

Redis “transactions” aren’t really transactions as understood conventionally – in case of errors, there is no rollback of writes made by the script.

Atomicity” of Redis scripts is guaranteed in the following manner:

  • Once a script begins executing, all other commands/scripts are blocked until the script completes. So, other clients either see the changes made by the script or they don’t. This is because they can only execute either before the script or after the script.
  • However, Redis doesn’t do rollbacks, so on an error within a script, any changes already made by the script will be retained and future commands/scripts will see those partial changes.
  • Since all other clients are blocked while the script executes, it is critical that the script is well-behaved and finishes in time.

The ‘lua-time-limit’ Value

It is highly recommended that the script complete within a time limit. Redis enforces this in a weak manner with the ‘lua-time-limit’ value. This is the maximum allowed time (in ms) that the script is allowed to run. The default value is 5 seconds. This is a really long time for CPU-bound activity (scripts have limited access and can’t run commands that access the disk).

However, the script is not killed when it executes beyond this time. Redis starts accepting client commands again, but responds to them with a BUSY error.

If you must kill the script at this point, there are two options available:

  • SCRIPT KILL command can be used to stop a script that hasn’t yet done any writes.
  • If the script has already performed writes to the server and must still be killed, use the SHUTDOWN NOSAVE to shutdown the server completely.

It is usually better to just wait for the script to complete its operation. The complete information on methods to kill the script execution and related behavior are available in the documentation.

#cloud #database #developer #high availability #howto #redis #scalegrid #lua-time-limit #redis diagram #redis master #redis scripts #redis sentinel #redis servers #redis transactions #sentinel-managed #server failures

How Redis scratched an itch — and changed databases forever

Why would you ever write a new database? Particularly an in-memory database, which, back in 2009, made zero sense to the ruling database class of the time. Salvatore Sanfilippo didn’t really care. He wasn’t trying to change anyone’s minds about what a database should be. He just needed to scale a real-time analytics engine, and MySQL couldn’t do so cost-effectively.

So he built Redis, as one does, and changed the database market forever.

[ Also on InfoWorld: Remember when open source was fun? ]
In a series of conversations with open source project founders like Sanfilippo over the past few weeks, I’ve been struck by how often they started with trying to answer a specific need — an “itch,” in the open source parlance — but ended up changing the way whole product categories work. They weren’t trying to be clever. They were just trying to be useful.

Which makes me wonder. If your organization is trying to figure out new ways to innovate, have you tried encouraging your employees to dive more deeply into open source?

Explore new things

Sometimes we get stuck in the comfortable routines of legacy technology. Sanfilippo said as much in a Twitter conversation, pointing out that it’s “possible to explore new things” in certain software fields even if everything looks “solved.” The relational database (RDBMS) market was somewhat stagnant for decades. Yes, we saw new functionality emerge, and even cool new open source databases (MySQL, PostgreSQL), but we kept shoving things into rows and columns because that was the “right way” to work with data.

Even though it wasn’t. Not always, at least. And maybe not even most of the time.

Yes, some data absolutely fits the relational model, particularly systems of record like an ERP system. But as the world has moved to systems of engagement, very little of that data is structured/semi-structured. The relational model requires data be flattened into two-dimensional, tabular structures. A document database like MongoDB, by contrast, offers a rich, dynamic data model that better fits with the structure of objects in modern programming languages.

This isn’t to say that one database is better than another; each does its job well. Rather, it’s to suggest that we wasted a lot of years trying to squeeze unstructured data into a relational format. We figured the database was a “solved” problem, as Sanfilippo put it. That mistake cost us significant amounts of productivity.

#redis #databases #twitter conversation

Ruth  Nabimanya

Ruth Nabimanya

1621219080

Redis vs. Memcached: 2021 Comparison

Redis stands for REmote DIctionary Server, created in 2009 by Salvatore SanfilippoMemcached, on the other hand, was created in 2003 by Brad Fitzpatrick. Both Redis and Memcached are:

  • NoSQL in-memory data structures
  • Written in C
  • Open source
  • Used to speed up applications
  • Support sub-millisecond latency

In 2014, Salvatore wrote an excellent StackOverflow post on when it makes more sense to use Memcached than Redis. In this post, we provide a current and detailed comparison between Redis and Memcached so that you can make an informed choice about their use in your application.

#redis #dba #database administration #memcached #database administrator #redis alternative #database comparison #redis news

Ruth  Nabimanya

Ruth Nabimanya

1620633584

System Databases in SQL Server

Introduction

In SSMS, we many of may noticed System Databases under the Database Folder. But how many of us knows its purpose?. In this article lets discuss about the System Databases in SQL Server.

System Database

Fig. 1 System Databases

There are five system databases, these databases are created while installing SQL Server.

  • Master
  • Model
  • MSDB
  • Tempdb
  • Resource
Master
  • This database contains all the System level Information in SQL Server. The Information in form of Meta data.
  • Because of this master database, we are able to access the SQL Server (On premise SQL Server)
Model
  • This database is used as a template for new databases.
  • Whenever a new database is created, initially a copy of model database is what created as new database.
MSDB
  • This database is where a service called SQL Server Agent stores its data.
  • SQL server Agent is in charge of automation, which includes entities such as jobs, schedules, and alerts.
TempDB
  • The Tempdb is where SQL Server stores temporary data such as work tables, sort space, row versioning information and etc.
  • User can create their own version of temporary tables and those are stored in Tempdb.
  • But this database is destroyed and recreated every time when we restart the instance of SQL Server.
Resource
  • The resource database is a hidden, read only database that holds the definitions of all system objects.
  • When we query system object in a database, they appear to reside in the sys schema of the local database, but in actually their definitions reside in the resource db.

#sql server #master system database #model system database #msdb system database #sql server system databases #ssms #system database #system databases in sql server #tempdb system database

Siphiwe  Nair

Siphiwe Nair

1625133780

SingleStore: The One Stop Shop For Everything Data

  • SingleStore works toward helping businesses embrace digital innovation by operationalising “all data through one platform for all the moments that matter”

The pandemic has brought a period of transformation across businesses globally, pushing data and analytics to the forefront of decision making. Starting from enabling advanced data-driven operations to creating intelligent workflows, enterprise leaders have been looking to transform every part of their organisation.

SingleStore is one of the leading companies in the world, offering a unified database to facilitate fast analytics for organisations looking to embrace diverse data and accelerate their innovations. It provides an SQL platform to help companies aggregate, manage, and use the vast trove of data distributed across silos in multiple clouds and on-premise environments.

**Your expertise needed! **Fill up our quick Survey

#featured #data analytics #data warehouse augmentation #database #database management #fast analytics #memsql #modern database #modernising data platforms #one stop shop for data #singlestore #singlestore data analytics #singlestore database #singlestore one stop shop for data #singlestore unified database #sql #sql database