For more general and professional alternative: GNS3

Cisco packet tracer is a powerful network simulation tool for free. It helps:

  • Practice building simple and complex networks.
  • Visualize how a network works.
  • Practice rack, stack and cabling skills in the virtual labs.
  • Integrate IoT devices, Python code or network automation.

Courses

Go to course website and register to kick off:

https://www.netacad.com/courses/packet-tracer

I have completed the Getting Started course.

What is PTTA

This is a form of the interactive toturial with hints provided along the way.

File Type

  • .pka: activity for initial and answer network.
  • .pkt: for simulated network built and saving.
  • .pksz: for PTTA tutorial.
  • .pkz: deprecated file type.

Cable Type

There are 2 copper cable types provided in packet tracer:

  • Straight-Through cable: connect two devices of different types.
  • Cross-Over cable: connect two devices of the same type.

Issues

DHCP Failed. APIPA is being used

It is odd that sometimes PC and Home router connection with cable results in failure: DHCP Failed. APIPA is being used, if I switch to wireless connection, it works good.

Solution:

  • Wait until Home router is fully up, delete PC cable connection, power cycle the PC, reconnect and set DHCP again.
  • Use wireless connection.

It is important to collect data or feedback by surverying, Google Form is a handy tool for questionnaire, you can create it through:

Some highlights:

  • There are tons of template for reference.
  • For widgets such as Multiple choice and Dropdown, you can set up logic to go to specified sections based on answer selected.
  • Preview mode to test form before release.
  • Disable accepting response from Response section to close the survey when necessary.

For complex testing, the testify module is a big life saver, it has 4 main packages: assert, require, mock and suite. Their usages are quite straightforward from the testify README file.

There is a series of tutorial about how to use testify, pretty helpful.

Here in this blog I highlight the parts that are important to me.

Mock Objects Generation

Regarding mock, to create mocking objects for external dependencies, we use mockery to generate mock objects from go interface.

Thus to write testable code in Go, thinking about how to use interface properly.

Install mockery binary:

1
2
3
# Check current release tag and use it
# The mockery binary will be downloaded to $(go env GOPATH)/bin
go install github.com/vektra/mockery/v2@v2.20.0

Mock objects generation command:

1
2
3
4
5
6
7
# If you are using mockery binary downloaded, run it from the repo with absolute
# path.
# This will create a "mocks" folder in current directory and generate a mock
# file named as HelloWorld.go.

# HelloWorld is the interface name inside student folder
/<path to mockery parent folder>/mockery --dir student --name HelloWorld

Other flags please see mockery --help.

Or using docker:

1
2
3
docker run --rm -v $(pwd):/src \
-w /src \
vektra/mockery:v2.20.0 --dir student --name HelloWorld

Then in your test go file, import the mocks package and use it.

Suite

The suite helps the testing lifecycle management, for example, it provides setup/teardown stage for test cases.

For example the basic suite structure:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import (
"context"
"example.com/mocks"

"github.com/stretchr/testify/suite"
)

type ExploreWorldSuite struct {
suite.Suite
// from mocks package
hw *mocks.HelloWorld
// from current package
std *Student
// other utilities
ctx context.Context
}

// Reset for every test case
func (s *ExploreWorldSuite) SetupTest() {
// The HelloWorld.go mock file contains NewHelloWorld func
s.hw = mocks.NewHelloWorld(s.T())
s.ctx = context.TODO()
std = &Student {
Id: 1991,
Name: "cheng",
}
}

// All methods that begin with "Test" are run as tests within a suite.
func (s *ExploreWorldSuite) TestSayHello() {
// mock Say method inside the HelloWorld interface
s.hw.On("Say", mock.Anything, "World").Return(nil).Once()

// FirstTimeMeet calls Say method from HelloWorld interface
got := s.std.FirstTimeMeet(s.ctx)

// There are lots more helper methods, use properly
s.Require().True(got)
// This can be helpful if the calling func does not have return or obvious
// side effect
s.hw.AssertExpectations(s.T())
}

// In order for 'go test' to run this suite, we need to create a normal test
// function and pass our suite to suite.Run
func TestExploreWorldSuite(t *testing.T) {
suite.Run(t, new(ExploreWorldSuite))
}

The commonly used assertions:

1
2
3
4
5
6
7
8
s.Require().Nil(err)
s.Require().NotNil(err)
// although not recommended to rely on error message
s.Require().Contains(err.Error(), "xxxxxx")
s.Require().EqualError(err, "xxxxxx")

s.Require().Len(rcs, 5)
s.Require().EqualValues(pt, "xxxxxx")

Run Test

To run suite, using the same go test command:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# To run the whole package test suites
go test -v -buildvcs=false -mod=readonly \
example.com/student

# To run specific suite in package
go test -v -buildvcs=false -mod=readonly \
example.com/student \
-run <suite struct name regexp>

# to run test against the vendor folder
# -mod=vendor
go test -v -buildvcs=false -mod=vendor \
example.com/student \
-run <suite struct name regexp>

# to run specified tests in specific suite
# -run and -testify.m have to be after package
go test -v -buildvcs=false -mod=readonly \
example.com/student \
-run <suite struct name regexp> \
-testify.m <test name regexp>

# to run test without prior cache
# -count 1
go test -v -buildvcs=false -mod=readonly \
-count 1 \
example.com/student \
-run <suite struct name regexp> \
-testify.m <test name regexp>

For how to use testify packages for complex testing, please see <<Go Unittest by testify>>.

Golang has provided built-in testing framework composed of go test command and testing package, here is simple example:

https://go.dev/doc/code#Testing

Table Driven

In go test we usually use table-driven style, where test inputs and expected outputs are listed in a struct and a loop to walk through them, for example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
func TestXxx(t *testing.T) {
for _, test := range []struct{
name string
input int
expectedResult int
wantErr bool
err error
wantErrKeyword string
}{
{
name: "normal test",
input: 10,
expectedResult: 20,
wantErr: false,
},
}{
t.Run(test.name, func(t *testing.T){
// test code
})
}
}

Folder for Test Data

For large test data that needs to be read from outside, the go tool will ignore a directory named testdata, making it available to hold ancillary data needed by the tests.

TestMain

If the test code contains a function:

1
2
3
4
5
6
7
func TestMain(m *testing.M) {

// call at end
m.Run()
// previously requires the os.Exist
// https://github.com/golang/go/issues/34129#issuecomment-537598931
}

that function will be called instead of running the tests directly, this may come in handy when you need to do some global set-up/tear-down for your tests, see this example.

Run Test

To run test for specific packge:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# ./... means all packages in this directory (and subdirectories)
go list ./...

# For example the output would be:
example.com/fruit
example.com/world
example.com/zoo

# If you want to run specific tests, such as: "TestHelloWorld", "TestExitWorld"
# in example.com/world package:

# -race: for multi-thread program testing, may not need it
go test -buildvcs=false \
-mod=readonly \
-v -race\
-run "HelloWorld|ExitWorld" \
example.com/world

# To test all packages in the current or sub directories
go test -buildvcs=false \
-mod=readonly \
-v -race \
./...

If you have build tags such as “integration”, “mock” in your test or dependency files head for example:

1
2
// +build integration
// +build mock

To include these taged test files in testing, please use -tags flag:

1
2
3
4
5
6
go test -buildvcs=false \
-mod=readonly \
-v -race \
-tags "integration mock" \ # use space to separate tags
-run "HelloWorld|ExitWorld" \
example.com/world

If you don’t specify the correct -tags then you will get error like:

1
2
3
imports example.com/common.git/cassandra/setup:
build constraints exclude all Go files in
/usr/local/xxx/example.com/gcloud/cs-common-gc.git/cassandra/setup

The -buildvcs, -mod, -race, -tags are build tags from go help build. There is logic to combine and use multiple tags, please see Build Tag Boolean Logic.

NOTE that the go test will always run the test files that don’t have any build tag irrespective of -tags specified or not.

Other test tags please see go help testflag.

Test Coverage

For simplified coverage display only, just use -cover flag:

1
go test -cover ./...

To generate coverage profile for detailed bad coverage analysis:

1
2
3
4
5
6
7
8
9
10
11
12
# Generate simple coverage.out profile
# -covermode=set by default
go test -coverprofile=coverage.out ./...
# Generate coverage with count for each statement.
# flag -race will use covermode=atomic
go test -covermode=count -coverprofile=coverage.out ./...

# Without -o, the output goes to stdout
# Convert to html and you can open via browser
go tool cover -html=coverage.out -o coverage.html
# Coverage for each function
go tool cover -func=coverage.out -o coverage.func

If you use -covermode=count and then go tool the html will show you the intensity of the statements calling count, hover the mouse over the line to see the actual counts.

More details about cover please see this go blog <<The cover story>>.

CAUTION: When using VSC editor, please open the root directory of that go module instead of a parent directory that contains many go modules/projects, otherwise the editor will not work as expected.

There are several situations of importing package to use in your code:

  1. Importing package from the same local module.
  2. Importing package from remote module.
  3. Importing package from a different local module .

For #1 and #2, the steps are described in How to Write Go Code, this article also explains what are go package and module and the code organization.

For example, I have a go module with below file structure:

1
2
3
4
5
6
hello/
|-services/ # services package
|- service1.go # (define struct A with exported methods)
|- service2.go # (define other exported methods for struct A)
|-hello.go # main package
|-go.mod

The module name is example.com/hello, the services folder holds a separate package serivces(with 2 go files service1 and service2), main package is defined in hello.go.

If run go list ./... from hello folder, will get 2 packages:

1
2
3
# go list ./...
example.com/hello
example.com/hello/services

The hello.go imports and uses services package would be:

1
import "example.com/hello/services"

For package imported from remote module, the downloaded module is in pkg/mod subdirectory of the directory indicated by the GOPATH environment variable. To remove all downloaded modules, run:

1
go clean -modcache

For #3, please see Call your code from another module

For example, I have 2 go modules with below file structure:

1
2
3
4
5
6
7
8
9
# Module name: example.com/fruit
|- fruit/
|- apple.go # package apple with ReturnApple func
|- peach.go # package peach with ReturnPeach func
|- go.mod
# Module name example.com/hello
|- hello/
|-hello.go # package main
|-go.mod

In the hello.go:

1
2
3
4
5
6
7
8
9
10
import (
"fmt"
"example.com/fruit/apple"
"example.com/fruit/peach"
)

func main() {
fmt.Println(apple.ReturnApple())
fmt.Println(peach.ReturnPeach())
}

To make the import for apple and peach work, we need to edit the go.mod file in hello folder:

1
2
3
# In hello folder
go mod edit -replace example.com/fruit=../fruit
go mod tidy

The hello go.mod file will be something like:

1
2
3
4
5
6
7
8
module example.com/hello

go 1.18

require (
example.com/fruit v0.0.0-00010101000000-000000000000
)
replace example.com/fruit => ../fruit

There is a better alternative, please see <<VSC Developing inside a Container>>.

This post talks about how to install multiple go binaries in the same machine and switch back and forth easily.

You may need a primary go version for daily work. Download and install go for different operating system from here:

The instruction will put the download to /usr/local/go, for multi-version install below, they are downloaded to different folder so there is no conflict.

If you need to install other go versions in the same machine:

First, there are 2 go env variables involved:

  • GOROOT is for compiler/tools.
  • GOPATH is for your own go projects and 3rd party libraries (downloaded with go get/install).

You can check their value by:

1
2
go env GOROOT
go env GOPATH

The go install location is controlled by the GOBIN and GOPATH environment variables depends their existence, in the order:

  • If GOBIN is set, binary is installed at that directory.
  • If GOPATH is set, binary is installed at the bin subdirectory of the first path in the GOPATH list, otherwise binary is installed to the bin subdirectory of the default GOPATH ($HOME/go).
1
go install golang.org/dl/go1.10.7@latest

Go to $GOPATH/bin to find the downloaded object and run:

1
go1.10.7 download

From output, 1.10.7 version go binary will be downloaded to $GOPATH/../sdk folder.

To use the downloaded version, we can update the PATH environment variable:

1
export PATH=/usr/local/google/home/<user>/sdk/go1.10.7/bin:$PATH

NOTE that if there are many go versions, must set the target go bin path at the beginning of PATH, the GOROOT will be automatically set according to first go bin in the PATH.

Then verifying by running:

1
2
3
4
5
# go version
go version go1.10.7 linux/amd64

# go env GOROOT is updated changed accordingly to 1.10.7 bin path
/usr/local/google/home/<user>/sdk/go1.10.7

To recover original setting, just revert the PATH environment variable.

For my personal interest and speaking.

Fujian carrier and latest news

  • the new photo surfaces on internet showing…
  • medium size stealth/stelθ/ fighter
  • this is mostly likely a mockup of J35 for deck and hanger testing: a model or replica of a machine or structure
  • the j35 is believed to be still under flight trials
  • the photo also shows a test vehicle for the electromagnetic catapult, this vehicle has been launched few times by the catapult
  • landing arrest cables are installed
  • the carrier is almost complete and getting ready for sea trial
  • early warning and control aircraft KJ600
  • the carrier will be handed over to chinese navy around end of this year

Y-8 cashed and badly damaged

  • the transport aircraft completed 2 airlifts: an act of transporting supplies by aircraft
  • the closure of the airport followed the crash disrupts the travel plan

what does the fly of J-20 feel like

  • share fascinating insights about
  • wanghai brigade/brɪˈɡeɪd/ of chinese air force: 旅/大队
  • these maneuvers/məˈnuːvər/ really push the pilots to their limit: a movement or series of moves requiring skill and care

J35 flighter new proto

  • the removal of the nose testing tube indicating significant progress in its test flights
  • this aircraft is designated with number xxx
  • this design precludes a side missle bay due to increased internal space requirements
  • mitigate the radar reflection
  • tail arrest hook

flight deck painted, sea trial expected

  • the coating/kot/ of flight deck has been applied
  • the carrier will soon undergo its first sea trial: experience, typically sth unpleasant

To reuse role in a playbook, there are 3 options:

  • roles: at play level, statically, executed before tasks.
  • include_role: at task level, dynamically, parsed and executed at where it is defined.
  • import_role: at task level, statically, parsed before the calling play execution and if no syntax error executed at where it is defined.

Regarding statically and dynamically above, there is explanation.

Example snippet for role reusing:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- hosts: all
gather_facts: no
any_errors_fatal: true
become: true
roles:
# The same as import_role module.
- <role1 name>
- <role2 name>

tasks:
# Dynamiaclly load, parse and run role in playbook where it is defined.
- name: Include role
include_role:
name: <role name>

# Statically load role, the same as 'roles' clause that will parse the
# imported role before playbook runs, it will fail the playbook if there is
# any syntax error.
- name: Import role
import_role:
name: <role name>

Greetings

  • Hi there!

  • How are things going?

  • How is your week/day going?

  • What are you working on recently?

  • What did you do over the weekend?

  • Any exciting plans for the weekend/hoilday?

  • Any plan on the upcoming weekend?

  • I haven’t seen you in years!

  • Long time no see!

  • Welcome back, it’s been a while!

  • Where have you been?

  • What a suprise to meet you here!

  • fancy meeting you here!

  • I am sorry, I haven’t forgetten your name

  • what brings you here?

Answer thanks for asking this

  • you are welcome, I hope everything is going well with your family.

Expressing state of health and happiness

  • I am cool
  • couldn’t be better
  • All right
  • No complaints/kəmˈpleɪnt/

How you have been doing - positive

  • Keep myself busy
  • Keep myself out of trouble

Neutral/ˈnuːtrəl/

  • so-so
  • same as always/usual

Negative

  • Not very well
  • Could be better
  • I am feeling low
  • I am depressed
  • I am out of sorts

Busy state

  • I don’t have time to think/breathe/briːð/

Inviting

  • do you have time for coffee?
  • let’s go for a drink

Introduction

  • I’d like you to meet xx
  • have you two been introduced?

Ending conversation

  • nice chatting with you, but I really must go

  • let’s do lunch sometime(改天,某时)

  • need to go now, we will talk sometime

  • can I call you back? something has come up (not come up with!)

  • have to get back to my work, will call again later

  • I will let you go/drop, no reason to keep you here

  • I am out of time, have to say good-bye now

Leaving a place

  • are we ready to leave?
  • drive carefully
  • take care

Agreeing

  • yup
  • I couldn’t agree with you more

Acceptance

  • this is perfect
  • it couldn’t be better

You understand

  • I hear/got you
  • Gotcha

You understand?

  • Do you know/see what I mean?
  • Do you get the picture?

Disagreeing

  • I don’t think so
  • Don’t jump/rush to conclusions

Categorical/ˌkætə’ɡɔrɪkl/ disagree: unambiguously explicit and direct

  • that’s not true

  • you are dead wrong

  • that’s insane/ɪnˈseɪn/, crazy

Rejection

  • it’s not for me
  • it’s not my style

Coming to the point of matter

  • let me be perfectly clear
  • here’s the bottom line: major point

Requesting the speaker get to the point

  • what’s the bottom line?
  • what’s your point?

Noting a digression/ai/ in a conversation

  • that’s irrelevant
  • that’s another story
  • off-topic
  • you are getting off the topic
  • getting back to the point

Repeat

  • let me repeat myself

  • to reiterate, xxx

  • let me rephrase that

Answer how do you know

  • news travels fast (rumor, gossip)

Social join

  • is the seat taken?
  • are you free saturday evening?

Encouraging to try something

  • let’s see some action
  • are you just going to stand there all day?

Be patient and take things slowly

  • take things as they come
  • one step at a time, do it slowly

Be prudent/ˈpruːdnt/

  • cautious/careful/thoughtful
  • vs deliberate(more negative)

too busy

  • you are overcommitted
  • you are overdoing it: exhaust oneself by overwork

Forgetfulness

  • Where was I?
  • I have lost my thought
  • brain freeze

No money

  • my pockets are empty
  • I am bankrupt

Stress and anxiety

  • I am going crazy

  • I am burning out

  • I am on fire

  • calm/kɑːm/ down

  • slow down

  • don’t lose sleep over it

Stating that sth is settled

  • it is certain
  • nothing can go wrong
  • it is going to happen

Claim/eim/ sth is easy to understand

  • of course, that goes without saying

Showing disbelief

  • I remain skeptical
  • unbelievable

Expressing reluctance

  • I’d rather not
  • I’m afraid not

Knowing something after the fact

  • I should have known
  • it is easy to be wise after the event

Expressing indifference: lack of interest

  • I don’t care
  • either way
  • it does not matter to me
  • makes no difference to me
  • up to you
  • whatever you prefer

Response to request

  • as you requested …
  • with your comfort in mind …

Asking if speaking a language

  • do you speak english?

tell time

  • it is 12 noon

  • it is noon

  • it is midnight

  • it is 10 after three

  • it is 10 past three

  • it is three 15

  • it is three 30

  • it is 10 mins to four

Time accurate

  • the clock is fast/slow

Moving pass

  • coming throuth
  • could I get by, please
  • after you

forgiveness

  • it’s ok, forget it
  • don’t worry about it

Invited

  • how should I dress? casual or formal

  • do I need to bring anything?

  • I’ll be there by 7pm

  • sorry I am late

  • sorry to have kept you waiting

Inviting

  • please make yourself at home
  • make yourself comfortable
  • the food is over there, please help yourself

Late

  • I lost track of time

  • I overslept

  • I got detoured/ˈdiːtʊr/

  • the last meeting ran over, so I am running late for my next appointment

  • I had to run an errand/ˈerənd/, personal errand

  • The bus was late

  • I’m glad you started without me

  • you should have started without me

Weather

  • The air is muggy/humid/ˈhjuːmɪd/
  • what a snowstorm/blizzard/'blɪzɚd/
  • it is foggy, smoggy
  • it is windy
  • it is sweltering/ˈs well tərɪŋ/: uncomfortably hot
  • turn on the air conditioner

Crowded place

  • I’m getting claustrophobic/ˌklɔːsterˈfoʊbɪk/
  • There’s no room to breathe/ri/
  • Would you like to go somewhere less crowded?

Preparing to leave home

  • do we have everything?

Return soon

  • I’ll be gone just a few minutes.
  • I’ll be back by ten.

Preparing to leave a host or hostess

  • Time flies when you’re having fun.
  • Thank you for having/inviting us.

Saying good-bye to departing guests

  • It is been delightful/dɪˈlaɪtfl/
  • We have to do this again sometime.

Leaving things as they are

  • let things/it be

Warnings

  • watch out!
  • Be prepared!
  • On your left!
  • Caution!
  • Coming through 借过

Giving and receiving

  • What goes around, comes around. 种豆得豆,种瓜得瓜
  • One thing leads to another. 一发不可收拾

nostalgia/nəˈstældʒə/

  • when I was your age …

additional unspecified things

  • and so on so forth

out of order

  • it is out of order/service: not working properly, not in a correct sequence.

  • it is out of commission: not in working order, not in service

  • out of: 1. source; 2. not having

concerning difficult

  • it is not easy as it seems

physical feelings

  • sneezy 喷嚏
  • itchy /'ɪtʃi/
  • allergy/'ælɚdʒi/, allergic/əˈlɜːrdʒɪk/
  • vomit/'vɑmɪt/ 呕吐
  • headache
  • dizzy 晕眩的
  • nap/næp/

asking for food

  • what’s to eat?
  • what are we having?

secind servings

  • more water, please
  • what’s for dessert/dɪˈzɜːrt/ (vs desert)
  • my friend will be along shortly: be arrive

restaurants

  • a nonsmoking table for two

  • we are waiting for another couple/ˈkʌpl/.

  • I’m sorry, we’re out of that. (stock out)

  • need a couple more minutes to decide.

  • ready to order.

  • steak: rare, medium-rare, medium, medium-well, well-done

  • carryout/to go, please

Personal

  • Nice weahter we’re having

  • The food is good, isn’t it?

  • when did you arrive?

  • where are you from?

  • How did you get here, flight or driving?

  • Where did you go to school, what major you learned?

  • What do you do for work?

  • Do you have family here? How is your family?

  • How long have you lived at your current location? What do you like about it?

  • How long have you worked at your current job?

  • Have you ever been to xxx?

  • Do you have any pets? What kind?

  • Do you have any hobbies you enjoy in your free/leisure time?

  • what’s your biggest passion outside of work?

  • Have you seen any good movies or TV shows recently?

  • Have you tried any interesting apps or gadgets/ˈɡædʒɪt/ recently?

  • Do you have any favorite artists or types of art?

  • Where did you get that xxx ? I really like it!

Notable

  • What are your five most unique experiences?
  • What are your five most personally significant accomplishments?
  • Name the 10 things you cannot live without?
  • What is the biggest regret/rɪˈɡret/ in your career?
  • What is your biggest lesson learned in your career?

Staying current:

  • What are the top five current events of the week and month? Learn the basic and develop an opinion and stance/stæns/ on them.
  • have you heard the latest?
  • What are the four most funny personal situations from the past week?
  • What are the four interesting things you have heard or read about in past week?

Redis Introduction

Redis is an open source (BSD licensed), in-memory data structure store used as a database, cache, message broker, and streaming engine. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing an element to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set.

You can learn from Redis university.

Codelab

Dockerhub Redis: https://hub.docker.com/_/redis.

To try Redis in a quick way, spinning up a server and client instance separately in the same docker network(You can also use docker compose to assemble them):

1
2
3
4
5
6
7
8
9
10
11
12
# Create default bridge network for Redis instances.
docker network create redis-network

# Create Redis server using default config with port 6379.
docker run -d --network redis-network \
--name redis-server \
redis:latest

# Create Redis client and connect to redis-server with port 6379 by default.
docker run -it --network redis-network \
--name redis-client \
redis:latest redis-cli -h redis-server

From the client terminal, try example commands.

The usage of other commands please start with Data Types(below section) and explore comprehensive commands here.

Client Libraries

Client libraries for various languages.

Data Types

The supported data types

Usage Cases

Cache

Redis can perform different roles based on user demands, the caching is one key role from them, please see client side caching and eviction strategies for reference.

In-Memory DB with Persistence

Redis can persist the data with different mechanism.

Message Broker

Redis also provides pub/sub functionality,

[ ] vs Stream data type?

Other Extensions

Redis can be extended to fit more roles, for example, storing and query JSON objects like Mongodb, full-text search as Elasticsearch , graph DB like Neo4j, please see here for details.

0%