{"id":21824614,"url":"https://github.com/shopify/goqueuesim","last_synced_at":"2026-01-14T12:00:48.876Z","repository":{"id":66008940,"uuid":"540159758","full_name":"Shopify/goqueuesim","owner":"Shopify","description":"User queueing simulator supporting diverse client config behaviours via Go coroutines","archived":true,"fork":false,"pushed_at":"2023-03-21T23:03:37.000Z","size":69,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":151,"default_branch":"main","last_synced_at":"2025-11-07T03:06:15.916Z","etag":null,"topics":["go","queue-simulator","queues","redis","redis-lua-script","simulation"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Shopify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-22T20:32:19.000Z","updated_at":"2025-01-17T21:33:03.000Z","dependencies_parsed_at":"2024-06-21T17:31:19.208Z","dependency_job_id":"6aa42632-b9ac-46e1-8048-5a61db62fb53","html_url":"https://github.com/Shopify/goqueuesim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Shopify/goqueuesim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fgoqueuesim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fgoqueuesim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fgoqueuesim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fgoqueuesim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shopify","download_url":"https://codeload.github.com/Shopify/goqueuesim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fgoqueuesim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","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":["go","queue-simulator","queues","redis","redis-lua-script","simulation"],"created_at":"2024-11-27T17:59:20.510Z","updated_at":"2026-01-14T12:00:48.837Z","avatar_url":"https://github.com/Shopify.png","language":"Go","readme":"# Queue Simulator\n\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n        \u003cimg width=\"50%\" height=\"50%\" src=\"https://user-images.githubusercontent.com/9891776/191826624-bfc9614c-510f-4211-b4d8-cc3470e6a925.png\" alt=\"Queue Simulator logo\"\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n# goqueuesim\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Usage](#-usage)\n- [Notable Feature Gaps](#notable-feature-gaps)\n- [Contributing](#contributing)\n\n## Introduction\n\nSimulator built at Shopify originally purposed to prototype different Checkout Queue algorithms.\n\nOpen-sourced at similar low-fidelity to its prototypical origins but readily-actionable for improved usability.\n\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n    \u003cimg width=\"80%\" src=\"https://user-images.githubusercontent.com/9891776/191835121-ab33d3fa-9316-48fe-b229-ca423736953c.gif\" alt=\"Queue Simulator Demo\"\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n### 🔗 \u0026nbsp; Requirements\n\nFirst, install project Go dependencies to your local environment:\n\n```bash\ngo mod download\n```\n\nIf you plan to run with [lua-driven](https://redis.io/commands/evalsha/) queues in Redis (ie. `queue_type = \"lua_driven_bins_queue\"` in [config.go](cmd/config.go)), you'll need to [install Redis](https://redis.io/docs/getting-started/installation/) and [start a server](https://redis.io/docs/getting-started/#exploring-redis-with-the-cli) in the background.\n\nThe above step is not necessary for queue types other than  `lua_driven_bins_queue`.\n\n#### **Dashboards**\n\nFor dashboard statistics, this project hopes to eventually leverage dockerized [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/).\n\nHowever, for the moment, its statistics are built around [Datadog](https://www.datadoghq.com/) so you'll need a [Datadog API Key](https://docs.datadoghq.com/account_management/api-app-keys/).\n\nOnce you have one ready, create a `.env` file with the following:\n\n```\nDD_API_KEY=XXXX\nDD_DOGSTATSD_NON_LOCAL_TRAFFIC=true\n```\n\nand then use [Docker](https://www.docker.com/) to kickoff the Datadog agent:\n\n```bash\ndocker-compose up\nmake\n```\n\n## 📖\u0026nbsp; Usage\n\nFor now, project usage is primarily driven by a [Makefile](https://www.gnu.org/software/make/manual/make.html) with the following commands:\n\n|  Make Task   | Description                                                                        |\n| :--------    | :--------------------------------------------------------------------------------- |\n| `default`    | Compile the project binary executable \u0026 run it                                     |\n| `run`        | Run the last compiled project binary executable                                    |\n| `clean`      | Remove the last compiled project binary executable                                 |\n| `test`       | Run tests                                                                          |\n\nRunning a simulation is thus as simple as executing `make` (build \u0026 execute) or `make run` (execute last build).\n\n#### **Experiment Configuration**\n\nExperiment configuration (e.g. algorithm used, client behaviour, etc.) can be modified under [cmd/goqueuesim/config.go](cmd/goqueuesim/config.go). Available parameters are documented in that file.\n\nAdditionally, client behaviour can be specified via JSON under [config/simulation/client_distributions/](config/simulation/client_distributions/).\n\nA simple example config with 3 different client types might look like:\n\n```json\n  {\n    \"representation_percent\": 0.20,\n    \"client_type\": \"routinely_polling_client\",\n    \"humanized_label\": \"fast_poller\",\n    \"obeys_server_poll_after\": false,\n    \"max_initial_delay_ms\": 20000,\n    \"max_network_jitter_ms\": 100,\n    \"custom_int_properties\": {\n      \"dflt_poll_interval_seconds\": 1\n    }\n  },\n  {\n    \"representation_percent\": 0.60,\n    \"client_type\": \"routinely_polling_client\",\n    \"humanized_label\": \"strictly_obedient_poller\",\n    \"obeys_server_poll_after\": true,\n    \"max_initial_delay_ms\": 20000,\n    \"max_network_jitter_ms\": 450\n  },\n  {\n    \"representation_percent\": 0.20,\n    \"client_type\": \"fully_disappearing_client\",\n    \"humanized_label\": \"immediately_exiting_client\",\n    \"obeys_server_poll_after\": false,\n    \"max_initial_delay_ms\": 20000,\n    \"max_network_jitter_ms\": 1,\n    \"custom_int_properties\": {\n      \"polls_before_disappearing\": 1\n    }\n  }\n```\n\nSee [internal/client/impl/](internal/client/impl/) for already-implemented example `client_type`s.\n\n## Notable Feature Gaps\n\nThe main notable feature/usability gaps that have yet to be implemented are:\n- Migrating our experiment statistics to leverage dockerized [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) rather than [Datadog](https://www.datadoghq.com/)\n- Simplifying our build dependencies (incl. [Redis](https://redis.com/)) to a single containerized [Docker](https://www.docker.com/) image\n\n## Contributing\n\nPlease refer to the [Contributing document](CONTRIBUTING.md) if you are interested in contributing to goqueuesim!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopify%2Fgoqueuesim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshopify%2Fgoqueuesim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshopify%2Fgoqueuesim/lists"}