Skip to content

An application to manage and search for laptop configurations using gRPC

Notifications You must be signed in to change notification settings

HOU-SZ/pcbook-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PC Book - Go

This repository contains the Golang codes for an application to manage and search for laptop configurations using gRPC and golang.

The PC book application

PC book is an application to manage and search laptop configurations. It provides 4 gRPC APIs:

  1. Create a new laptop: [unary gRPC]

    This is a unary RPC API that allows client to create a new laptop with some specific configurations.

    The input of the API is a laptop, and it returns the unique ID of the created laptop.

    The laptop ID is a UUID, and can be set by the client, or randomly generated by the server if it's not provided.

  2. Search laptops with some filtering conditions: [server-streaming gRPC]

    This is a server-streaming RPC API that allows client to search for laptops that satisfies some filtering conditions, such as the maximum price, minimum cores, minimum CPU frequency, and minimum RAM.

    The input of the API is the filtering conditions, and it returns a stream of laptops that satisfy the conditions.

  3. Upload a laptop image file in chunks: [client-streaming gRPC]

    This is a client-streaming RPC API that allows client to upload 1 laptop image file to the server. The file will be split into multiple chunks of 1 KB, and they will be sent to the server as a stream.

    The input of the API is a stream of request, which can either be:

    • Metadata of the image (only the 1st request): which contains the laptop ID, and the image type (or file extension) such as .jpg or .png.
    • Or a binary data chunk of the image.

    The total size of the image should not exceed 1 MB.

    The API will returns a response that contains the uploaded image ID (random UUID generated by the server) and the total size of the image.

About

An application to manage and search for laptop configurations using gRPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published