Giter VIP home page Giter VIP logo

grpc-user-project's Introduction

gRPC Go Application README

This Go application is built on the power of gRPC to enable a client-server architecture. It offers two essential methods: GetUserById and GetUserListByIds for efficient retrieval of user data. What makes this application unique is the utilization of bidirectional streaming, allowing real-time communication between clients and the server.

Prerequisites

  • Go (1.20 or later)
  • Docker (for containerization)
  • Postman or any gRPC client tool for testing

Quick Start

You can get this application up and running with just one command, assuming you have Docker installed.

docker run -it -p 3001:3001 rahul0409/totality-assignment

Getting Started

Follow these steps to run and test the gRPC application.

1. Clone the Repository

Clone the repository using the command

git clone https://github.com/rahulgupta0409/totality-assignment.git
cd totality-assignment

2. Build the Docker Image

Build the Docker image for the application.

docker build -t totality-assignment .

3. Run the Docker Container

Run a Docker container based on the image, mapping the gRPC service port (e.g., 3001) to a port on your host machine (e.g., 3001).

docker run -p 3001:3001 totality-assignment 

4. Test the gRPC Service

Use a gRPC client (e.g., BloomRPC, grpcurl) or Postman to connect to the gRPC service.

  • Method 1: GetUserById Request: Send a gRPC request to localhost:3001 with the GetUserById method. Provide a User_Id to retrieve a specific user.

Sample Request

{
    "User_Id" : 1
}
  • Method 2: GetUserListByIds Request: Send a gRPC request to localhost:3001 with the GetUserListByIds method. Provide an array of User_Id to retrieve multiple users.

Sample Request

{
   "UserRequestList": [{"UserId":1}, {"UserId":3}, {"UserId":2},  {"UserId":18}]
}

Acknowledgments

Special thanks to the gRPC community for their support and resources.

grpc-user-project's People

Contributors

rahulgupta0409 avatar

Stargazers

 avatar

Watchers

 avatar

grpc-user-project's Issues

K8s deployment

Create deployment-app.yml and service-app.yml files for K8s deployment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.