Skip to content

hadiweslati/simplesurance-go-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simplesurance-go-challenge

simplesurance-go-challenge

This is my solution on the test you assigned to me. The code contains:

  • main.go file: the entry point of the application.
  • counter package: for the Counter model.
  • stress-test folder: contains a test case of 5 simultaneous calls to the endpoint.

This task took me between 2-3 hours.
I want to deliver the best solution, I began with:\

  1. An in-memory persist solution: It was very straight forward.
  2. I tried to enhance that by adding a simplified version of a semaphore.
  3. Although I thought about implementing a FIFO queue, but It's almost the same as what I implemented with more code (adding enqueue & dequeue methods).

I hope you find my suggested solution to be satisfactory.
Eagerly awaiting your feedback. Thank you!

About

simplesurance-go-challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages