{"id":29571914,"url":"https://github.com/oceanbase/modis","last_synced_at":"2026-05-17T18:01:46.107Z","repository":{"id":236680394,"uuid":"792183927","full_name":"oceanbase/modis","owner":"oceanbase","description":"Modis implements access layer and data struct layer for OBKV, compatible with Redis protocol.","archived":false,"fork":false,"pushed_at":"2024-11-19T08:57:12.000Z","size":274,"stargazers_count":9,"open_issues_count":2,"forks_count":7,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-19T08:09:54.690Z","etag":null,"topics":["database","golang","kv"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oceanbase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-26T06:34:27.000Z","updated_at":"2024-09-19T09:16:44.000Z","dependencies_parsed_at":"2024-05-29T04:46:17.083Z","dependency_job_id":"5c0ce882-78b3-45ed-9e5a-3d0feb6b38be","html_url":"https://github.com/oceanbase/modis","commit_stats":null,"previous_names":["oceanbase/modis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oceanbase/modis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fmodis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fmodis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fmodis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fmodis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oceanbase","download_url":"https://codeload.github.com/oceanbase/modis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fmodis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33149519,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","golang","kv"],"created_at":"2025-07-19T04:36:35.351Z","updated_at":"2026-05-17T18:01:46.089Z","avatar_url":"https://github.com/oceanbase.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modis\nModis implements access layer and data struct layer for [OBKV](https://github.com/oceanbase/obkv-table-client-go), compatible with Redis protocol.\n\n\n## Quick Start\nBuild Modis\n``` bash\nbash build_modis.sh\n```\n\nCreate table in the OceanBase database:\n\n``` sql\n-- string\ncreate table modis_string_table(\n  db bigint not null,\n  rkey varbinary(16384) not null, # 16K\n  value varbinary(1048576) not null, # 1M\n  expire_ts timestamp(6) default null,\n  primary key(db, rkey)) \n  TTL(expire_ts + INTERVAL 0 SECOND) \n  partition by key(db, rkey) partitions 3;\n\n-- hash\nCREATE TABLE modis_hash_table(\n  db bigint not null,\n  rkey varbinary(8192) not null, # 8K\n  is_data tinyint(1) default 1,\n  insert_ts timestamp(6) DEFAULT NULL,\n  expire_ts timestamp(6) default null,\n  field varbinary(8192) not null, # 8K\n  value varbinary(1048576) default null, # 1M\n  PRIMARY KEY(db, rkey, is_data, field))\n  KV_ATTRIBUTES ='{\"Redis\": {\"isTTL\": true, \"model\": \"hash\"}}'\n  PARTITION BY KEY(db, rkey) PARTITIONS 3;\n\n-- set\nCREATE TABLE modis_set_table(\n  db bigint not null,\n  rkey varbinary(1024) not null, # 1K\n  is_data tinyint(1) default 1,\n  insert_ts timestamp(6) DEFAULT NULL,\n  expire_ts timestamp(6) default null,\n  member varbinary(15360) not null, # 15K\n  PRIMARY KEY(db, rkey, is_data, member))\n  KV_ATTRIBUTES ='{\"Redis\": {\"isTTL\": true, \"model\": \"zset\"}}'\n  PARTITION BY KEY(db, rkey) PARTITIONS 3;\n\n-- list\nCREATE TABLE modis_list_table(\n  db BIGINT NOT NULL,\n  rkey VARBINARY(16384) NOT NULL, # 16K\n  is_data tinyint(1) default 1,\n  insert_ts TIMESTAMP(6) DEFAULT NULL, \n  expire_ts timestamp(6) default null,\n  value VARBINARY(1048576) DEFAULT NULL, # 1M\n  `index` BIGINT NOT NULL,             \n  PRIMARY KEY(db, rkey, is_data, `index`)\n)\nKV_ATTRIBUTES ='{\"Redis\": {\"isTTL\": true, \"model\": \"list\"}}'\nPARTITION BY KEY(db, rkey)            \nPARTITIONS 3;\n\n-- zset\nCREATE TABLE modis_zset_table(\n  db bigint not null,\n  rkey varbinary(1024) not null, # 1K \n  is_data tinyint(1) default 1,\n  insert_ts timestamp(6) DEFAULT NULL,\n  expire_ts timestamp(6) default null,\n  member varbinary(15360) not null, # 15k\n  score double default null,\n  index index_score(db, rkey, score) local,\n  PRIMARY KEY(db, rkey, is_data, member))\n  KV_ATTRIBUTES ='{\"Redis\": {\"isTTL\": true, \"model\": \"zset\"}}'\n  PARTITION BY KEY(db, rkey) PARTITIONS 3;\n```\n\n`config.yaml` file exmaple:\n``` yaml\n{\n  \"server\": {\n    \"listen\": \":8085\",\n    \"max-connection\": 1000, # limit 10000\n    \"password\": \"\",\n    \"databases\": 256, # databases idx range [0, databases)\n    \"channel-size\": 10,\n    \"supervised\": \"no\",\n    \"TLS\": {\n      \"ssl-cert-file\": \"\",\n      \"ssl-key-file\": \"\"\n    }\n  },\n  \"log\": {\n    \"filepath\": \"./\", # filename is fixed as modis.log\n    \"single-file-max-size\": 256, # MB\n    \"max-backup-file-size\": 10, # 0 is not delete\n    \"max-age-file-rem\": 30, # 30 day\n    \"compress\": false,\n    \"level\": \"info\" # info/error/warn/debug\n  },\n  \"storage\": {\n    \"backend\": \"obkv\",\n    \"obkv\": {\n      \"config-server-url\": \"\",\n      \"full-user-name\": \"\",\n      \"password\": \"\",\n      \"sys-user-name\": \"root\",\n      \"sys-password\": \"\",\n      \"connection-pool-size\": 64\n    }\n  }\n}\n```\n\n**NOTE:**\n1. `config-server-url` is generated by [ConfigServer](https://ask.oceanbase.com/t/topic/35601923), which format is `config_url\u0026database={database_name}`\n2. `full-user-name`: the user for accessing obkv, which format is `user_name@tenant_name#cluster_name`\n3. `passWord`: the password of user in fullUserName.\n4. `sys-user-name`: `root` or `proxy`, which have privileges to access routing system view\n5. `sys-password`: the password of sys user in sysUserName.\n\n## Documentation\n[TODO]\n\n## Licencing\n\nModis is under [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) licence. For details, see the [LICENSE](LICENSE) file.\n\n## Contributing\n\nContributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute:\n\n- Raise us an [Issue](https://github.com/oceanbase/modis/issues)\n- Submit Pull Requests. For details, see [How to contribute](CONTRIBUTING.md).\n\n## Support\n\nIn case you have any problems when using OceanBase Database, welcome reach out for help:\n\n- GitHub Issue [GitHub Issue](https://github.com/oceanbase/modis/issues)\n- Official forum [Official website](https://open.oceanbase.com)\n- Knowledge base [Coming soon]\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanbase%2Fmodis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foceanbase%2Fmodis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanbase%2Fmodis/lists"}