Don't Crash the BEAM: Safe Interop with Ports and C Nodes
Dettagli
đŁď¸ Speaker
Riccardo Binetti
âšď¸ Abstract
Youâve mastered the art of the NIF and squeezed every ounce of performance out of your code. But with great power comes great responsibility (and the occasional segfault that takes down your production node).
This talk explores how to run native code without risking the stability of your virtual machine.
We will start by looking at Ports, the simplest way to move dangerous code into a separate OS process. Weâll cover the protocols for talking to standard input/output and how to ensure your external program doesnât turn into a zombie if the BEAM decides to restart.
Then weâll move on to the heavy artillery: C Nodes. Weâll see how to use the ei library to make an external executable behave like an Erlang node. Did you know native code can connect to epmd, participate in the cluster and exchange messages just like a GenServer? We will demystify the setup required to make this happen and discuss the security implications.
Finally, we will break down the tradeoffs between them, comparing latency, complexity and fault tolerance, so you know exactly which tool to reach for when a NIF is just too risky.
==================================================================
Location: Fluida in Via Carlo Imbonati 18, 20159, Milano MI.
L'evento inizierĂ alle 19:00, ma l'ingresso alla struttura sarĂ possibile dalle dalle 18.30 in avanti.
â ď¸ Per accedere alla struttura sarĂ necessario iscriversi all'evento con il proprio nome e cognome e fornirlo all'ingresso. â ď¸
Ti aspettiamo!
NOTA: come sempre, se hai degli argomenti che vuoi approfondire, dei dubbi da toglierti, un talk da provare, insomma, se hai delle proposte sui prossimi incontri faccelo sapere! Questo Meetup deve vivere dei contributi dei suoi partecipanti e contribuire è il modo migliore per imparare đ
