MCPcopy Index your code
hub / github.com/arana-db/arana

github.com/arana-db/arana @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
4,490 symbols 15,961 edges 563 files 1,100 documented · 24% updated 1y agov0.2.0 · 2023-09-30★ 29860 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Arana

<img src="https://raw.githubusercontent.com/arana-db/arana/master/docs/pics/arana-main.png"/>

Arana is a Cloud Native Database Proxy. It can be deployed as a Database mesh sidecar. It provides transparent data access capabilities, when using Arana, user doesn't need to care about the sharding details of database, they can use it just like a single MySQL database.

Overview

License codecov Go Report Card Release Docker Pulls

Stargazers Over Time Contributors Over Time
Stargazers over time Contributor over time

Introduction | 中文

First, Arana is a Cloud Native Database Proxy. It provides transparent data access capabilities, when using Arana, user doesn't need to care about the sharding details of database, they can use it just like a single MySQL database. Arana also provide abilities of Multi Tenant, Distributed transaction, Shadow database, SQL Audit , Data encrypt / decrypt and so on. Through simple config, user can use these abilities provided by Arana directly.

Second, Arana can also be deployed as a Database mesh sidecar. As a Database mesh sidecar, arana switches data access from client mode to proxy mode, which greatly optimizes the startup speed of applications. It provides the ability to manage database traffic, it takes up very little container resources, doesn't affect the performance of application services in the container, but provides all the capabilities of proxy.

Architecture

Features

Feature Complete
Single DB Proxy
Read Write Splitting
Sharding
Multi Tenant
Distributed Primary Key
Shadow Table
Tracing / Metrics
Distributed Transaction WIP
Database Mesh WIP
SQL Audit WIP
Data encrypt / decrypt Roadmap
SQL LIMITER Roadmap

Getting started

Please reference this link Getting Started

arana start -c ${configFilePath}

Prerequisites

  • Go 1.20+
  • MySQL Server 5.7+

Design and implementation

Roadmap

Built With

  • TiDB - The SQL parser used

Contact

Arana Chinese Community Meeting Time: Every Saturday At 9:00PM GMT+8

Contributing

Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the Arana project.

Developer

Thanks to all developers!

License

Arana software is licenced under the Apache License Version 2.0. See the LICENSE file for details.

Extension points exported contracts — how you extend this code

Valuer (Interface)
Valuer represents a generator or value. [6 implementers]
pkg/proto/function.go
Scanner (Interface)
Scanner is an interface used by Scan. [7 implementers]
pkg/mysql/utils.go
Node (Interface)
Node represents a ast node. [29 implementers]
pkg/runtime/ast/visitor.go
Center (Interface)
Center Configuration center for each tenant, tenant-level isolation [6 implementers]
pkg/config/api.go
PeekableDataset (Interface)
PeekableDataset represents a peekable dataset. [3 implementers]
pkg/dataset/dataset.go
Swapper (Interface)
A subset of sort.Interface used for random shuffle. [3 implementers]
pkg/util/rand2/rand2.go
Aggregator (Interface)
(no doc) [4 implementers]
pkg/merge/aggregator.go
Store (Interface)
Store represents the backend K/V storage Each store should support every call listed here. Or it couldn't be implemented [1 …
pkg/registry/store/store.go

Core symbols most depended-on inside this repo

NewValueString
called by 1441
pkg/proto/value.go
NewValueFloat64
called by 851
pkg/proto/value.go
WriteString
called by 441
pkg/mysql/rows/codec.go
NewValueInt64
called by 387
pkg/proto/value.go
Restore
called by 239
pkg/runtime/ast/restore.go
Run
called by 227
pkg/runtime/transaction/fault_decision.go
String
called by 215
pkg/runtime/cmp/cmp.go
Errorf
called by 212
pkg/util/log/logging.go

Shape

Method 2,437
Function 1,248
Struct 615
TypeAlias 86
Interface 83
FuncType 21

Languages

Go100%

Modules by API surface

pkg/runtime/ast/visitor.go116 symbols
pkg/runtime/ast/show.go98 symbols
pkg/proto/value.go98 symbols
testdata/mock_runtime.go90 symbols
pkg/config/mock/mock_config.go78 symbols
pkg/runtime/ast/model.go67 symbols
pkg/runtime/ast/ast.go66 symbols
testdata/mock_data.go64 symbols
pkg/util/log/logging.go64 symbols
pkg/runtime/tx.go61 symbols
pkg/runtime/ast/expression_atom.go61 symbols
pkg/mysql/utils.go60 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

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

⬇ download graph artifact