<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>stream on Poeticoding</title><link>https://www.poeticoding.com/tag/stream/</link><description>Recent content in stream on Poeticoding</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 18 Dec 2019 21:40:59 +0000</lastBuildDate><atom:link href="https://www.poeticoding.com/tag/stream/index.xml" rel="self" type="application/rss+xml"/><item><title>ExAws with DigitalOcean Spaces</title><link>https://www.poeticoding.com/exaws-with-digitalocean-spaces/</link><pubDate>Wed, 04 Dec 2019 14:39:32 +0000</pubDate><guid>https://www.poeticoding.com/exaws-with-digitalocean-spaces/</guid><description>&lt;p>When you are hosting an Elixir/Phoenix app in DigitalOcean you may want to use &lt;a href="https://www.digitalocean.com/products/spaces/" target="_blank" rel="noopener">Spaces&lt;/a>, the DigitalOcean&amp;rsquo;s cloud storage alternative to AWS S3.&lt;/p>
&lt;p>When you are hosting an Elixir/Phoenix app in DigitalOcean you may want to use &lt;a href="https://www.digitalocean.com/products/spaces/" target="_blank" rel="noopener">Spaces&lt;/a>, the DigitalOcean&amp;rsquo;s cloud storage alternative to AWS S3 &lt;em>(If you want to use AWS S3 instead, you can read &lt;a href="https://www.poeticoding.com/aws-s3-in-elixir-with-exaws/">AWS S3 in Elixir with ExAws&lt;/a>&lt;/em>).&lt;/p></description></item><item><title>Elixir Stream and large HTTP responses: processing text</title><link>https://www.poeticoding.com/elixir-stream-and-large-http-responses-processing-text/</link><pubDate>Wed, 03 Apr 2019 16:02:19 +0000</pubDate><guid>https://www.poeticoding.com/elixir-stream-and-large-http-responses-processing-text/</guid><description>&lt;ul>
&lt;li>Part 1 - &lt;a href="https://www.poeticoding.com/elixir-streams-to-process-large-http-responses-on-the-fly/">Elixir Stream to process large HTTP responses on the fly&lt;/a>&lt;/li>
&lt;li>Part 2 - &lt;em>this article&lt;/em>&lt;/li>
&lt;/ul>
&lt;p>You find the code, of this and the previous article, on &lt;a href="https://github.com/poeticoding/httpstream_articles" target="_blank" rel="noopener">poeticoding/httpstream_articles&lt;/a> GitHub repo. The code at this repo is not meant for production use, is just part of the examples of these articles.&lt;/p></description></item><item><title>Elixir Streams to process large HTTP responses on the fly</title><link>https://www.poeticoding.com/elixir-streams-to-process-large-http-responses-on-the-fly/</link><pubDate>Wed, 27 Mar 2019 16:48:21 +0000</pubDate><guid>https://www.poeticoding.com/elixir-streams-to-process-large-http-responses-on-the-fly/</guid><description>&lt;ul>
&lt;li>Part 1 - &lt;em>this article&lt;/em>&lt;/li>
&lt;li>Part 2 - &lt;a href="https://www.poeticoding.com/elixir-stream-and-large-http-responses-processing-text/">Elixir Stream and large HTTP responses: processing text&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>This is the first of a two-part article where we see a handy way of handling async HTTP responses.\&lt;/p>
&lt;ul>
&lt;li>In &lt;strong>this&lt;/strong> &lt;strong>first part&lt;/strong> we see how make an Elixir Stream out of a large HTTP response.&lt;/li>
&lt;li>In the &lt;strong>second part&lt;/strong> we will extend the implementation so we can download a large text file, processing lines on the fly.&lt;/li>
&lt;/ul>
&lt;h2 id="first-and-foremost--why">First and foremost &amp;hellip; WHY?&lt;/h2>
&lt;p>Why should we handle HTTP responses with Streams, when we can just simply use something like &lt;code>HTTPoison.get&lt;/code> to receive a response with the data we need?&lt;/p></description></item><item><title>Processing Large CSV files with Elixir Streams</title><link>https://www.poeticoding.com/processing-large-csv-files-with-elixir-streams/</link><pubDate>Thu, 10 Jan 2019 14:21:24 +0000</pubDate><guid>https://www.poeticoding.com/processing-large-csv-files-with-elixir-streams/</guid><description>&lt;p>We need to process a large CSV file of minute by minute volume and prices. Our task is pretty simple: we just want to get the first line of the year 2015, with valid data. At first, this seems an easy task we could tackle with &lt;code>String.split&lt;/code>, &lt;code>Enum.map&lt;/code>/&lt;code>filter&lt;/code>/&lt;code>find&lt;/code>. But what happens when the CSV file is &lt;strong>large&lt;/strong>?&lt;/p></description></item></channel></rss>