{"id":24656749,"url":"https://github.com/alexejdumka/wordcloud-grpc","last_synced_at":"2026-05-07T03:32:08.730Z","repository":{"id":262631182,"uuid":"887828512","full_name":"AlexejDumka/Wordcloud-grpc","owner":"AlexejDumka","description":"This project demonstrates a Java client interacting with a Python server over gRPC to generate word cloud images.","archived":false,"fork":false,"pushed_at":"2024-11-13T12:26:44.000Z","size":22199,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T23:56:44.969Z","etag":null,"topics":["grpc","java","python"],"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/AlexejDumka.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":"2024-11-13T11:02:52.000Z","updated_at":"2025-01-23T23:37:23.000Z","dependencies_parsed_at":"2024-11-13T13:42:43.695Z","dependency_job_id":null,"html_url":"https://github.com/AlexejDumka/Wordcloud-grpc","commit_stats":null,"previous_names":["alexejdumka/wordcloud-grpc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexejDumka%2FWordcloud-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexejDumka%2FWordcloud-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexejDumka%2FWordcloud-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexejDumka%2FWordcloud-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexejDumka","download_url":"https://codeload.github.com/AlexejDumka/Wordcloud-grpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244728611,"owners_count":20500087,"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":["grpc","java","python"],"created_at":"2025-01-25T23:56:49.983Z","updated_at":"2026-05-07T03:32:03.698Z","avatar_url":"https://github.com/AlexejDumka.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Word Cloud Generator with Java Client and Python Server\r\nThis project demonstrates a Java client interacting with a Python server over gRPC to generate word cloud images. The primary purpose is to showcase the Java clientвЂ™s ability to connect with a Python server, send text input, and handle the returned word cloud image.\r\nThe Java client sends a text string to the Python server via gRPC. The server processes the text, creates a word cloud image, and returns it in PNG format. The client then saves this image locally.\r\n\r\n## Project Structure\r\n\r\n```\r\nwordcloud-grpc\r\n     |-- java-client\r\n     |-- python-server \r\n     |-- README.md\r\n     |-- docker-compose.yml \r\n```\r\n## Key Features\r\n - **Java Client Demonstration**: The Java client showcases cross-language communication with a Python server using gRPC.\r\n - **Word Cloud Generation**: The server generates a word cloud image based on text input from the client.\r\n - **Error Handling and Logging**: Both applications include error handling and logging for easy debugging.\r\n - **Docker Support**: Both the client and server are containerized and can be orchestrated with Docker Compose.\r\n\r\n##    Prerequisites\r\n\r\n*    Java 11 or higher (for the Java client)\r\n*    Python 3.9 or higher (for the Python server)\r\n*    Docker and Docker Compose (optional, for running in containers)\r\n\r\n## Setup\r\n\r\nClone the Repository\r\n```\r\ngit clone https://github.com/AlexejDumka/workloud-grpc.git\r\ncd wordcloud-grpc\r\n```\r\n   \r\nBuild and Run with Docker Compose\r\n   To simplify running both applications together, use Docker Compose:\r\n\r\n```\r\ndocker-compose up --build\r\n```\r\n\r\nThis command will:\r\n\r\n - Build and start the Python server, which listens on port 50051 for incoming gRPC requests.\r\n - Build and start the Java client, which sends text data to the server and saves the word cloud image.\r\n - Running Standalone Containers.\r\n   \r\nIf you prefer to run the containers separately, you can build and run them using the following commands:\r\n\r\nPython Server:\r\n\r\n```\r\ndocker build -t python-server ./python-server\r\ndocker run -d --name python-server -p 50051:50051 python-server\r\n```\r\n\r\nJava Client:\r\n\r\n```\r\ndocker build -t java-client ./java-client\r\ndocker run --name java-client --network=wordcloud-grpc_wordcloud-network java-client\r\n```\r\ndocker build -t java-client ./java-client\r\ndocker run --name java-client --network=wordcloud-grpc_wordcloud-network java-client\r\n\r\n## Detailed Setup (Without Docker)\r\n\r\nIf you prefer to run each application separately, follow the instructions below.\r\n\r\n### Python Server Setup\r\n\r\nNavigate to the python-server directory:\r\n\r\n```\r\ncd python-server\r\n```\r\n\r\nInstall dependencies (if necessary):\r\n\r\n```\r\npip install -r requirements.txt\r\n```\r\n\r\nGenerate gRPC Code for Python (if necessary): \r\n\r\n\r\n```python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. wordcloud.proto```\r\n\r\nRun the server:\r\n```python server.py```\r\n\r\n### Java Client Setup\r\n\r\nNavigate to the java-client directory:\r\n```\r\ncd java-client\r\n```\r\n\r\nGenerate gRPC Code for Java (if necessary):\r\n```\r\nprotoc --java_out=./java-client/src/main/java --grpc-java_out=./java-client/src/main/java wordcloud.proto\r\n```\r\n\r\nAssembly the client with Maven:\r\n \r\n```\r\nmvn clean assembly:single\r\n```\r\n\r\nRun the client:\r\n\r\n```\r\njava -jar target/java-client-1.0-SNAPSHOT-jar-with-dependencies.jar\r\n```\r\n## Configuration\r\n\r\nThe default hostname and port for gRPC communication are configured to work with Docker Compose. If running without Docker, ensure the client connects to the correct hostname and port of the Python server.\r\n\r\n## Troubleshooting\r\n\r\n - Connection Issues: If the Java client cannot connect to the server, ensure the server is running and accessible at the configured hostname and port (default: python-server:50051 in Docker).\r\n - SLF4J Warnings: If the Java client logs SLF4J warnings, ensure SLF4J and Logback dependencies are correctly set up in pom.xml.\r\n - gRPC Code Generation: If the server is missing gRPC files, regenerate them as described above.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexejdumka%2Fwordcloud-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexejdumka%2Fwordcloud-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexejdumka%2Fwordcloud-grpc/lists"}