No subject


Tue Apr 20 02:07:53 PDT 2021


ipulate a <code>multipart/form-data</code> content for
<code>HTTP/1.{0,1}</code> responses (plus <a href=3D"https://tools.ietf.org=
/html/rfc2183">RFC 2183</a>). This resulted in the creation of
<code>multipart_form</code>.
</p>

<p>
This project is a cross between what many users have been waiting for (for
<a href=3D"https://github.com/mirage/ocaml-cohttp">CoHTTP</a> and <a href=
=3D"https://github.com/inhabitedtype/httpaf">http/af</a>), a knowledge
of what exists and its limitations, and finally a development in the spirit=
 of MirageOS.
</p>

<p>
The result is an API that is <span class=3D"underline">"full stream"</span>=
. Indeed. a question arose from the beginning, how to manipulate this
format while:
</p>
<ul class=3D"org-ul">
<li>not having access to a file system (MirageOS)</li>
<li>not exploding memory usage for file uploads</li>
</ul>
</div>
</div>

<div id=3D"outline-container-orgdf676a7" class=3D"outline-4">
<h4 id=3D"orgdf676a7">Memory bound implementation</h4>
<div class=3D"outline-text-4" id=3D"text-orgdf676a7">
<p>
With the help of @Armael  and the <a href=3D"https://blog.janestreet.com/fi=
nding-memory-leaks-with-memtrace/"><code>memtrace</code></a> tool,
we were able to implement and extend <code>multipart_form</code> so that it=
 is easier to use and really ensures our original
assumption about memory consumption.
</p>

<p>
So we experimented with use cases like uploading very large files. Here is =
the result that <code>memtrace</code> gives us with a
100Mb file:
</p>


<div id=3D"orga79fecd" class=3D"figure">
<p><img src=3D"https://aws1.discourse-cdn.com/standard11/uploads/ocaml/opti=
mized/2X/9/92ee2ab6fa1d4da62d894749aa4b161a95b53fb2_2_1034x590.png" alt=3D"=
92ee2ab6fa1d4da62d894749aa4b161a95b53fb2_2_1034x590.png" />
</p>
</div>

<p>
The application tries to save the games in files. We use <a href=3D"https:/=
/github.com/rgrinberg/opium">opium</a> (and thus
http/af) but tests were also done with CoHTTP. The code is available
<a href=3D"https://gist.github.com/dinosaure/299c421c95cec4255df7b9289eb538=
15">here</a> for people who want to reproduce.
</p>
</div>
</div>

<div id=3D"outline-container-org2fc902b" class=3D"outline-4">
<h4 id=3D"org2fc902b">Documentation &amp; encoding</h4>
<div class=3D"outline-text-4" id=3D"text-org2fc902b">
<p>
Finally, a major effort has been made in the documentation to explain in de=
tail how to use <code>multipart_form</code>. Version
<code>0.2.0</code> also adds a way to produce a <code>multipart/form-data</=
code> document (experimental) with the same constraints on
memory usage.
</p>

<p>
I hope this work will be useful to a lot of people. The documentation is av=
ailable
<a href=3D"https://dinosaure.github.io/multipart_form/multipart_form/index.=
html">here</a>.
</p>
</div>
</div>
</div>
</div>




<div id=3D"outline-container-5" class=3D"outline-2">
<h2 id=3D"5">Engineer position for the development of the Squirrel prover</=
h2>
<div class=3D"outline-text-2" id=3D"text-5">
<p>
Archive: <a href=3D"https://sympa.inria.fr/sympa/arc/caml-list/2021-04/msg0=
0022.html">https://sympa.inria.fr/sympa/arc/caml-list/2021-04/msg00022.html=
</a>
</p>
</div>

<div id=3D"outline-container-org44830d1" class=3D"outline-3">
<h3 id=3D"org44830d1">David Baelde announced</h3>
<div class=3D"outline-text-3" id=3D"text-org44830d1">
<p>
We are looking for an engineer to support the development of Squirrel, an
interactive theorem prover for security protocols. The position will be
funded by ERC POPSTAR. You may find more details here:
</p>

<p>
<a href=3D"https://people.irisa.fr/Stephanie.Delaune/internship/sujet-engin=
eer-squirrel.pdf">https://people.irisa.fr/Stephanie.Delaune/internship/suje=
t-engineer-squirrel.pdf</a>
</p>

<p>
Skilled OCaml developers would be most welcome!
</p>
</div>
</div>
</div>




<div id=3D"outline-container-6" class=3D"outline-2">
<h2 id=3D"6">Martin Jambon presentation on Semgrep, Wed April 21 @ 7pm Cent=
ral</h2>
<div class=3D"outline-text-2" id=3D"text-6">
<p>
Archive: <a href=3D"https://discuss.ocaml.org/t/martin-jambon-presentation-=
on-semgrep-wed-april-21-7pm-central/7709/1">https://discuss.ocaml.org/t/mar=
tin-jambon-presentation-on-semgrep-wed-april-21-7pm-central/7709/1</a>
</p>
</div>

<div id=3D"outline-container-orgb774b42" class=3D"outline-3">
<h3 id=3D"orgb774b42">Claude Jager-Rubinson announced</h3>
<div class=3D"outline-text-3" id=3D"text-orgb774b42">
<p>
Please join us this coming Wednesday at 7pm Central when @mjambon  will tal=
k about Semgrep, an open-source ployglot
static analysis tool written in OCaml.
</p>

<p>
Details and connection info are available at <a href=3D"https://hfpug.org">=
Houston Functional Programmers</a>.
</p>
</div>
</div>
</div>




<div id=3D"outline-container-orgf00896d" class=3D"outline-2">
<h2 id=3D"orgf00896d">Old CWN</h2>
<div class=3D"outline-text-2" id=3D"text-orgf00896d">
<p>
If you happen to miss a CWN, you can <a href=3D"mailto:alan.schmitt at polytec=
hnique.org">send me a message</a> and I'll mail it to you, or go take a loo=
k at <a href=3D"https://alan.petitepomme.net/cwn/">the archive</a> or the <=
a href=3D"https://alan.petitepomme.net/cwn/cwn.rss">RSS feed of the archive=
s</a>.
</p>

<p>
If you also wish to receive it every week by mail, you may subscribe <a hre=
f=3D"http://lists.idyll.org/listinfo/caml-news-weekly/">online</a>.
</p>

<div class=3D"authorname" id=3D"org6332934">
<p>
<a href=3D"https://alan.petitepomme.net/">Alan Schmitt</a>
</p>

</div>
</div>
</div>
</div>
</body>
</html>


--=-=-=--



More information about the caml-news-weekly mailing list