From 9b3aabfcbfbf0a10488f4dbc7014eb5b76edffc1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 30 Nov 2020 15:54:31 +0100 Subject: Add talk template --- doc/20201202_talk/.gitignore | 9 +++++++ doc/20201202_talk/Makefile | 6 +++++ doc/20201202_talk/talk.pdf | Bin 0 -> 35373 bytes doc/20201202_talk/talk.tex | 62 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 doc/20201202_talk/.gitignore create mode 100644 doc/20201202_talk/Makefile create mode 100644 doc/20201202_talk/talk.pdf create mode 100644 doc/20201202_talk/talk.tex diff --git a/doc/20201202_talk/.gitignore b/doc/20201202_talk/.gitignore new file mode 100644 index 00000000..6fb8e481 --- /dev/null +++ b/doc/20201202_talk/.gitignore @@ -0,0 +1,9 @@ +* +!.gitignore +!*.svg +!*.png +!*.tex +!Makefile +!.gitignore +!*.pdf + diff --git a/doc/20201202_talk/Makefile b/doc/20201202_talk/Makefile new file mode 100644 index 00000000..c50783f2 --- /dev/null +++ b/doc/20201202_talk/Makefile @@ -0,0 +1,6 @@ +talk.pdf: talk.tex + pdflatex talk.tex + +fig_%.pdf: fig_%.svg + inkscape -D -z --file=$^ --export-pdf=$@ --export-latex + diff --git a/doc/20201202_talk/talk.pdf b/doc/20201202_talk/talk.pdf new file mode 100644 index 00000000..573e4bf7 Binary files /dev/null and b/doc/20201202_talk/talk.pdf differ diff --git a/doc/20201202_talk/talk.tex b/doc/20201202_talk/talk.tex new file mode 100644 index 00000000..4c0bfb21 --- /dev/null +++ b/doc/20201202_talk/talk.tex @@ -0,0 +1,62 @@ +%\nonstopmode +\documentclass[aspectratio=169]{beamer} +\usepackage[utf8]{inputenc} +% \usepackage[frenchb]{babel} +\usepackage{amsmath} +\usepackage{mathtools} +\usepackage{breqn} +\usepackage{multirow} +\usetheme{Luebeck} +\usepackage{graphicx} +%\useoutertheme[footline=authortitle,subsection=false]{miniframes} + +\beamertemplatenavigationsymbolsempty +\setbeamertemplate{footline} +{% + \leavevmode% + \hbox{\begin{beamercolorbox}[wd=.15\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fill]{author in head/foot}% + \usebeamerfont{author in head/foot} \insertframenumber{} / \inserttotalframenumber + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.2\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm plus1fill,rightskip=.3cm]{author in head/foot}% + \usebeamerfont{author in head/foot}\insertshortauthor + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.65\paperwidth,ht=2.5ex,dp=1.125ex,leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}% + \usebeamerfont{title in head/foot}\insertshorttitle~--~\insertshortdate + \end{beamercolorbox}}% + \vskip0pt% +} + +\usepackage{tabu} +\usepackage{multicol} +\usepackage{vwcol} +\usepackage{stmaryrd} +\usepackage{graphicx} + +\usepackage[normalem]{ulem} + +\title[Garage : jouer dans la cour des grands quand on est un hébergeur associatif]{Garage : jouer dans la cour des grands \\quand on est un hébergeur associatif} +\subtitle{(ou pourquoi on a décidé de réinventer la roue)} +\author[Q. Dufour \& A. Auvolat]{Quentin Dufour \& Alex Auvolat} +\date[02/12/2020]{Mercredi 2 décembre 2020} + +\begin{document} + +\begin{frame} +\titlepage +\end{frame} + +\begin{frame} + \frametitle{A} + + a +\end{frame} + +\begin{frame} + \frametitle{B} + + b +\end{frame} + +\end{document} + +%% vim: set ts=4 sw=4 tw=0 noet spelllang=fr : -- cgit v1.2.3 From 9a57a0319a5bef515806d8107c8089af8943043a Mon Sep 17 00:00:00 2001 From: Quentin Date: Mon, 30 Nov 2020 17:32:37 +0100 Subject: Talk --- doc/20201202_talk/img/cloud.png | Bin 0 -> 19631 bytes doc/20201202_talk/img/dc.jpg | Bin 0 -> 368854 bytes doc/20201202_talk/img/death.jpg | Bin 0 -> 40176 bytes doc/20201202_talk/img/shh.jpg | Bin 0 -> 87684 bytes doc/20201202_talk/img/sync.png | Bin 0 -> 6283 bytes doc/20201202_talk/talk.pdf | Bin 35373 -> 579839 bytes doc/20201202_talk/talk.tex | 87 +++++++++++++++++++++++++++++++++++++--- 7 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 doc/20201202_talk/img/cloud.png create mode 100644 doc/20201202_talk/img/dc.jpg create mode 100644 doc/20201202_talk/img/death.jpg create mode 100644 doc/20201202_talk/img/shh.jpg create mode 100644 doc/20201202_talk/img/sync.png diff --git a/doc/20201202_talk/img/cloud.png b/doc/20201202_talk/img/cloud.png new file mode 100644 index 00000000..d95b2ae3 Binary files /dev/null and b/doc/20201202_talk/img/cloud.png differ diff --git a/doc/20201202_talk/img/dc.jpg b/doc/20201202_talk/img/dc.jpg new file mode 100644 index 00000000..52cb1e70 Binary files /dev/null and b/doc/20201202_talk/img/dc.jpg differ diff --git a/doc/20201202_talk/img/death.jpg b/doc/20201202_talk/img/death.jpg new file mode 100644 index 00000000..2ffa9180 Binary files /dev/null and b/doc/20201202_talk/img/death.jpg differ diff --git a/doc/20201202_talk/img/shh.jpg b/doc/20201202_talk/img/shh.jpg new file mode 100644 index 00000000..ad4689ce Binary files /dev/null and b/doc/20201202_talk/img/shh.jpg differ diff --git a/doc/20201202_talk/img/sync.png b/doc/20201202_talk/img/sync.png new file mode 100644 index 00000000..d0404996 Binary files /dev/null and b/doc/20201202_talk/img/sync.png differ diff --git a/doc/20201202_talk/talk.pdf b/doc/20201202_talk/talk.pdf index 573e4bf7..a0bbe130 100644 Binary files a/doc/20201202_talk/talk.pdf and b/doc/20201202_talk/talk.pdf differ diff --git a/doc/20201202_talk/talk.tex b/doc/20201202_talk/talk.tex index 4c0bfb21..c3e9f625 100644 --- a/doc/20201202_talk/talk.tex +++ b/doc/20201202_talk/talk.tex @@ -46,17 +46,94 @@ \end{frame} \begin{frame} - \frametitle{A} + \frametitle{La question qui tue} + + \begin{center} + \includegraphics[scale=3]{img/sync.png} \\ + \Huge Pourquoi vous n'hébergez pas vos fichiers chez vous ? \\ + \end{center} - a \end{frame} -\begin{frame} - \frametitle{B} +\begin{frame}[t] + \frametitle{La cour des grands} + +\begin{columns}[t] +\begin{column}{0.5\textwidth} + {\huge Le modèle du cloud...} + +\begin{center} + \includegraphics[scale=0.08]{img/cloud.png} +\end{center} + + + \underline{intégrité} : plus de perte de données + + + \underline{disponibilité} : tout le temps accessible + + + \underline{service} : rien à gérer + + \vspace{0.15cm} + \textbf{changement des comportements} +\end{column} +\pause +\begin{column}{0.5\textwidth} + {\huge ...et son prix} + +\begin{center} + \includegraphics[scale=0.07]{img/dc.jpg} +\end{center} + + - matériel couteux et polluant - b + - logiciels secrets + + - gestion opaque + + \vspace{0.2cm} + \textbf{prisonnier de l'écosystème} +\end{column} +\end{columns} \end{frame} +\begin{frame}[t] + \frametitle{Garage l'imposteur} + +\begin{columns}[t] +\begin{column}{0.5\textwidth} + {\huge Ressemble à du cloud...} + +\begin{center} + \includegraphics[scale=0.5]{img/shh.jpg} +\end{center} + ++ \underline{compatible} avec les apps existantes + ++ \underline{fonctionne} avec le mobile + ++ \underline{s'adapte} aux habitudes prises + + +\end{column} + +\pause +\begin{column}{0.5\textwidth} + {\huge ...fait du P2P} + +\begin{center} + \includegraphics[scale=1]{img/death.jpg} +\end{center} + +\vspace{0.4cm} + ++ \underline{contrôle} de l'infrastructure + ++ \underline{transparent} code libre + ++ \underline{sobre} fonctionne avec de vieilles machines à la maison +\end{column} +\end{columns} + +\end{frame} \end{document} %% vim: set ts=4 sw=4 tw=0 noet spelllang=fr : -- cgit v1.2.3 From ad432eb154432065d8f86938f71aea234ee92fe1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 1 Dec 2020 13:46:23 +0100 Subject: Add some first technical slides --- doc/20201202_talk/.gitignore | 7 +- doc/20201202_talk/Makefile | 4 +- doc/20201202_talk/img/Amazon-S3.jpg | Bin 0 -> 45617 bytes doc/20201202_talk/img/consistent_hashing_1.svg | 301 ++++++++++++++++++ doc/20201202_talk/img/consistent_hashing_2.svg | 334 ++++++++++++++++++++ doc/20201202_talk/img/consistent_hashing_3.svg | 358 ++++++++++++++++++++++ doc/20201202_talk/img/consistent_hashing_4.svg | 377 +++++++++++++++++++++++ doc/20201202_talk/img/garage_distributed.svg | 404 +++++++++++++++++++++++++ doc/20201202_talk/talk.pdf | Bin 579839 -> 744425 bytes doc/20201202_talk/talk.tex | 183 +++++++---- 10 files changed, 1899 insertions(+), 69 deletions(-) create mode 100644 doc/20201202_talk/img/Amazon-S3.jpg create mode 100644 doc/20201202_talk/img/consistent_hashing_1.svg create mode 100644 doc/20201202_talk/img/consistent_hashing_2.svg create mode 100644 doc/20201202_talk/img/consistent_hashing_3.svg create mode 100644 doc/20201202_talk/img/consistent_hashing_4.svg create mode 100644 doc/20201202_talk/img/garage_distributed.svg diff --git a/doc/20201202_talk/.gitignore b/doc/20201202_talk/.gitignore index 6fb8e481..a5e8d18b 100644 --- a/doc/20201202_talk/.gitignore +++ b/doc/20201202_talk/.gitignore @@ -1,9 +1,12 @@ * + +!img + !.gitignore !*.svg !*.png +!*.jpg !*.tex !Makefile !.gitignore -!*.pdf - +!talk.pdf diff --git a/doc/20201202_talk/Makefile b/doc/20201202_talk/Makefile index c50783f2..2bf9f2ac 100644 --- a/doc/20201202_talk/Makefile +++ b/doc/20201202_talk/Makefile @@ -1,6 +1,6 @@ -talk.pdf: talk.tex +talk.pdf: talk.tex img/garage_distributed.pdf img/consistent_hashing_1.pdf img/consistent_hashing_2.pdf img/consistent_hashing_3.pdf img/consistent_hashing_4.pdf pdflatex talk.tex -fig_%.pdf: fig_%.svg +img/%.pdf: img/%.svg inkscape -D -z --file=$^ --export-pdf=$@ --export-latex diff --git a/doc/20201202_talk/img/Amazon-S3.jpg b/doc/20201202_talk/img/Amazon-S3.jpg new file mode 100644 index 00000000..a9501973 Binary files /dev/null and b/doc/20201202_talk/img/Amazon-S3.jpg differ diff --git a/doc/20201202_talk/img/consistent_hashing_1.svg b/doc/20201202_talk/img/consistent_hashing_1.svg new file mode 100644 index 00000000..f8d24fd8 --- /dev/null +++ b/doc/20201202_talk/img/consistent_hashing_1.svg @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + diff --git a/doc/20201202_talk/img/consistent_hashing_2.svg b/doc/20201202_talk/img/consistent_hashing_2.svg new file mode 100644 index 00000000..5ac8faf6 --- /dev/null +++ b/doc/20201202_talk/img/consistent_hashing_2.svg @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + + + + + + + + + diff --git a/doc/20201202_talk/img/consistent_hashing_3.svg b/doc/20201202_talk/img/consistent_hashing_3.svg new file mode 100644 index 00000000..fdfd3efc --- /dev/null +++ b/doc/20201202_talk/img/consistent_hashing_3.svg @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + + + + + + + + + + + diff --git a/doc/20201202_talk/img/consistent_hashing_4.svg b/doc/20201202_talk/img/consistent_hashing_4.svg new file mode 100644 index 00000000..95ed0e02 --- /dev/null +++ b/doc/20201202_talk/img/consistent_hashing_4.svg @@ -0,0 +1,377 @@ + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + 1 + + + + 2 + + + + 3 + + + + 4 + + + + 5 + + + + 6 + + + + + + + + + + + + + + + + + + + diff --git a/doc/20201202_talk/img/garage_distributed.svg b/doc/20201202_talk/img/garage_distributed.svg new file mode 100644 index 00000000..2db03626 --- /dev/null +++ b/doc/20201202_talk/img/garage_distributed.svg @@ -0,0 +1,404 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/20201202_talk/talk.pdf b/doc/20201202_talk/talk.pdf index a0bbe130..c31a1d9a 100644 Binary files a/doc/20201202_talk/talk.pdf and b/doc/20201202_talk/talk.pdf differ diff --git a/doc/20201202_talk/talk.tex b/doc/20201202_talk/talk.tex index c3e9f625..4b8e76c3 100644 --- a/doc/20201202_talk/talk.tex +++ b/doc/20201202_talk/talk.tex @@ -42,7 +42,7 @@ \begin{document} \begin{frame} -\titlepage + \titlepage \end{frame} \begin{frame} @@ -58,82 +58,135 @@ \begin{frame}[t] \frametitle{La cour des grands} -\begin{columns}[t] -\begin{column}{0.5\textwidth} - {\huge Le modèle du cloud...} - -\begin{center} - \includegraphics[scale=0.08]{img/cloud.png} -\end{center} - - + \underline{intégrité} : plus de perte de données - - + \underline{disponibilité} : tout le temps accessible + \begin{columns}[t] + \begin{column}{0.5\textwidth} + {\huge Le modèle du cloud...} + + \begin{center} + \includegraphics[scale=0.08]{img/cloud.png} + \end{center} - + \underline{service} : rien à gérer - - \vspace{0.15cm} - \textbf{changement des comportements} -\end{column} -\pause -\begin{column}{0.5\textwidth} - {\huge ...et son prix} - -\begin{center} - \includegraphics[scale=0.07]{img/dc.jpg} -\end{center} - - - matériel couteux et polluant - - - logiciels secrets - - - gestion opaque - - \vspace{0.2cm} - \textbf{prisonnier de l'écosystème} -\end{column} -\end{columns} + + \underline{intégrité} : plus de perte de données + + + \underline{disponibilité} : tout le temps accessible + + + \underline{service} : rien à gérer + + \vspace{0.15cm} + \textbf{changement des comportements} + \end{column} + \pause + \begin{column}{0.5\textwidth} + {\huge ...et son prix} + + \begin{center} + \includegraphics[scale=0.07]{img/dc.jpg} + \end{center} + + - matériel couteux et polluant + + - logiciels secrets + + - gestion opaque + + \vspace{0.2cm} + \textbf{prisonnier de l'écosystème} + \end{column} + \end{columns} \end{frame} \begin{frame}[t] \frametitle{Garage l'imposteur} -\begin{columns}[t] -\begin{column}{0.5\textwidth} - {\huge Ressemble à du cloud...} - -\begin{center} - \includegraphics[scale=0.5]{img/shh.jpg} -\end{center} - -+ \underline{compatible} avec les apps existantes - -+ \underline{fonctionne} avec le mobile - -+ \underline{s'adapte} aux habitudes prises - - -\end{column} - -\pause -\begin{column}{0.5\textwidth} - {\huge ...fait du P2P} - -\begin{center} - \includegraphics[scale=1]{img/death.jpg} -\end{center} + \begin{columns}[t] + \begin{column}{0.5\textwidth} + {\huge Ressemble à du cloud...} + + \begin{center} + \includegraphics[scale=0.5]{img/shh.jpg} + \end{center} + + + \underline{compatible} avec les apps existantes + + + \underline{fonctionne} avec le mobile + + + \underline{s'adapte} aux habitudes prises + + + \end{column} + + \pause + \begin{column}{0.5\textwidth} + {\huge ...fait du P2P} + + \begin{center} + \includegraphics[scale=1]{img/death.jpg} + \end{center} + + \vspace{0.4cm} + + + \underline{contrôle} de l'infrastructure + + + \underline{transparent} code libre + + + \underline{sobre} fonctionne avec de vieilles machines à la maison + \end{column} + \end{columns} -\vspace{0.4cm} +\end{frame} -+ \underline{contrôle} de l'infrastructure -+ \underline{transparent} code libre +\graphicspath{{img/}} -+ \underline{sobre} fonctionne avec de vieilles machines à la maison -\end{column} -\end{columns} +\begin{frame} + \frametitle{Mais donc, c'est quoi Garage ?} + + \begin{columns}[t] + \begin{column}{0.5\textwidth} + \centering + \textbf{Un système de stockage distribué} + \vspace{1em} + + \def\svgwidth{.7\columnwidth} + \input{img/garage_distributed.pdf_tex} + \end{column} + \pause + + \begin{column}{0.5\textwidth} + \centering + \textbf{qui implémente l'API S3} + \vspace{2em} + + \includegraphics[width=.7\columnwidth]{img/Amazon-S3.jpg} + \end{column} + \end{columns} +\end{frame} +\begin{frame} + \frametitle{Consistent Hashing (DynamoDB)} + \textbf{Comment répartir les fichiers sur les différentes machines ?} + \vspace{1em} + + \centering + + \only<1>{ + \def\svgwidth{.55\columnwidth} + \input{img/consistent_hashing_1.pdf_tex} + } + \only<2>{ + \def\svgwidth{.55\columnwidth} + \input{img/consistent_hashing_2.pdf_tex} + } + \only<3>{ + \def\svgwidth{.55\columnwidth} + \input{img/consistent_hashing_3.pdf_tex} + } + \only<4>{ + \def\svgwidth{.55\columnwidth} + \input{img/consistent_hashing_4.pdf_tex} + } \end{frame} + \end{document} %% vim: set ts=4 sw=4 tw=0 noet spelllang=fr : -- cgit v1.2.3 From 7642229d54fa6d94566dd06fcfdcaf1728880bdd Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 1 Dec 2020 14:31:13 +0100 Subject: Two new slides --- doc/20201202_talk/Makefile | 4 +- doc/20201202_talk/img/garage_tables.svg | 502 +++++++++++++++++++++++++ doc/20201202_talk/img/rustacean-flat-happy.png | Bin 0 -> 33061 bytes doc/20201202_talk/talk.pdf | Bin 744425 -> 801650 bytes doc/20201202_talk/talk.tex | 65 +++- 5 files changed, 559 insertions(+), 12 deletions(-) create mode 100644 doc/20201202_talk/img/garage_tables.svg create mode 100644 doc/20201202_talk/img/rustacean-flat-happy.png diff --git a/doc/20201202_talk/Makefile b/doc/20201202_talk/Makefile index 2bf9f2ac..27dbf788 100644 --- a/doc/20201202_talk/Makefile +++ b/doc/20201202_talk/Makefile @@ -1,6 +1,6 @@ -talk.pdf: talk.tex img/garage_distributed.pdf img/consistent_hashing_1.pdf img/consistent_hashing_2.pdf img/consistent_hashing_3.pdf img/consistent_hashing_4.pdf +talk.pdf: talk.tex img/garage_distributed.pdf img/consistent_hashing_1.pdf img/consistent_hashing_2.pdf img/consistent_hashing_3.pdf img/consistent_hashing_4.pdf img/garage_tables.pdf pdflatex talk.tex img/%.pdf: img/%.svg - inkscape -D -z --file=$^ --export-pdf=$@ --export-latex + inkscape -D -z --file=$^ --export-pdf=$@ diff --git a/doc/20201202_talk/img/garage_tables.svg b/doc/20201202_talk/img/garage_tables.svg new file mode 100644 index 00000000..fc3d8fc5 --- /dev/null +++ b/doc/20201202_talk/img/garage_tables.svg @@ -0,0 +1,502 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + Object + + + + + + bucket + + + + + + file path + + + + + + Version 1 + deleted + + + + + + + Version 2 + id + + size + MIME type + ... + + + + + + Version + + id + h(block 1) + h(block 2) + ... + + + + + Data block + + hash + data + + + + Objects table + Versions table + Blocks table + + diff --git a/doc/20201202_talk/img/rustacean-flat-happy.png b/doc/20201202_talk/img/rustacean-flat-happy.png new file mode 100644 index 00000000..ebce1a14 Binary files /dev/null and b/doc/20201202_talk/img/rustacean-flat-happy.png differ diff --git a/doc/20201202_talk/talk.pdf b/doc/20201202_talk/talk.pdf index c31a1d9a..a6280903 100644 Binary files a/doc/20201202_talk/talk.pdf and b/doc/20201202_talk/talk.pdf differ diff --git a/doc/20201202_talk/talk.tex b/doc/20201202_talk/talk.tex index 4b8e76c3..c9aecba2 100644 --- a/doc/20201202_talk/talk.tex +++ b/doc/20201202_talk/talk.tex @@ -147,8 +147,7 @@ \textbf{Un système de stockage distribué} \vspace{1em} - \def\svgwidth{.7\columnwidth} - \input{img/garage_distributed.pdf_tex} + \includegraphics[width=.7\columnwidth]{img/garage_distributed.pdf} \end{column} \pause @@ -170,23 +169,69 @@ \centering \only<1>{ - \def\svgwidth{.55\columnwidth} - \input{img/consistent_hashing_1.pdf_tex} + \includegraphics[width=.55\columnwidth]{img/consistent_hashing_1.pdf} } \only<2>{ - \def\svgwidth{.55\columnwidth} - \input{img/consistent_hashing_2.pdf_tex} + \includegraphics[width=.55\columnwidth]{img/consistent_hashing_2.pdf} } \only<3>{ - \def\svgwidth{.55\columnwidth} - \input{img/consistent_hashing_3.pdf_tex} + \includegraphics[width=.55\columnwidth]{img/consistent_hashing_3.pdf} } \only<4>{ - \def\svgwidth{.55\columnwidth} - \input{img/consistent_hashing_4.pdf_tex} + \includegraphics[width=.55\columnwidth]{img/consistent_hashing_4.pdf} } \end{frame} +\begin{frame} + \frametitle{Garage Internals : 3 niveaux de consistent hashing} + \centering + \includegraphics[width=.85\columnwidth]{img/garage_tables.pdf} +\end{frame} + +\begin{frame} + \frametitle{Rust : retour d'expérience} + + Garage est entièrement écrit en Rust ! + + \begin{columns} + \begin{column}{0.5\textwidth} + \vspace{2em} + + \textbf{Points forts :} + \vspace{.5em} + \begin{itemize} + \item Langage compilé, très rapide + \vspace{.5em} + \item Typage fort, beaucoup de sécurités + \vspace{.5em} + \item Le meilleur de plusieurs paradigmes: + fonctionnel, orienté objet, impératif + \vspace{.5em} + \item Un écosytème de librairies très complet: + serialisation, async/await, http, ... + \vspace{.5em} + \end{itemize} + + \end{column} + + \begin{column}{0.5\textwidth} + \begin{centering} + \includegraphics[width=0.55\columnwidth]{img/rustacean-flat-happy.png} + \end{centering} + + \vspace{1em} + \textbf{Points faibles :} + \vspace{.5em} + \begin{itemize} + \item Les temps de compilation... + \vspace{.5em} + \item Compliqué à apprendre + \end{itemize} + \end{column} + \end{columns} + +\end{frame} + \end{document} %% vim: set ts=4 sw=4 tw=0 noet spelllang=fr : -- cgit v1.2.3 From f844d4ee9b37a3d65a69e8dbd52e792704edf39e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 1 Dec 2020 17:42:13 +0100 Subject: Add slide on consistency --- doc/20201202_talk/talk.pdf | Bin 801650 -> 815667 bytes doc/20201202_talk/talk.tex | 50 +++++++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/doc/20201202_talk/talk.pdf b/doc/20201202_talk/talk.pdf index a6280903..b27eca29 100644 Binary files a/doc/20201202_talk/talk.pdf and b/doc/20201202_talk/talk.pdf differ diff --git a/doc/20201202_talk/talk.tex b/doc/20201202_talk/talk.tex index c9aecba2..1acda842 100644 --- a/doc/20201202_talk/talk.tex +++ b/doc/20201202_talk/talk.tex @@ -168,18 +168,10 @@ \centering - \only<1>{ - \includegraphics[width=.55\columnwidth]{img/consistent_hashing_1.pdf} - } - \only<2>{ - \includegraphics[width=.55\columnwidth]{img/consistent_hashing_2.pdf} - } - \only<3>{ - \includegraphics[width=.55\columnwidth]{img/consistent_hashing_3.pdf} - } - \only<4>{ - \includegraphics[width=.55\columnwidth]{img/consistent_hashing_4.pdf} - } + \only<1>{\includegraphics[width=.55\columnwidth]{img/consistent_hashing_1.pdf}}% + \only<2>{\includegraphics[width=.55\columnwidth]{img/consistent_hashing_2.pdf}}% + \only<3>{\includegraphics[width=.55\columnwidth]{img/consistent_hashing_3.pdf}}% + \only<4>{\includegraphics[width=.55\columnwidth]{img/consistent_hashing_4.pdf}}% \end{frame} \begin{frame} @@ -189,12 +181,31 @@ \end{frame} \begin{frame} - \frametitle{Rust : retour d'expérience} + \frametitle{Modèles de cohérence} + Garage utilise un modèle de cohérence relativement faible : + \vspace{1em} - Garage est entièrement écrit en Rust ! + \begin{itemize} + \item Objets répliqués 3 fois, quorum de 2 pour les lectures et les écritures\\ + $\to$ cohérence \textbf{``read your writes''} + \vspace{1em} + \item<2-> Types de donnée CRDT + mécanisme d'anti-entropie\\ + $\to$ cohérence \textbf{à terme} (eventual consistency) + \vspace{1em} + \item<3-> Cela s'applique pour chaque fichier individuellement :\\ + pas de linéarisabilté ou de cohérence causale entre les opérations\\ + sur des fichiers différents + \vspace{1em} + \item<4-> \textbf{Avantage :} convient bien à un déploiement géodistribué (multi-datacenter) + \end{itemize} +\end{frame} + +\begin{frame} + \frametitle{Rust : retour d'expérience} \begin{columns} - \begin{column}{0.5\textwidth} + \begin{column}{0.55\textwidth} + Garage est entièrement écrit en Rust ! \vspace{2em} \textbf{Points forts :} @@ -209,17 +220,15 @@ \vspace{.5em} \item Un écosytème de librairies très complet: serialisation, async/await, http, ... - \vspace{.5em} \end{itemize} - \end{column} - \begin{column}{0.5\textwidth} + \begin{column}{0.45\textwidth} \begin{centering} - \includegraphics[width=0.55\columnwidth]{img/rustacean-flat-happy.png} + \hspace{2em}\includegraphics[width=0.55\columnwidth]{img/rustacean-flat-happy.png} \end{centering} - \vspace{1em} + \vspace{2em} \textbf{Points faibles :} \vspace{.5em} \begin{itemize} @@ -227,6 +236,7 @@ \vspace{.5em} \item Compliqué à apprendre \end{itemize} + \vspace{2em} \end{column} \end{columns} -- cgit v1.2.3 From 9f46fb699a68c2d8b721b0b1d0e3419a830a4052 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 5 Dec 2020 16:37:59 +0100 Subject: Content-range fix --- src/api/s3_get.rs | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/api/s3_get.rs b/src/api/s3_get.rs index a68c485b..a5e7b342 100644 --- a/src/api/s3_get.rs +++ b/src/api/s3_get.rs @@ -161,7 +161,7 @@ pub async fn handle_get( } }) .buffered(2); - //let body: Body = Box::new(StreamBody::new(Box::pin(body_stream))); + let body = hyper::body::Body::wrap_stream(body_stream); Ok(resp_builder.body(body)?) } @@ -183,7 +183,7 @@ pub async fn handle_get_range( let resp_builder = object_headers(version, version_meta) .header( "Content-Range", - format!("bytes {}-{}/{}", begin, end, version_meta.size), + format!("bytes {}-{}/{}", begin, end - 1, version_meta.size), ) .status(StatusCode::PARTIAL_CONTENT); @@ -206,35 +206,49 @@ pub async fn handle_get_range( None => return Err(Error::NotFound), }; - let blocks = version - .blocks() - .iter() - .cloned() - .filter(|block| block.offset + block.size > begin && block.offset < end) - .collect::>(); + // We will store here the list of blocks that have an intersection with the requested + // range, as well as their "true offset", which is their actual offset in the complete + // file (whereas block.offset designates the offset of the block WITHIN THE PART + // block.part_number, which is not the same in the case of a multipart upload) + let mut blocks = Vec::with_capacity(std::cmp::min( + version.blocks().len(), + 4 + ((end - begin) / std::cmp::max(version.blocks()[0].size as u64, 1024)) as usize, + )); + let mut true_offset = 0; + for b in version.blocks().iter() { + if true_offset >= end { + break; + } + // Keep only blocks that have an intersection with the requested range + if true_offset < end && true_offset + b.size > begin { + blocks.push((b.clone(), true_offset)); + } + true_offset += b.size; + } let body_stream = futures::stream::iter(blocks) - .map(move |block| { + .map(move |(block, true_offset)| { let garage = garage.clone(); async move { let data = garage.block_manager.rpc_get_block(&block.hash).await?; - let start_in_block = if block.offset > begin { + let data = Bytes::from(data); + let start_in_block = if true_offset > begin { 0 } else { - begin - block.offset + begin - true_offset }; - let end_in_block = if block.offset + block.size < end { + let end_in_block = if true_offset + block.size < end { block.size } else { - end - block.offset + end - true_offset }; Result::::Ok(Bytes::from( - data[start_in_block as usize..end_in_block as usize].to_vec(), + data.slice(start_in_block as usize..end_in_block as usize), )) } }) .buffered(2); - //let body: Body = Box::new(StreamBody::new(Box::pin(body_stream))); + let body = hyper::body::Body::wrap_stream(body_stream); Ok(resp_builder.body(body)?) } -- cgit v1.2.3 From bd7e3d1bd1c4df4f2848e0f8c49878dacb330b50 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 5 Dec 2020 18:57:22 +0100 Subject: Fix Content-Length --- src/api/s3_get.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/api/s3_get.rs b/src/api/s3_get.rs index a5e7b342..a52222a0 100644 --- a/src/api/s3_get.rs +++ b/src/api/s3_get.rs @@ -15,6 +15,7 @@ use crate::error::*; fn object_headers( version: &ObjectVersion, version_meta: &ObjectVersionMeta, + partial_size: Option ) -> http::response::Builder { let date = UNIX_EPOCH + Duration::from_millis(version.timestamp); let date_str = httpdate::fmt_http_date(date); @@ -24,7 +25,7 @@ fn object_headers( "Content-Type", version_meta.headers.content_type.to_string(), ) - .header("Content-Length", format!("{}", version_meta.size)) + .header("Content-Length", format!("{}", partial_size.unwrap_or(version_meta.size))) .header("ETag", version_meta.etag.to_string()) .header("Last-Modified", date_str) .header("Accept-Ranges", format!("bytes")); @@ -62,7 +63,7 @@ pub async fn handle_head( }; let body: Body = Body::from(vec![]); - let response = object_headers(&version, version_meta) + let response = object_headers(&version, version_meta, None) .status(StatusCode::OK) .body(body) .unwrap(); @@ -123,7 +124,7 @@ pub async fn handle_get( .await; } - let resp_builder = object_headers(&last_v, last_v_meta).status(StatusCode::OK); + let resp_builder = object_headers(&last_v, last_v_meta, None).status(StatusCode::OK); match &last_v_data { ObjectVersionData::DeleteMarker => unreachable!(), @@ -180,7 +181,7 @@ pub async fn handle_get_range( return Err(Error::BadRequest(format!("Range not included in file"))); } - let resp_builder = object_headers(version, version_meta) + let resp_builder = object_headers(version, version_meta, Some(end - begin)) .header( "Content-Range", format!("bytes {}-{}/{}", begin, end - 1, version_meta.size), -- cgit v1.2.3 From 76b489f3d374c5a793929ce70654538d07268a6e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 5 Dec 2020 19:20:07 +0100 Subject: Reformulate patch --- src/api/s3_get.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api/s3_get.rs b/src/api/s3_get.rs index a52222a0..43215923 100644 --- a/src/api/s3_get.rs +++ b/src/api/s3_get.rs @@ -15,7 +15,6 @@ use crate::error::*; fn object_headers( version: &ObjectVersion, version_meta: &ObjectVersionMeta, - partial_size: Option ) -> http::response::Builder { let date = UNIX_EPOCH + Duration::from_millis(version.timestamp); let date_str = httpdate::fmt_http_date(date); @@ -25,7 +24,6 @@ fn object_headers( "Content-Type", version_meta.headers.content_type.to_string(), ) - .header("Content-Length", format!("{}", partial_size.unwrap_or(version_meta.size))) .header("ETag", version_meta.etag.to_string()) .header("Last-Modified", date_str) .header("Accept-Ranges", format!("bytes")); @@ -63,7 +61,8 @@ pub async fn handle_head( }; let body: Body = Body::from(vec![]); - let response = object_headers(&version, version_meta, None) + let response = object_headers(&version, version_meta) + .header("Content-Length", format!("{}", version_meta.size)) .status(StatusCode::OK) .body(body) .unwrap(); @@ -124,7 +123,9 @@ pub async fn handle_get( .await; } - let resp_builder = object_headers(&last_v, last_v_meta, None).status(StatusCode::OK); + let resp_builder = object_headers(&last_v, last_v_meta) + .header("Content-Length", format!("{}", last_v_meta.size)) + .status(StatusCode::OK); match &last_v_data { ObjectVersionData::DeleteMarker => unreachable!(), @@ -181,7 +182,8 @@ pub async fn handle_get_range( return Err(Error::BadRequest(format!("Range not included in file"))); } - let resp_builder = object_headers(version, version_meta, Some(end - begin)) + let resp_builder = object_headers(version, version_meta) + .header("Content-Length", format!("{}", end - begin)) .header( "Content-Range", format!("bytes {}-{}/{}", begin, end - 1, version_meta.size), -- cgit v1.2.3