{"id":16372510,"url":"https://github.com/nicholasjhenry/polished-wave","last_synced_at":"2025-07-28T21:08:47.794Z","repository":{"id":66794456,"uuid":"336338410","full_name":"nicholasjhenry/polished-wave","owner":"nicholasjhenry","description":"Simple introduction to Phoenix Web Sockets","archived":false,"fork":false,"pushed_at":"2021-02-05T17:14:23.000Z","size":211,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T09:25:12.833Z","etag":null,"topics":["demo","phoenix-framework","professional-development"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/nicholasjhenry.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,"zenodo":null}},"created_at":"2021-02-05T17:14:12.000Z","updated_at":"2022-01-31T00:54:30.000Z","dependencies_parsed_at":"2023-04-10T08:18:50.439Z","dependency_job_id":null,"html_url":"https://github.com/nicholasjhenry/polished-wave","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nicholasjhenry/polished-wave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasjhenry%2Fpolished-wave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasjhenry%2Fpolished-wave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasjhenry%2Fpolished-wave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasjhenry%2Fpolished-wave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicholasjhenry","download_url":"https://codeload.github.com/nicholasjhenry/polished-wave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicholasjhenry%2Fpolished-wave/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585691,"owners_count":24111576,"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-07-28T02:00:09.689Z","response_time":68,"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":["demo","phoenix-framework","professional-development"],"created_at":"2024-10-11T03:11:36.776Z","updated_at":"2025-07-28T21:08:47.787Z","avatar_url":"https://github.com/nicholasjhenry.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polished Wave\n\nA simple example of Phoenix running web sockets.\n\nExamples based on [Real-Time Phoenix - Build Highly Scalable Systems with Channels](https://pragprog.com/titles/sbsockets/real-time-phoenix/).\n\n## Setup\n\n    make phx.setup\n    make wscat.install\n\n## Start server\n\n    iex -S mix phx.server\n\n## Guide\n\nNOTE: Exclude all comments, including trailing comments.\n\nThe `Phoenix.Message` is structured:\n\n    [join ref, message ref, topic, event, payload]\n    [\"1\",\"1\",\"ping\",\"phx_join\",{}]\n\n    # try pinging\n\n     $ wscat -c 'ws://localhost:4000/socket/websocket?vsn=2.0.0'\n     \u003e [\"1\",\"1\",\"ping\",\"phx_join\",{}]\n     \u003e [\"1\",\"2\",\"ping\",\"ping\",{}]\n\n    # try wildcard\n\n    $ wscat -c 'ws://localhost:4000/socket/websocket?vsn=2.0.0'\n    \u003e [\"1\",\"1\",\"wild:1:2\",\"phx_join\",{}] # ok\n    \u003e [\"1\",\"2\",\"wild:1:3\",\"phx_join\",{}] # error\n\n    # try broadcast\n\n    $ wscat -c 'ws://localhost:4000/socket/websocket?vsn=2.0.0'\n    \u003e [\"1\",\"1\",\"ping\",\"phx_join\",{}]\n\n    # must be the same instance phx server instance\n    PolishedWaveWeb.Endpoint.broadcast(\"ping\", \"test\", %{data: \"test\"})\n\n    # open the browser and view the console\n    open http://localhost:4000\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholasjhenry%2Fpolished-wave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicholasjhenry%2Fpolished-wave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicholasjhenry%2Fpolished-wave/lists"}