{"id":22372332,"url":"https://github.com/romaleev/nodejs-queue-service","last_synced_at":"2025-03-26T17:18:22.473Z","repository":{"id":44831546,"uuid":"72356534","full_name":"romaleev/nodejs-queue-service","owner":"romaleev","description":"Node.js API queueing service","archived":false,"fork":false,"pushed_at":"2022-12-12T06:18:44.000Z","size":173,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T22:09:35.963Z","etag":null,"topics":["api","babel","node","nodejs","nodemon","queue"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/romaleev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-30T15:08:36.000Z","updated_at":"2021-03-19T13:37:07.000Z","dependencies_parsed_at":"2023-01-27T15:00:51.365Z","dependency_job_id":null,"html_url":"https://github.com/romaleev/nodejs-queue-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fnodejs-queue-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fnodejs-queue-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fnodejs-queue-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/romaleev%2Fnodejs-queue-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/romaleev","download_url":"https://codeload.github.com/romaleev/nodejs-queue-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245699259,"owners_count":20657987,"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":["api","babel","node","nodejs","nodemon","queue"],"created_at":"2024-12-04T20:37:19.113Z","updated_at":"2025-03-26T17:18:22.456Z","avatar_url":"https://github.com/romaleev.png","language":"TypeScript","readme":"# Node.js API queuing service\n\nThere are 3 different APIs the service has to interface with:\n\n 1. Shipments API [GET]\nAccepts a query with 9-digit order numbers and returns a set of products (envelope, box or pallet) equivalent to the last digit.\n 2. Track API [GET]\nAccepts a query with 9-digit consignment number and returns one of the following tracking statuses: NEW, IN TRANSIT, COLLECTING, COLLECTED, DELIVERING, DELIVERED.\n 3. Pricing API [GET]\nAccepts a query with ISO-2 country code and returns a randomized floating number between 1 and 100.\n\nThere are 2 services:\n\n 1. Query service [POST]:\n    - Exposes a method that accepts a collection of API requests {'API': 'query'}.\n    - Makes calls to corresponding APIs.\n    - Returns a complete set of responses upon receiving all API responses.\n 2. Queue query service [POST]:\n    - Exposes a method that accepts a collection of API requests {'API': 'query'}.\n    - API calls should be throttled and bulked into 1 request per respective API.\n    - Makes a queue of calls with threshold of maximum 5 concurrent requests per API endpoint.\n    - Returns a complete set of responses upon receiving all corresponding API responses.\n\nAuthor: Roman Malieiev \u003caromaleev@gmail.com\u003e\n\nProject consists of two builds:\n - production optimised\n - development with source change watchers\n\nTech stack:\n - Node.js\n - Babel for ES6 support with ESLint\n - Nodemon development build\n - Frisby tests\n\n## Installation\n\n1. Install Node.js/npm\n2. Navigate to the current folder\n3. Run:\n\n\t `npm install`\n\n## Running\n\nRun in development mode:\n\n\tnpm start\n\nBuild for production:\n\n\tnpm run build\n\nFollowing urls would be available:\n\n - http://localhost:8080/shipments [GET] - Shipments API\n - http://localhost:8080/track [GET] - Track API\n - http://localhost:8080/pricing [GET] - Pricing API\n - http://localhost:8080/service [POST] - Query service\n - http://localhost:8080/service-queue [POST] - Queue query service\n\n**NOTE**: see tests for requests examples.\n\nTest:\n\n\tnpm start\n\tnpm test\n\n## Questions\n\n#### With the above solution, can you imagine a scenario where unnecessary calls to either one of the APIs will happen? If so, how could you solve this?\n\nWe can implement caching within some time\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromaleev%2Fnodejs-queue-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fromaleev%2Fnodejs-queue-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fromaleev%2Fnodejs-queue-service/lists"}