{"id":14983557,"url":"https://github.com/ivangfr/spring-boot-grpc-client-server","last_synced_at":"2025-04-10T18:44:33.567Z","repository":{"id":255969543,"uuid":"849365566","full_name":"ivangfr/spring-boot-grpc-client-server","owner":"ivangfr","description":"The goal of this project is to implement two Spring Boot applications using gRPC: the server, called movie-grpc-server, and the shell client, named movie-grpc-client. The library movie-grpc-lib defines the gRPC interface that both the server and client applications use.","archived":false,"fork":false,"pushed_at":"2024-12-26T18:55:34.000Z","size":2895,"stargazers_count":16,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T07:31:38.960Z","etag":null,"topics":["client-server","grpc","java","postgresql","protocol-buffers","sprind-data-jpa","spring-boot","spring-web-mvc"],"latest_commit_sha":null,"homepage":"","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/ivangfr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ivangfr"}},"created_at":"2024-08-29T13:17:33.000Z","updated_at":"2025-03-29T14:06:16.000Z","dependencies_parsed_at":"2024-09-08T07:36:35.521Z","dependency_job_id":"e17aeb24-e06c-4880-ba78-4dd7649e9142","html_url":"https://github.com/ivangfr/spring-boot-grpc-client-server","commit_stats":null,"previous_names":["ivangfr/spring-boot-grpc-client-server"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangfr%2Fspring-boot-grpc-client-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangfr%2Fspring-boot-grpc-client-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangfr%2Fspring-boot-grpc-client-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivangfr%2Fspring-boot-grpc-client-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivangfr","download_url":"https://codeload.github.com/ivangfr/spring-boot-grpc-client-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248271921,"owners_count":21075800,"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":["client-server","grpc","java","postgresql","protocol-buffers","sprind-data-jpa","spring-boot","spring-web-mvc"],"created_at":"2024-09-24T14:07:26.055Z","updated_at":"2025-04-10T18:44:33.542Z","avatar_url":"https://github.com/ivangfr.png","language":"Java","funding_links":["https://github.com/sponsors/ivangfr"],"categories":[],"sub_categories":[],"readme":"# spring-boot-grpc-client-server\n\nThe goal of this project is to implement two [`Spring Boot`](https://docs.spring.io/spring-boot/index.html) applications using [`gRPC`](https://grpc.io/): the server, called `movie-grpc-server`, and the shell client, named `movie-grpc-client`. The library `movie-grpc-lib` defines the `gRPC` interface that both the server and client applications use.\n\n## Proof-of-Concepts \u0026 Articles\n\nOn [ivangfr.github.io](https://ivangfr.github.io), I have compiled my Proof-of-Concepts (PoCs) and articles. You can easily search for the technology you are interested in by using the filter. Who knows, perhaps I have already implemented a PoC or written an article about what you are looking for.\n\n## Additional Readings\n\n- \\[**Medium**\\] [**Implementing gRPC Server and Client using Spring Boot**](https://medium.com/@ivangfr/implementing-grpc-server-and-client-using-spring-boot-4411b26138be)\n\n## Applications\n\n- **movie-grpc-lib**\n\n  A Maven project that defines the `gRPC` interface (using [`Protocol Buffers`](https://protobuf.dev/)) for managing movies. This library is shared by both the `movie-grpc-server` and `movie-grpc-client` to ensure they can communicate properly over `gRPC`.\n\n- **movie-grpc-server**\n\n  A Spring Boot web application that has `movie-grpc-lib` as dependency. It implements the `gRPC` functions for managing movies and runs a `gRPC` server to handle `movie-grpc-client` calls. The movies are stored in a [`PostgreSQL`](https://www.postgresql.org/) database.\n\n- **movie-grpc-client**\n\n  A Spring Boot shell application that has `movie-grpc-lib` as dependency. It has a `stub` used to call `movie-grpc-server` functions.\n\n## Packaging and Installing movie-grpc-lib\n\nIn a terminal and inside the `spring-boot-grpc-client-server` root folder, run the command below:\n```\n./mvnw clean install --projects movie-grpc-lib\n```\n\n## Start PostgreSQL Docker container\n\nRun the command below to start `postgres` Docker container\n```\ndocker run -d --name postgres \\\n  -p 5432:5432 \\\n  -e POSTGRES_USER=postgres \\\n  -e POSTGRES_PASSWORD=postgres \\\n  -e POSTGRES_DB=moviesdb \\\n  postgres:17.2\n```\n\n## Running applications\n\n- **movie-grpc-server**\n\n  In a terminal and inside the `spring-boot-grpc-client-server` root folder, run the following command:\n  ```\n  ./mvnw clean spring-boot:run --projects movie-grpc-server\n  ```\n\n- **movie-grpc-client**\n\n  Open another terminal, make sure you are in the `spring-boot-grpc-client-server` root folder. Then, run the command below to build the executable jar file:\n  ```\n  ./mvnw clean package --projects movie-grpc-client -DskipTests\n  ```\n\n  Finally, to start the client shell, run:\n  ```\n  ./movie-grpc-client/target/movie-grpc-client-0.0.1-SNAPSHOT.jar\n  ```\n\n## Demo\n\n![demo](/documentation/demo.gif)\n\n## Shutdown\n\n- To stop the applications, go to the terminals where they are running and press `Ctrl+C`;\n- To stop the `postgres` Docker container, run:\n  ```\n  docker rm -fv postgres\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivangfr%2Fspring-boot-grpc-client-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivangfr%2Fspring-boot-grpc-client-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivangfr%2Fspring-boot-grpc-client-server/lists"}