{"id":15470764,"url":"https://github.com/comtihon/reservatron","last_synced_at":"2026-04-18T17:02:07.817Z","repository":{"id":143127167,"uuid":"132943444","full_name":"comtihon/reservatron","owner":"comtihon","description":"Table reservation service.","archived":false,"fork":false,"pushed_at":"2018-07-07T11:30:00.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T12:45:31.318Z","etag":null,"topics":["graphql","graphql-server","graphql-subscriptions","spring","spring-boot","spring-integration"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/comtihon.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-05-10T19:08:16.000Z","updated_at":"2018-12-28T10:36:55.000Z","dependencies_parsed_at":"2023-03-26T13:07:46.686Z","dependency_job_id":null,"html_url":"https://github.com/comtihon/reservatron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/comtihon/reservatron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comtihon%2Freservatron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comtihon%2Freservatron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comtihon%2Freservatron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comtihon%2Freservatron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comtihon","download_url":"https://codeload.github.com/comtihon/reservatron/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comtihon%2Freservatron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31976805,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T16:27:12.723Z","status":"ssl_error","status_checked_at":"2026-04-18T16:27:11.140Z","response_time":103,"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":["graphql","graphql-server","graphql-subscriptions","spring","spring-boot","spring-integration"],"created_at":"2024-10-02T02:06:41.209Z","updated_at":"2026-04-18T17:02:07.811Z","avatar_url":"https://github.com/comtihon.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reservatron  [![Build Status](https://travis-ci.org/comtihon/reservatron.svg?branch=master)](https://travis-ci.org/comtihon/reservatron)\nReserve table service.\nUse redis distributed lock to guarantee reliable reservations even when\nmultiple instances of Reservatron are running.\nThis service uses GraphQL API via [this](https://github.com/graphql-java/graphql-java-annotations)\nlibrary.\n\n## Future improvements:\n* pagination. Easy way will be integrate querydsl and\ncompose queries in repositories to support pagination on DB level\n* filtering. Also querydsl could be used to optimise\nrequests like `getAllTables(filter: {tableId: 1})`\n* unsubscribe subscriptions on connection close (due to the strange bug\nsubscriber's onConnect is not called)\n* subscriptions in case of multiple instances. Need to send events with reservations\nto Kafka and publish updates for subscribed clients.\n\n### In docker\nEnsure you've built [Admin](https://github.com/comtihon/tabler) before.\n\n    sudo ./gradlew build docker -x test -x test_integration\n    sudo docker-compose up -d\n\n### In OS\n\n    export POSTGRES_HOST=localhost\n    export REDIS_HOST=localhost\n    ./gradlew bootRun\n\n## Testing\n\n    ./gradlew check\n\n## Protocol\nGraphql is used for communication. Make introspective query to get schema\nfor details.\nEndpoint for query and mutations is `/graphql`, for subscriptions is `/subscriptions`\n\n### Examples:\n#### Make a reservation for a table\n\nMethod: `POST`\n\nBody:\n\n```\nmutation ReserveTable\n{   reserveTable(input: {tableId: 1,\n                         guest: \"Test\",\n                         from: \"2018-01-04T18:00:00.000+0000\",\n                         to: \"2018-01-04T19:00:00.000+0000\",\n                         clientMutationId: \"uuid\"})\n    {status}\n}\n```\n\nResponse:\n\n```\n{\n    \"data\": {\n        \"reserveTable\": {\n            \"status\": \"CONFLICT\"\n        }\n    },\n    \"errors\": [],\n    \"extensions\": null\n}\n```\n\n#### Show all reservations for all tables\n\nMethod: `POST`\n\nBody:\n```\nquery {allTables\n        {edges {node {name reservations\n                              {edges {node {guest from to}}}\n                     }\n               }\n        }\n      }\n```\n\nResponse:\n\n```\n{\n    \"data\": {\n        \"allTables\": {\n            \"edges\": [\n                {\n                    \"node\": {\n                        \"name\": \"test\",\n                        \"reservations\": {\n                            \"edges\": [\n                                {\n                                    \"node\": {\n                                        \"guest\": \"Test\",\n                                        \"from\": \"2018-01-04T18:00:00.000+0000\",\n                                        \"to\": \"2018-01-04T19:00:00.000+0000\"\n                                    }\n                                }\n                            ]\n                        }\n                    }\n                },\n                {\n                    \"node\": {\n                        \"name\": \"test2\",\n                        \"reservations\": {\n                            \"edges\": []\n                        }\n                    }\n                }\n            ]\n        }\n    },\n    \"errors\": [],\n    \"extensions\": null\n}\n```\n\n#### Subscribe for table reservations\n\n`Websocket`\n\nBody:\n```\nsubscription RealTimeReservationsSubscription {\n               newReservationMade(tableId: 1) {\n                 guest\n                 from\n                 to\n               }\n             }\n```\nOn every new subscription to this server you will receive a `Reservation`.\n__Important!__ This repo is just an example of graphql usage. With multiple\ninstances of this service subscriptions won't work correctly, as one instance\ndoesn't receive events about subscription has been made from the other.\n__Important!__ Subscriptions unsubscribe feature is not working now.\n`CompletionStageMappingPublisher`'s `onSubscribe` is not called, thus link\nbetween `GraphqlSubscriber` and `Subscription` can't be made. As a result,\nwhen connection is closed we can't cancel subscription.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomtihon%2Freservatron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomtihon%2Freservatron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomtihon%2Freservatron/lists"}