{"id":19522313,"url":"https://github.com/anycable/simple-cable-app","last_synced_at":"2025-07-09T22:33:07.745Z","repository":{"id":110392533,"uuid":"131416024","full_name":"anycable/simple-cable-app","owner":"anycable","description":"Minimal ActionCable/AnyCable application which could be deployed on Heroku","archived":false,"fork":false,"pushed_at":"2022-08-05T02:58:47.000Z","size":2808,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T00:47:55.925Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/anycable.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-28T14:22:32.000Z","updated_at":"2025-01-11T03:03:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab284f65-4099-4ca0-848b-dd5407e3399c","html_url":"https://github.com/anycable/simple-cable-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anycable/simple-cable-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fsimple-cable-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fsimple-cable-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fsimple-cable-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fsimple-cable-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anycable","download_url":"https://codeload.github.com/anycable/simple-cable-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anycable%2Fsimple-cable-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504578,"owners_count":23618825,"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":[],"created_at":"2024-11-11T00:38:25.910Z","updated_at":"2025-07-09T22:33:07.369Z","avatar_url":"https://github.com/anycable.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Cable\n\nMinimal ActionCable/AnyCable application which could be deployed on Heroku\nand also a playground for performance experiments.\n\n## Deployment\n\n```sh\n# Create app\nheroku create simple-cable-app\n\n# We need Redis for pub/sub\nheroku addons:create heroku-redis\n\n# Configure buildpacks\nheroku buildpacks:add https://github.com/anycable/heroku-anycable-go\nheroku buildpacks:add heroku/ruby\n\nheroku config:set ANYCABLE_DEPLOYMENT=true\n\n# (optionally) Use anycable-go with mruby support\n# and log stats in Librato format\nheroku config:set HEROKU_ANYCABLE_GO_VERSION=0.6.4-mrb\nheroku config:set ANYCABLE_METRICS_LOG_FORMATTER=etc/anycable_librato_logger.rb\n\ngit push heroku master\n```\n\n## Integration Tests\n\nYou can use [wsdirector](https://github.com/palkan/wsdirector) to verify your deployment:\n\n```sh\nwsdirector features/broadcast.yml wss://simple-cable-app.herokuapp.com/cable -s 10\n```\n\nSee `features/` folder for available scenarios.\n\n## Benchmarking/testing\n\nUse [websocket-bench](https://github.com/anycable/websocket-bench) for stress testing.\nFor example, to run `broadcast` scenario you use the predefined options:\n\n```ruby\ncat benchmarks/broadcast.opts | xargs websocket-bench broadcast\n...\n```\n\nUse [ACLI](https://github.com/palkan/acli) to connect to Action Cable server from your terminal.\n\n## Heap capturing\n\n- Run server with `DUMP=1` (`DUMP=1 bundle exec puma -p 8080` or `DUMP=1 bundle exec anycable --server-command=\"anycable-go --port 8080\" -r ./anycable.rb`)\n- Do some stress (see `benchmarks/simulate.rb`)\n- Connect to a server passing `?dump=1` param (e.g., using ACLI: `acli -u \"ws://localhost:8080/cable?dump\"`) to dump the current `ObjectSpace` into a file (`tmp/heap.json`)\n- Run `ruby etc/heapme.rb tmp/heap.json` to generate a `heap.png` (like the one below)\n\n![](./heap.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanycable%2Fsimple-cable-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanycable%2Fsimple-cable-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanycable%2Fsimple-cable-app/lists"}