or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
EPF C4 - Tomás Arjovsky - Week 8
These are the updates for the week of 2023/09/04.
First update
Gossipsub design
Had a design session with Tomás Grüner on the dessign for the gossipsub implementation in elixir. We concluded the following:
Project presentation
I studied a bit and reviewed the slides for the project presentation on Tuesday 5th.
Second update
Architecture validation
I had a sync with other seniors at lambda to validate the elixir architecutre. I wrote the following diagram:
NIF discussion
I also had a great series of discussions and iterations on the usage of NIFs, specially for the case of LibP2P.
Communicating with other languages is typically done with NIFs. The main concern with NIFs is that they run in the same thread as the scheduler, and:
Ideally, we would have the subscription run in a separate goroutine, so that we instead got callbacks asynchronously
The problem with this idea is that running goroutines inside of a NIF might cause unexpected behavior, so we’re making sure that this is something that will work and not impact the BEAM schedulers.
Dirty scheduler NIFs
Alternatively, we can use dirty scheduled NIFs, which run in a separate thread than the normal scheduler. The problem is that there’s a limited amount of dirty schedulers, related to the amount of processors a machine has. If all dirty schedulers are waiting on blocking input, the whole BEAM is blocked as well.
There are Dirty I/O schedulers, but they seem to have the same issue.
Ports
We decided that we would move the LibP2P implementation to ports, to communicate to go.
Ports run in a separate process than the BEAM, which means that if they crash, the erlang VM won’t and also that blocking is not a problem.
Advantages:
Disadvantages are:
A go main program could be used to: