Skip to content

Conversation

@SanketNeema
Copy link

In this solution, I am proposing

  1. Microservice with, a RestAPI which accepts the request.
  2. creating a network graph, by calling the given URL
  3. Logic to compute the smallest degree of separation between given two persons.
  4. A mechanism to avoid throttling is also covered.

This is 1st version of my solution,
In my next versions

  1. optimize the solution by adding goroutines. and other possible optimizations.
  2. Adding Unit test case.

@SanketNeema
Copy link
Author

After doing the optimization using goroutine and wait-group.
able to bring down time from 50 min to 5 min.

more optimization can be possible by doing the following things

  1. implementing the movie details fetching part. with goroutines.
  2. killing the other goroutine call once we found the 2nd person, with the help of the channel. (done/select concept)

@SanketNeema SanketNeema changed the title solution-version-1 solution-version-1-sanket-neema Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant