https://github.com/p12s/product-store
🍔 Product-storage service, work on gRPC. Client sends the URL to download products, and requests the result. The server transfer request to a third-party resource for .csv-file uploading and saves the products to own database.
https://github.com/p12s/product-store
grpc-client grpc-server
Last synced: 5 months ago
JSON representation
🍔 Product-storage service, work on gRPC. Client sends the URL to download products, and requests the result. The server transfer request to a third-party resource for .csv-file uploading and saves the products to own database.
- Host: GitHub
- URL: https://github.com/p12s/product-store
- Owner: p12s
- License: apache-2.0
- Created: 2021-11-30T19:51:15.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-12T07:50:03.000Z (over 4 years ago)
- Last Synced: 2024-06-22T17:02:16.138Z (almost 2 years ago)
- Topics: grpc-client, grpc-server
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔥 Run
Download:
```sh
git clone https://github.com/p12s/product-store.git && cd product-store
mv server/.env.example server/.env
mv client/.env.example client/.env
docker-compose up --build
```
Stop:
```sh
docker-compose down
```
# What is going on there
What does the client do:
- sending address to download products (for example, http://164.92.251.245:8080/api/v1/products/)
- requesting products with pagination functionality (limit, skip)
- requesting products continuously, simulate endless loading (based on bidirectional-stream)
What does the server do:
- going to the url, download and save the csv-file, extract the products from it, save to your database
- giving products with pagination functionality (limit, skip)
- giving away products in stream
Services are raised in docker-compose, the client starts and executes requests with output to the console, and then exits.
The server continues to work
# Separate services
[Client](client)
[Server](server)
Example external csv-product store source (**if still works**)
[swagger-doc](http://164.92.251.245:8080/api/v1/products/)
[products](http://164.92.251.245:8080/api/v1/products/)
If first resource isn't work - check this example:
[swagger-doc](https://github.com/p12s/csv-create-api/tree/master/docs)