dwyl / dwyl/logs

Side Quest: How to send an `HTTP` Request in a Background Process?

Open
#11 3 comments 0 reactions 0 assignees View on GitHub
discuss elixir enhancement help wanted learn priority-1 technical
Dominant language
Elixir
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The **_last_ thing** we **want** in our logging library
is to have a **_blocking_ `HTTP` request**
when sending a log entry to our remote logging service.
***So*** we need to research, document & implement the best (simplest or fastest) way
of doing this using a **_background_ process**.

Starting point:
+ [ ] https://elixir-lang.org/getting-started/processes.html
+ [ ] https://blog.appsignal.com/2019/05/14/elixir-alchemy-background-processing.html
+ [ ] https://samuelmullen.com/articles/elixir-processes-send-and-receive

# Todo

+ [ ] Create [new experiment](https://github.com/dwyl/technology-stack/issues/96) for capturing the full journey: https://github.com/dwyl/elixir-http-request-tutorial
+ [ ] Document _all_ the steps taken comprehensively e.g: [dwyl/phoenix-content-negotiation-tutorial](https://github.com/dwyl/phoenix-content-negotiation-tutorial)

+ [ ] Decide which `HTTP` library we will use:
https://elixirforum.com/t/mint-vs-finch-vs-gun-vs-tesla-vs-httpoison-etc/38588
e.g: should we just use https://github.com/benoitc/hackney because it's _already_ included in all our `Phoenix` projects e.g:
https://github.com/dwyl/mvp/blob/c19c01823db6e4922696f764edb8f0189677cbc1/mix.lock#L30
Or should we explore one of the newer cooler options like `Finch`: https://github.com/sneako/finch ?
If we're going to send the requests in a non-blocking sub-process how much do we _care_ about "performance"?
Surely the network latency will totally dwarf any processing speed boost from using a newer fancier library? 💭
These are the questions we want to answer. ❓ (Hopefully we can get a definitive answer for ourselves and others)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.