Today we learn about redis Hash, What is it, Command of hash, Redis hashes is map or dictionaries data structure. Each hash in Redis is associated with a key, and the key can be used to access the value, add value, modify value or remove fields.
in short the Hashes in redis:
Key with named […]
Redis, renowned for its blazing-fast performance and versatile data structures, offers a myriad of tools for developers to architect robust and scalable applications. At the heart of Redis lies its string data type, a foundational element empowering developers to craft efficient and dynamic solutions.
Unleashing Versatility: Redis strings transcend mere text storage, serving as dynamic […]
Redis can automatically clean data from memory using keyword. we can tell Redis to remove data at seconds, milisecond and epoch time.
List Command to Key Expirations
TTL key : this comand return integer (seconds) expiration, -1 means key without TTL. exp: TTL totalemployee 19835 second= 5.50972222 hour IF we need to show expiry in […]
SET key value [NX | XX] GET [ EX | PX | EXAT | PXAT | KEEPTTL]
Let’s break down the options for the set commands in redis SET for save data key : key of value value : value of data optional keywords of SET (update, insert or update) NX : only set the […]
spring-boot-redis-jedis
Learning Spring boot using JEDIS
Prerequisites
Install Redis Stack Install Redis using Docker Script Install redis-stack on docker docker run -d –name redis-stack -p 6379:6379 -p 8001:8001 -e REDIS_ARGS=”–requirepass root” -v /path/your/local/machine:/data redis/redis-stack:latest
pom.xml
<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis-reactive</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>io.projectreactor</groupId> […]
Learn Selenium
Download Browser ( in my case, download chrome) Download Web Driver browser Chrome (note: make sure version driver same with browser) Let’s Code
pom.xml
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>4.15.0</version> </dependency>
App.java
package com.putracode; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import java.util.logging.Level; import java.util.logging.Logger; /** * Hello world! * */ public class App { public static […]
In previous section we learn creating user, keyspaces and managed table. Now we will learning how to insert, update, and deleting data in cassandra using cassandra.Operation DML ( Data Manipulation Language) similar to RDMS (Relational Database Management System). Using Keyword INSERT INTO for inserting data, keyword UPDATE table_name SET columns WHERE conditional for updating data, […]
Create, Alter and Drop Table Cassandra
Table in Cassandra is a collection of ordered (by name) columns fetched by row. A row consists of columns and have a primary key. The first part of the key is a column name. Subsequent parts of a compound key are other column names that define the […]
A keyspace is a container that holds the column families, user defined types. In Cassandra, Keyspace is similar to schema RDBMS Database. Keyspace holds column families, indexes, user defined types, data center awareness, strategy used in keyspace, replication factor, etc.
Syntax CREATE KEYSPACE | SCHEMA IF NOT EXISTS keyspace_name WITH REPLICATION = […]
In this tutorial we learn how to manage user in database cassandra. Setting the cassandra database using username and password authentication. Learn how to login using default username and password cassandra, create user with or without password, create user superuser and nosuperuser, modifying user and dropping user.
Create user
Syntax for create […]