MCPcopy Index your code
hub / github.com/distributedio/titan

github.com/distributedio/titan @v0.6.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.6.0 ↗ · + Follow
876 symbols 3,613 edges 86 files 515 documented · 59%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Titan

Build Status Go Report Card Coverage Status Coverage Status Discourse status

A distributed implementation of Redis compatible layer based on TiKV

Why Titan?

  • Completely compatible with redis protocol
  • Full distributed transaction with strong consistency
  • Multi-tenancy support
  • No painful scale out
  • High availability

Thanks TiKV for supporting the core features. The project is developed and open sourced by the Beijing Infrastructure Team at Meitu and has been donated to DistributedIO org.

Architecture

titan

Quick start

Can't wait to experiment Titan? Just follow 2 steps:

  1. curl -s -O https://raw.githubusercontent.com/distributedio/titan/master/docker-compose.yml
  2. docker-compose up

Then connect to titan use redis-cli

redis-cli -p 7369

Enjoy!

Installation

SetUp TiKV cluster

Titan works with 2 tidb components: * TiKV * Pd

To setup TiKV and PD, please follow official instruction

Run Titan

  • Build the binary
go get github.com/distributedio/titan
cd $GOPATH/src/github.com/distributedio/titan
make 
  • Edit the configration file
pd-addrs="tikv://your-pd-addrs:port"
  • Run titan
./titan

For more details about Deploy Titan, click here.

Benchmarks

Refer to the benchmark docs for more details. It is shared on Baidu Disks, use the code hzt6 to gain the permission.

Basic benchmarking result.

Get

Get command benchmark

Set

Set command benchmark

For more info, please vist here Titan Benchmarks

Commands supporting status

For fully supported command list vist here

command status
Connections Won't Fully Supported
Transactions Supported
Server Not Fully Supported Yet
Keys Supported
Strings Not Fully Supported Yet
List Not Fully Supported Yet
Hashes Supported
Sets Not Fully Supported Yet
Sorted Sets Not Fully Supported Yet
Geo Not Supported Yet
Hyperloglog Not Supported Yet
Pub/Sub Not Supported Yet
Scripting Not Supported Yet
Streams Not Supported Yet

FAQ

FAQ

Roadmap

View our Roadmap

Extension points exported contracts — how you extend this code

Decoder (Interface)
Decoder defines the interface of a RESP decoder [2 implementers]
encoding/codec.go
List (Interface)
List defines the list interface [2 implementers]
db/list.go
Command (FuncType)
Command is a redis command implementation
command/command.go
ListOption (FuncType)
ListOption customize how to get a list
db/db.go
Encoder (Interface)
Encoder defines the interface of a RESP encoder [1 implementers]
encoding/codec.go
OnCommit (FuncType)
OnCommit returns by TxnCommand and will be called after a transaction being committed
command/command.go
TxnCommand (FuncType)
TxnCommand runs a command in transaction
command/command.go

Core symbols most depended-on inside this repo

Error
called by 338
encoding/codec.go
Call
called by 303
command/command.go
flags
called by 95
command/constraint.go
AutoCommit
called by 82
command/command.go
String
called by 82
db/db.go
Integer
called by 78
command/command.go
Commit
called by 72
db/db.go
String
called by 62
command/constraint.go

Shape

Function 483
Method 304
Struct 69
TypeAlias 13
FuncType 4
Interface 3

Languages

Go100%

Modules by API surface

db/db.go33 symbols
tools/autotest/cmd/key.go32 symbols
encoding/resp/resp.go29 symbols
command/strings_test.go28 symbols
db/llist.go26 symbols
tools/autotest/cmd/string.go25 symbols
db/string.go24 symbols
command/strings.go24 symbols
db/hash_test.go23 symbols
db/hash.go22 symbols
tools/autotest/cmd/zset.go21 symbols
db/zlist.go20 symbols

For agents

$ claude mcp add titan \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact