Skip to content

a microservice and a job that process large amount of jsonl files.

Notifications You must be signed in to change notification settings

emresin12/AWS-bucket-job

Repository files navigation

Golang Case Study

Description

This project consists of two main parts

  • A job that processes JSON Lines files to write data to database.
  • A microservice that provides and endpoint to fetch records by ID

Installation

  • Clone the repository:
git clone https://[email protected]/emresinspace/cimrijob.git
  • Create an .env file using .env.example and fill it with required credentials.
  • To build the images use
docker-compose build
  • To run the project:
docker-compose up

Then everything will be ready.

For demonstration purposes job and microservice is starting at the same time and job runs only one time. After job is completed data will be available to retrieval from the service.

Here is a sample request for id=1000:

curl --location --request GET 'http://127.0.0.1:8080/product/1000'

Response:

{
    "id": 1000,
    "price": 63816.95,
    "title": "title1000",
    "category": "cep-telefonlari",
    "brand": "lg",
    "url": "http://site.example.com/?id=1000",
    "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam vel elit tortor. Fusce posuere ante sollicitudin risus tempus, quis accumsan tortor accumsan."
}

About

a microservice and a job that process large amount of jsonl files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages