{"id":19953113,"url":"https://github.com/pejpero/passtime-server","last_synced_at":"2026-05-19T07:34:06.496Z","repository":{"id":156771693,"uuid":"633151516","full_name":"PejperO/Passtime-Server","owner":"PejperO","description":"Passtime-Server is a Java-based server application that logs and processes client queries regarding elapsed time. The server handles multiple clients concurrently using non-blocking I/O and multiplexing of socket channels. Clients can log in, request elapsed time information for given date ranges, and log out. Configuration is provided via a YAML","archived":false,"fork":false,"pushed_at":"2023-06-13T21:13:44.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-21T11:55:48.536Z","etag":null,"topics":["calculation","client-server","concurrent-programming","elapsed-time","java","logging","nonblocking","serversocketchannel","socketchannel","yaml","yaml-configuration"],"latest_commit_sha":null,"homepage":"","language":"Java","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/PejperO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-04-26T22:27:53.000Z","updated_at":"2024-07-29T12:48:01.000Z","dependencies_parsed_at":"2023-06-26T02:46:45.751Z","dependency_job_id":null,"html_url":"https://github.com/PejperO/Passtime-Server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PejperO/Passtime-Server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejperO%2FPasstime-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejperO%2FPasstime-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejperO%2FPasstime-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejperO%2FPasstime-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PejperO","download_url":"https://codeload.github.com/PejperO/Passtime-Server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PejperO%2FPasstime-Server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33206320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:16:55.748Z","status":"ssl_error","status_checked_at":"2026-05-19T07:16:54.366Z","response_time":58,"last_error":"SSL_read: 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":["calculation","client-server","concurrent-programming","elapsed-time","java","logging","nonblocking","serversocketchannel","socketchannel","yaml","yaml-configuration"],"created_at":"2024-11-13T01:15:27.184Z","updated_at":"2026-05-19T07:34:06.480Z","avatar_url":"https://github.com/PejperO.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Passtime-Server\nFor each client, the server keeps a log of its queries and their results, as well as a general log of all client requests. Logs are stored in the server's internal memory (outside the file system)\n\nThe server (server class) provides information about the elapsed time.\nClients (Client class):\n- connect to the server\n- send requests\n\n\n### Protocol\n| Task        | Answer           | Example |\n| ------------- |:-------------:| ------------- |\n| login id      | logged in | login Adam |\n| date from | description of the passage of time according to the specification | 2021-02-20 2021-04-30 |\n| bye | logged out | |\n| bye and log transfer | client log content | in the example printout of the Main class |\n\n\n### Construction of the Server class\nconstructor: :\n**public Server(String host, int port)**\n\nmethod **public void stratServer()** - runs the server in a separate thread\n\nmethod **public void stopServer()** - stops the server and the thread it is running on\n\nmethod **String getServerLog()** - returns general server log\n\n- multiplexing of socket channels\n\n- The server can handle multiple clients in parallel, but client requests are handled in a single thread\n\n\n### Construction of the Client class\nconstructor: :\n**public Client(String host, int port, String id)**\n\nmethod **public void connect()** - connects to the server\n\nmethod **public String send(String req)** - sends a req request and returns the server response\n\n- non-blocking input - output\n\n\n### Console results\nthe contents of the PassTimeServerOptions.yaml file\n\n    host: localhost\n    port: 7777\n    concurMode: true\n    showSendRes: true\n    clientsMap:\n     Asia:\n      - 2016-03-30T12:00 2020-03-30T:10:15\n      - 2019-01-10 2020-03-01\n      - 2020-03-27T10:00 2020-03-28T10:00\n      - 2016-03-30T12:00 2020-03-30T10:15\n    Adam:\n     - 2018-01-01 2020-03-27\n     - 2019-01-01 2020-02-28\n     - 2019-01-01 2019-02-29\n      - 2020-03-28T10:00 2020-03-29T10:00\n      \nresult\n\n    localhost 7777 true true\n    Asia: [2016-03-30T12:00 2020-03-30T:10:15, 2019-01-10 2020-03-01, 2020-03-27T10:00 2020-03-28T10:00, 2016-03-30T12:00 2020-03-30T10:15]\n    Adam: [2018-01-01 2020-03-27, 2019-01-01 2020-02-28, 2019-01-01 2019-02-29, 2020-03-28T10:00 2020-03-29T10:00]\n\n    Asia\n    *** java.time.format.DateTimeParseException: Text '2020-03-30T:10:15' could not be parsed, unparsed text found at index 10\n    Od 10 stycznia 2019 (czwartek) do 1 marca 2020 (niedziela)\n    - mija: 416.0 dni, tygodni 59.43\n    - kalendarzowo: 1 rok, 1 miesi�c, 20 dni\n    Od 27 marca 2020 (pi�tek) godz. 10:00 do 28 marca 2020 (sobota) godz. 10:00\n     - mija: 1 dzie�, tygodni 0.14\n    - godzin: 24, minut: 1440\n    - kalendarzowo: 1 dzie�\n    Od 30 marca 2016 (�roda) godz. 12:00 do 30 marca 2020 (poniedzia�ek) godz. 10:15\n    - mija: 1460 dni, tygodni 208.57\n    - godzin: 35062, minut: 2103735\n     - kalendarzowo: 4 lata\n    Adam\n    Od 1 stycznia 2018 (poniedzia�ek) do 27 marca 2020 (pi�tek)\n     - mija: 816.0 dni, tygodni 116.57\n     - kalendarzowo: 2 lata, 2 miesi�ce, 26 dni\n    Od 1 stycznia 2019 (wtorek) do 28 lutego 2020 (pi�tek)\n     - mija: 423.0 dni, tygodni 60.43\n     - kalendarzowo: 1 rok, 1 miesi�c, 27 dni\n    *** java.time.format.DateTimeParseException: Text '2019-02-29' could not be parsed: Invalid   date 'February 29' as '2019' is not a leap year\n    Od 28 marca 2020 (sobota) godz. 10:00 do 29 marca 2020 (niedziela) godz. 10:00\n     - mija: 1 dzie�, tygodni 0.14\n     - godzin: 23, minut: 1380\n     - kalendarzowo: 1 dzie�\n\n    \n## What I Learned\n* serverSocketChannel\n* socketChannel\n* localDate\n* DecimalFormat\n* ZonedDateTime\n* LinkedHashMap\n* yaml files\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpejpero%2Fpasstime-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpejpero%2Fpasstime-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpejpero%2Fpasstime-server/lists"}