Skip to content

Analysis and process data with concurrency supported by golang and postgres

Notifications You must be signed in to change notification settings

egrizq/product-analysis-with-concurrency

Repository files navigation

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:

    git clone https://github.com/egrizq/product-analysis-with-concurrency.git
  2. Copy environment for database:

    cp .env.example .env
  3. Run the application:

    make dev

    or alternatively

    go run main.go
  4. The program will run on http://localhost:8000.

API ENDPOINT

Method Endpoint Description
POST localhost:8000/process/insert Import JSON & CSV file
POST localhost:8000/process/reports Process & analysis

About

Analysis and process data with concurrency supported by golang and postgres

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages