{"id":23177650,"url":"https://github.com/dimitrisniras/goapp","last_synced_at":"2025-07-25T17:11:12.171Z","repository":{"id":254288397,"uuid":"846042521","full_name":"dimitrisniras/goapp","owner":"dimitrisniras","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-24T08:51:02.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T10:15:08.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/dimitrisniras.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-08-22T12:27:55.000Z","updated_at":"2024-08-24T08:50:19.000Z","dependencies_parsed_at":"2024-08-22T15:30:35.199Z","dependency_job_id":"8d69bfdf-a536-4a2a-8599-36985ae2983b","html_url":"https://github.com/dimitrisniras/goapp","commit_stats":null,"previous_names":["dimitrisniras/goapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrisniras%2Fgoapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrisniras%2Fgoapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrisniras%2Fgoapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrisniras%2Fgoapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimitrisniras","download_url":"https://codeload.github.com/dimitrisniras/goapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276097,"owners_count":20912287,"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-12-18T06:35:58.952Z","updated_at":"2025-04-05T01:42:57.682Z","avatar_url":"https://github.com/dimitrisniras.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoApp\n\nAn application for Go knowledge assessment.\n\n## Description\n\nThis is a web application that utilises websockets. A client connects on `localhost:8080` and has three options: a) `open` a websocket connection that reads values from a counter b) `close` the websocket and c) reset the counter to zero. The counter is feeded from a random string generator. On WS session termination, statistics for terminated session are printed.\n\nThe application is compiled by running `make` in the root folder and the final binaries are found in the `bin/` folder.\n\nThe application has some problems described below that need to be addressed plus some new features that need implementation.\n\n## Problems\n\n### #1\n\nThe server prints statistics for each WS sessioned closed but it seems to only count one message while there are more send to each WS session, e.g.\n\n```\n2024/03/29 18:28:38 stats.go:11: session a938e316-8536-46e6-8633-bd309fbcf579 has received 1 messages\n```\n\n### #2\n\nA more then normal memory usage is observed after many WS sessions which needs investigation.\n\n### #3\n\nA cross-site request forgery is reported by a security audit which needs fixing.\n\n## New features\n\n### A\n\nModify the random string generator to generate only hex values and verify its accuracy and resource usage by creating a test and a benchmark run.\n\n### B\n\nExtent the API to also return the Hex value in WS connection. I.e. a browser that open a connection to `localhost:8080` should see the HEX values.\n\nE.g.\n\n```\nOPEN\nRESPONSE: {\"iteration\":1,\"value\":\"822876EF10\"}\nRESPONSE: {\"iteration\":2,\"value\":\"215100491D\"}\nRESPONSE: {\"iteration\":3,\"value\":\"05DCC3B6AB\"}\nCLOSE\n```\n\n### C\n\nCreate a command line client as a separate application that opens a requested number of sessions simultaneously.\n\nThis should be a separate executable generated with the `make` command in the `bin/` folder that will accept an argument with the number of parallel connections that will open on the server. The server part must be modified in a way to support multiple parallel connections and should still print valid statistics for each connection.\n\nE.g.\n\n```\n$ ./bin/client -n 3\n[conn #0] iteration: 1, value: 66D53ED788\n[conn #1] iteration: 1, value: 66D53ED788\n[conn #2] iteration: 1, value: 66D53ED788\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitrisniras%2Fgoapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitrisniras%2Fgoapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitrisniras%2Fgoapp/lists"}