Skip to content

PayamDarabi/GrpcServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Order Management GrpcServer


gRPC Server

An Awesome Example For gRPC Server

Table Of Contents

About The Project

gRPC is a cross-platform open source high performance remote procedure call framework. gRPC was initially created by Google, which used a single general-purpose RPC infrastructure called Stubby to connect the large number of microservices running within and across its data centers from about 2001. This project includes the complete implementation of a grpc server in which three different services have been created to meet the business needs of the project, which is a shopping cart and order registration system. You can use this example to implement the examples you want.

This project includes the complete implementation of a grpc server in which three different services have been created to meet the business needs of the project (here is a shopping cart and order registration system).

Built With

Technologies that used in this project

Getting Started

This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.

Prerequisites

Visual Studio 2022 with the ASP.NET and web development workload.

Installation

  1. Clone the repo

    git clone https://github.com/PayamDarabi/GrpcServer.git
  2. Enter your application runtime url in launchSettings.json

    "applicationUrl": "http://localhost:5213;https://localhost:7199",
  3. Run the project

    Capture

Usage

This code shows how to create an ASP.NET Core gRPC Server. At the end, you'll have a gRPC service that responses to clients that need its functionalities.

The Service structure of this project is as follows:

Customer service (to perform CRUD operations on the customer entity)
Product service (to perform CRUD operations on the product entity)
Order service (to perform CRUD operations on the order entity and order items (shopping cart))

OrderManagementGrpcServer project files and structure:

Protos folder : defines the gRPC and is used to generate the gRPC server assets.
Services folder : Contains the implementation of the services.
appSettings.json : Contains configuration data such as the protocol used by Kestrel.
Program.cs : The entry point for the gRPC service.

Note that For more simplicity, the service and repository layers are placed in the same project and in the corresponding folders. Also, instead of connecting to the database, static lists are used for storage in the repository layer. You can use this example to implement the specific services you want, or by participating in the project, you can add more features to the project.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
  • Please make sure you check your spelling and grammar.
  • Create individual PR for each suggestion.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Give a Star! ⭐

If you like or are using this project please give it a star. Thanks!

Authors