{"id":30211933,"url":"https://github.com/dot-microservices/dot","last_synced_at":"2025-08-13T21:14:40.404Z","repository":{"id":38451799,"uuid":"155430781","full_name":"dot-microservices/dot","owner":"dot-microservices","description":"a minimalist toolkit for building fast, decentralized, scalable and fault tolerant microservices","archived":false,"fork":false,"pushed_at":"2023-10-20T01:08:56.000Z","size":1760,"stargazers_count":10,"open_issues_count":3,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-08-01T10:52:12.499Z","etag":null,"topics":["autodiscovery","fault-tolerant-microservices","microservice-framework","microservice-toolkit","microservices","rpc","soa"],"latest_commit_sha":null,"homepage":"http://dot-microservices.js.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dot-microservices.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}},"created_at":"2018-10-30T17:46:08.000Z","updated_at":"2022-12-14T22:54:30.000Z","dependencies_parsed_at":"2023-02-08T10:17:00.211Z","dependency_job_id":null,"html_url":"https://github.com/dot-microservices/dot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dot-microservices/dot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dot-microservices","download_url":"https://codeload.github.com/dot-microservices/dot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270315247,"owners_count":24563374,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["autodiscovery","fault-tolerant-microservices","microservice-framework","microservice-toolkit","microservices","rpc","soa"],"created_at":"2025-08-13T21:14:37.104Z","updated_at":"2025-08-13T21:14:40.395Z","avatar_url":"https://github.com/dot-microservices.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dot\n\n**dot** is a minimalist toolkit for building fast, decentralized, scalable and fault tolerant microservices.\nPlease see [this article](http://umuplus.tumblr.com/post/179665842906/dot-yet-another-microservice-framework) to find out more.\n\n![Dot Schema](https://raw.githubusercontent.com/Dvs-Bilisim/dot/master/dot.png \"Dot Schema\")\n\n## Install\n\n```bash\nnpm i --save node-dot\n```\n\nYou can also clone this repository and make use of it yourself.\n\n```bash\ngit clone https://github.com/Dvs-Bilisim/dot.git\ncd dot\nnpm i\nnpm test\n```\n\n## Components\n\nThere are 2 simple components:\n\n- **Server  :** ~100 LOC, extends Base (~50 LOC)\n- **Client  :** ~150 LOC, extends Base (~50 LOC)\n\n*Documentation lines are not included to LOC values.*\n\n*Server* will automatically manage routing between client and *Service* instances.\nString responses are reserved for errors. If you send a string back, it means that an error occured.\n*Client* is for sending requests.\n\n## Configuration\n\n### Server\n\n- **debug       :** Debug mode. It's disabled by default.\n- **delimiter   :** Delimiter between service and method names. It's a single dot(.) by default.\n- **discover    :** Parameters for node-discover module. Please see official repository for more information.\n- **group       :** This parameter is for grouping services. If you set a value, client instance connects matched servers only.\n- **iface       :** optional. name of the network interface to get outer ip from\n- **port        :** Start point for port range. If you set server instance looks up for its port starting from this number. It's 8000 by default.\n- **secret      :** Encryption key for auto discovery feature. It's a string \"dot\" by default.\n\n### Client\n\n- **debug       :** Debug mode. It's disabled by default.\n- **delimiter   :** Delimiter between service and method names. It must be same value in server and client instances. It's a single dot(.) by default.\n- **discover    :** Parameters for node-discover module. Please see official repository for more information.\n- **group       :** This parameter is for grouping services. If you set a value, client instance connects matched servers only.\n- **secret      :** Encryption key for auto discovery feature. It's a string \"dot\" by default.\n- **timeout     :** Request timeout. Socket communication has auto recovery feature but in some cases you might want to have a timeout option.\n\n### Error Types\n\nTo have a better understanding on error types, there are a few more things to explain.\nA service is the name of your *Service* class in camel-case form and each static function in that class is called method.\nOn client-side, you need to concatenate service name and method with delimiter as *path*. Default delimiter is a single dot(.).\nYou can configure that by *delimeter* parameter.\n\n- **INVALID_METHOD      :** Requested method doesn't exist in your service class\n- **INVALID_PATH        :** Path parameter is not a valid string\n- **INVALID_RESPONSE    :** Service sent an invalid response back\n- **INVALID_SERVICE     :** Requested service doesn't exist\n- **LOCKED              :** Clean shutdown on progress\n- **MISSING_METHOD      :** Method is not a valid string\n- **REQUEST_TIMEOUT     :** Request sent via socket but no response in allowed amount of time\n- **SERVICE_TIMEOUT     :** No service found to send the request in allowed amount of time\n\n### Example Server\n\n```js\nconst Server = require('node-dot').Server;\n\nclass SampleService {\n    static test(request, reply) {\n        reply(request);\n    }\n\n    static async test2(request) {\n        if (!request) throw new Error('invalid request');\n        return request;\n    }\n}\n\nconst server = new Server();\nserver.addService(SampleService);\nserver.start();\n```\n\n### Example Client\n\n```js\nconst Client = require('node-dot').Client;\n\nconst client = new Client();\nclient.send('sampleService.test', request, response =\u003e {\n    console.log(response);\n});\n```\n\n### Benchmark\n\nTest device specifications.\n\n- Dell XPS 13\n- Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz 4 Cores\n- 8 GB Ram\n\nFirst, you should start server instance. Then execute following command:\n\n```bash\nnode tests/benchmark.js\n```\n\nYour results should be similar to following values:\n\n```text\ntotal time spent for 25000 requests is 0.98 seconds\nmin processing time is 0.20 seconds\nmax processing time is 0.76 seconds\naverage processing time is 0.46 seconds\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdot-microservices%2Fdot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdot-microservices%2Fdot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdot-microservices%2Fdot/lists"}