Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egrizq/product-analysis-with-concurrency
Analysis and process data with concurrency supported by golang and postgres
https://github.com/egrizq/product-analysis-with-concurrency
gin golang gorm goroutines postgres
Last synced: 8 days ago
JSON representation
Analysis and process data with concurrency supported by golang and postgres
- Host: GitHub
- URL: https://github.com/egrizq/product-analysis-with-concurrency
- Owner: egrizq
- Created: 2024-04-05T08:52:11.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-04-17T05:33:11.000Z (7 months ago)
- Last Synced: 2024-04-17T09:18:04.971Z (7 months ago)
- Topics: gin, golang, gorm, goroutines, postgres
- Language: Go
- Homepage:
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Product Store with Concurrency
## Description
The project is designed to efficiently process and store 15001 rows of CSV and 817 JSON file into PostgreSQL database utilizing the GORM library. It leverages goroutines for concurrent processing, waitgroups for synchronization, and mutexes to handle race condition, aiming for execution times (< 1 second) to streamline data loading tasks.
## Tech Stack
1. Golang
2. Postgres
3. Gin Framework
4. Gorm DATABASE ORM## Getting Started
1. Clone the repository:
```bash
git clone https://github.com/egrizq/product-analysis-with-concurrency.git
```2. Copy environment for database:
```bash
cp .env.example .env
```3. Run the application:
```bash
make dev
```
or alternatively
```bash
go run main.go
```4. The program will run on [http://localhost:8000](http://localhost:8000).
## API ENDPOINT
| Method | Endpoint | Description |
|----------|----------|----------|
| POST | localhost:8000/process/insert | Import JSON & CSV file |
| POST | localhost:8000/process/reports | Process & analysis |