Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Search multiple resource in parallel #832

Merged
merged 5 commits into from
Jun 4, 2020
Merged

Conversation

arberiii
Copy link
Member

@arberiii arberiii commented Jun 3, 2020

Search Short's resources by starting a goroutine for each resource.

This PR is part of issue #260, as the continuation of #PR 829.

The approach used here is very similar to Rob Pike's talk on Go Concurrency Patterns
Rob Pike
.

@arberiii arberiii changed the title Search resources concurrently Search Short resources concurrently Jun 3, 2020
@arberiii arberiii self-assigned this Jun 3, 2020
@arberiii arberiii linked an issue Jun 3, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #832 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #832   +/-   ##
=======================================
  Coverage   49.88%   49.88%           
=======================================
  Files         123      123           
  Lines        2658     2658           
  Branches      149      149           
=======================================
  Hits         1326     1326           
  Misses       1282     1282           
  Partials       50       50           
Flag Coverage Δ
#golang 70.50% <ø> (ø)
#typescript 23.49% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bb07ec...8f6c3c2. Read the comment docs.

@magicoder10 magicoder10 changed the title Search Short resources concurrently Search resources in parallel Jun 4, 2020
@magicoder10 magicoder10 changed the title Search resources in parallel Search multiple resource in parallel Jun 4, 2020
backend/app/usecase/search/order/unchanged.go Outdated Show resolved Hide resolved
backend/app/usecase/search/order/unchanged.go Outdated Show resolved Hide resolved
backend/app/usecase/search/order/unchanged.go Outdated Show resolved Hide resolved
backend/app/usecase/search/search.go Outdated Show resolved Hide resolved
@magicoder10
Copy link
Member

Hi @arberiii , thank you so much for working on this PR! Please include unit test so that we don't accidentally break this feature in the future.

@magicoder10
Copy link
Member

Discussed offline. Will add unit tests in the next PR.

@magicoder10 magicoder10 merged commit 9184c4e into master Jun 4, 2020
@magicoder10 magicoder10 deleted the search-resources branch June 4, 2020 16:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create RESTful search API in Go
3 participants