{"id":30211942,"url":"https://github.com/dot-microservices/dot-ws","last_synced_at":"2025-08-13T21:14:48.301Z","repository":{"id":34869286,"uuid":"185734913","full_name":"dot-microservices/dot-ws","owner":"dot-microservices","description":"a minimalist toolkit for building fast, scalable and fault tolerant microservices","archived":false,"fork":false,"pushed_at":"2023-10-20T01:09:17.000Z","size":534,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-09T04:51:38.079Z","etag":null,"topics":["clerq","fault-tolerance","fault-tolerant-microservices","microservice-framework","microservice-toolkit","microservices","rpc","soa"],"latest_commit_sha":null,"homepage":null,"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":"2019-05-09T05:53:09.000Z","updated_at":"2022-02-13T06:22:48.000Z","dependencies_parsed_at":"2023-01-15T09:45:11.187Z","dependency_job_id":null,"html_url":"https://github.com/dot-microservices/dot-ws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dot-microservices/dot-ws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot-ws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot-ws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot-ws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot-ws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dot-microservices","download_url":"https://codeload.github.com/dot-microservices/dot-ws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dot-microservices%2Fdot-ws/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270315248,"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":["clerq","fault-tolerance","fault-tolerant-microservices","microservice-framework","microservice-toolkit","microservices","rpc","soa"],"created_at":"2025-08-13T21:14:46.092Z","updated_at":"2025-08-13T21:14:48.295Z","avatar_url":"https://github.com/dot-microservices.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dot-ws\n\n**dot-ws** is a minimalist toolkit for building fast, scalable and fault tolerant microservices.\n\n## Install\n\n```bash\nnpm i --save dot-ws\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-ws.git\ncd dot-ws\nnpm i\nnpm test\n```\n\n## Configuration\n\n- **host        :** binds server instance to this value. it's 0.0.0.0 by default.\n- **pino        :** options for pino logger. it's { \"level\": \"error\" } by default.\n- **port        :** start point for port assignment. it's 8000 by default.\n- **timeout     :** request timeout.\n                    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 Clerq = require('clerq');\nconst Server = require('dot-ws').Server;\nconst IORedis = require('ioredis');\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 registry = new Clerq(new IORedis(), { expire: 5, pino: { level: 'error' } });\nconst server = new Server(registry);\nserver.addService(SampleService);\nserver.start();\n```\n\n### Example Client\n\n```js\nconst Clerq = require('clerq');\nconst Client = require('dot-ws').Client;\nconst IORedis = require('ioredis');\n\nconst registry = new Clerq(new IORedis(), { expire: 5, pino: { level: 'error' } });\nconst client = new Client(registry);\nclient.send('sampleService.test', request, response =\u003e {\n    console.log(response);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdot-microservices%2Fdot-ws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdot-microservices%2Fdot-ws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdot-microservices%2Fdot-ws/lists"}