{"id":25961880,"url":"https://github.com/nameko/nameko-examples-grpc","last_synced_at":"2025-08-20T12:03:49.296Z","repository":{"id":67453612,"uuid":"169856123","full_name":"nameko/nameko-examples-grpc","owner":"nameko","description":"Examples of Nameko gRPC Extensions","archived":false,"fork":false,"pushed_at":"2019-03-06T16:13:10.000Z","size":902,"stargazers_count":59,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-12T12:07:25.309Z","etag":null,"topics":["grpc","nameko","nodejs","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nameko.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,"zenodo":null}},"created_at":"2019-02-09T10:39:01.000Z","updated_at":"2025-03-08T03:24:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5fef449-38b8-4ba3-83bf-ebd67f0f6848","html_url":"https://github.com/nameko/nameko-examples-grpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nameko/nameko-examples-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nameko%2Fnameko-examples-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nameko%2Fnameko-examples-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nameko%2Fnameko-examples-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nameko%2Fnameko-examples-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nameko","download_url":"https://codeload.github.com/nameko/nameko-examples-grpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nameko%2Fnameko-examples-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271314371,"owners_count":24738161,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["grpc","nameko","nodejs","python"],"created_at":"2025-03-04T19:50:06.726Z","updated_at":"2025-08-20T12:03:49.291Z","avatar_url":"https://github.com/nameko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nameko gRPC Examples\n\nThis repository contains updated [Nameko Examples](https://github.com/nameko/nameko-examples) that demonstrate usage of [nameko-grpc](https://github.com/nameko/nameko-grpc) library.\n\n## Overview\n\n[gRPC](https://grpc.io/) is a _\"A high-performance, open-source universal RPC framework\"_ and a great tool when building modern Microservices Architectures.  \n\nOur example will demonstrate cross platform integration between NodeJS service exposing GraphQL API which will consume data from Nameko Services exposing gRPC APIs.\n\nHigh level architecture overview of our examples:\n\n![Nameko gRPC examples](./images/architecture.png)\n\nWe've got:\n- **Gateway** - NodeJS Service with GraphQL API.\n- **Orders** - Python Nameko Service with gRPC API and PostgreSQL as its data store. This service will also publish `order_created` event.\n- **Products** - Python Nameko Service with gRPC API and Redis as its data store. This service will also consume `order_created` event.\n\n## GraphQL Schema\n![Nameko gRPC examples](./images/graphql-schema.png)\nGateway NodeJS service exposes simple schema for our API\n\n## Prerequisites \n\nFor running examples locally we highly recommend setting up [python virtual environment](https://virtualenvwrapper.readthedocs.io/en/stable/) first.  \n\u003e **Examples have only been tested with Python 3.7 and NodeJS v10.15**\n\n\n### Install Dependencies\n\nOnce you're in context of your virtual environment you can install dependencies by running `install-dependencies` make target:  \n```sh\n$ make install-dependencies\n```\nThis will install both Python and NodeJS dependencies.\n\n## Running Examples\n\nTo run and develop examples locally `nodemon` nodejs utility has to be installed globally:\n```sh\n$ sudo npm install -g nodemon --unsafe-perm=true --allow-root\n```\n\nStart examples by running `develop` make target:\n\n```sh\n$ make develop\n```\n\nAll 3 services should be up and running now.\n\n## Sample Queries\n\nGraphQL Playground utility has also started and can be accessed on `http://localhost:4000/playground` url.\n\n![Nameko gRPC examples](./images/playground.png)\n\nOnce there click **`PRETTIFY`** button on each tab to enable query selection.\nYou can execute queries in this order:\n\n- Products Tab\n  - CreateProduct\n  - GetProduct\n- Orders Tab\n  - CreateOrder\n  - GetOrder\n\n## Kubernetes Integration\n\nKubernetes `charts` are included and Docker Images for all 3 services have been build and are available to be pulled form Docker Hub.\n\nSet your desired kubernetes **`CONTEXT`** and **`NAMESPACE`** on top of main Makefile before running examples below.\n\nRun `deploy-dependencies` make target to install RabbitMQ, Redis and PostgreSQL:\n\n```sh\n$ make deploy-dependencies\n```\n\nRun `deploy-services` make target to deploy Gateway, Products and Orders services to your desired namespace:\n\n```sh\n$ make deploy-services\n```\n\nOnce everything is deployed and you verified pods are successfully running, use [Telepresence](https://www.telepresence.io/) tool to easily access resources inside of your cluster.  \nRun `telepresence` make target to start a new session\n\n```sh\n$ make telepresence\n```\n\nNow you should be able to navigate to http://gateway/playground to play with the examples.\n\n## Building Docker Images\n\nWhen building docker images you can easily push them to your own Docker Hub Org by overriding default value of `DOCKER_HUB_ORG`:  \n```sh\n$ DOCKER_HUB_ORG=my_org make build-images push-images deploy-services\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnameko%2Fnameko-examples-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnameko%2Fnameko-examples-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnameko%2Fnameko-examples-grpc/lists"}