{"id":15056781,"url":"https://github.com/wikimedia/restbase","last_synced_at":"2025-05-16T05:04:48.929Z","repository":{"id":16254456,"uuid":"19002414","full_name":"wikimedia/restbase","owner":"wikimedia","description":"Distributed storage with REST API \u0026 dispatcher for backend services.","archived":false,"fork":false,"pushed_at":"2025-04-21T13:58:50.000Z","size":4683,"stargazers_count":105,"open_issues_count":20,"forks_count":79,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-14T02:49:34.235Z","etag":null,"topics":["backend-services","cassandra","javascript","rest-api","restbase","wikipedia-api"],"latest_commit_sha":null,"homepage":"https://www.mediawiki.org/wiki/RESTBase","language":"JavaScript","has_issues":false,"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/wikimedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2014-04-21T18:35:00.000Z","updated_at":"2025-04-21T13:58:55.000Z","dependencies_parsed_at":"2024-06-11T20:52:57.747Z","dependency_job_id":"1cc688ec-9186-48d0-84b3-36b1d2393458","html_url":"https://github.com/wikimedia/restbase","commit_stats":{"total_commits":2507,"total_committers":80,"mean_commits":31.3375,"dds":0.6733147187873953,"last_synced_commit":"ac011e388bbf116386c7d2d7b5dbc70d0f3d709e"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Frestbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Frestbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Frestbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wikimedia%2Frestbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wikimedia","download_url":"https://codeload.github.com/wikimedia/restbase/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["backend-services","cassandra","javascript","rest-api","restbase","wikipedia-api"],"created_at":"2024-09-24T21:56:27.315Z","updated_at":"2025-05-16T05:04:48.901Z","avatar_url":"https://github.com/wikimedia.png","language":"JavaScript","funding_links":[],"categories":["Databases"],"sub_categories":["Miscellaneous"],"readme":"# RESTBase [![Build Status](https://travis-ci.org/wikimedia/restbase.svg?branch=master)](https://travis-ci.org/wikimedia/restbase) [![Coverage Status](https://coveralls.io/repos/wikimedia/restbase/badge.svg?branch=master)](https://coveralls.io/r/wikimedia/restbase?branch=master)\n\n\nRESTBase was built to provide a [low-latency \u0026 high-throughput API for\nWikipedia / Wikimedia\ncontent](https://en.wikipedia.org/api/rest_v1/). It is basically\na storage proxy, which presents a coherent API powered by Swagger specs to the\noutside, and backs up many of these entry points with storage.  The default\n**table storage** backend is based on Cassandra, which helps it to perform\nwell at Wikimedia's scale without placing undue burden on operations.\n\nAs a proxy, RESTBase does not perform any significant content processing\nitself. Instead, it requests content transformations from backend services\nwhen needed, and typically (depending on configuration) stores it back for\nlater retrieval. For high-volume static end points, most requests will be\nsatisfied directly from storage.\n\nThe *table storage* backends conform to a RESTful [table storage\nAPI](./doc/TableStorageAPI.md)\nsimilar to [Amazon DynamoDB](http://aws.amazon.com/documentation/dynamodb/)\nand [Google DataStore](https://developers.google.com/datastore/). The primary\nimplementation uses Apache Cassandra. Notable features include automatically\nmaintained secondary indexes and some lightweight transaction support. A\n[SQLite backend](https://github.com/wikimedia/restbase-mod-table-sqlite) is\nunder development.\n\nRESTBase systematically emits statsd metrics about storage and backend\nrequests. Specifically, the systematic metric production for backend services\nprovides a good baseline level of instrumentation for tracking performance\nand errors in a micro-service architecture.\n\n## Issue tracking\n\nWe use [Phabricator to track\nissues](https://phabricator.wikimedia.org/maniphest/task/create/?projects=PHID-PROJ-mszihytuo3ij3fcxcxgm). See the [list of current issues in RESTBase](https://phabricator.wikimedia.org/tag/restbase/).\n\n## Installation\n\nMake sure that you have node 6+:\n```sh\nsudo apt-get install nodejs nodejs-legacy nodejs-dev npm\n```\n\nNote: if your distribution does not have a recent version of Node, you can\ninstall one via [nvm](https://github.com/creationix/nvm).\n\nFrom the *restbase* project directory, install the Node dependencies:\n\n```sh\nnpm install\n```\n\nStart RESTBase:\n\n```sh\nnode server\n```\n\nThe defaults without a config file should work for a local Cassandra\ninstallation with the default passwords. Restbase has been tested with\n[Cassandra 2.2.6](https://cwiki.apache.org/confluence/display/CASSANDRA2/DebianPackaging).\nTo customize RESTBase's behaviour, copy the example config to its\ndefault location:\n\n```sh\ncp config.example.yaml config.yaml\n```\n\nYou can also pass in the path to another file with the `-c` commandline option\nto `server.js`. If you're running a single Cassandra instance (e.g. a local\ndevelopment environment), set `defaultConsistency` to `one` in\n`config.yaml`.\n\n## Usage\n\nSee the [Wikimedia REST content API sandbox](https://en.wikipedia.org/api/rest_v1/)\nfor a fine example of what RESTBase can do.\n\n## Development\n\n### Testing\n\nTo run all the tests from a clean slate, first make sure Cassandra is running locally, then fire up the tests with npm:\n\n```\nnpm test\n```\n\nTo run tests from a single file, e.g. *test/features/pagecontent/rerendering.js*, run mocha with the file as an argument:\n\n```\nmocha test/features/pagecontent/rerendering.js\n```\n\nNote that this might require some setup (e.g. creating the necessary domain and buckets), which is currently done by *test/buckets.js*.\n\nThis also works for a directory, e.g. *test/features/pagecontent/*:\n\n```\nmocha test/features/pagecontent\n```\n\n### Coverage\n\nTo check the test coverage, use npm, then browse the report:\n\n```\nnpm run-script coverage\n```\n\nThe coverage report can now be found in *\u0026lt;project\u0026gt;/coverage/lcov-report/index.html*.\n\n## Design docs\n\n- [RESTBase](./doc/)\n- [RESTBase-cassandra (storage backend)](https://github.com/wikimedia/restbase-mod-table-cassandra/tree/master/doc)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Frestbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwikimedia%2Frestbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwikimedia%2Frestbase/lists"}