<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="355884" data-post-id="355884">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cmo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cmo/120/19618_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cmo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="pelopo" data-post="11" data-topic="69223">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/35a633/48.png" class="avatar"> pelopo:</div>
<blockquote>
<p>If you go with the pure D3, be ready for it to be slower than the rest because it can only use SVG.</p>
</blockquote>
</aside>
<p>D3 can render to canvas and/or svg.</p>
<p>What is your reasoning for putting a GenServer in front of the db for the chart data? Is the data expensive to calculate and/or rarely updated?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355884" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-355884" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355884"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="355886" data-post-id="355886">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pelopo" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pelopo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Oh, that’s great. I was not aware of it. Thanks</p>
<p>Re GenServer, I don’t know why. My AI tool suggested it and said it’s best practice. Probably it’s because I fed it the data from PhoenixAnalytics library.</p>
<p>I’m very new to Phoenix and Elixir and don’t even know what GenServers are for, but when I questioned AI About it, it said it could be used as a common state management system as well as cashing solution. Also, it could be a central point where connections to the DB unmaintained.</p>
<p><a href="https://github.com/lalabuy948/PhoenixAnalytics/blob/master/lib/phoenix_analytics/repo.ex" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/lalabuy948/PhoenixAnalytics/blob/master/lib/phoenix_analytics/repo.ex</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355886" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-355886" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355886"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="355889" data-post-id="355889">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dhony" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dhony/120/29999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dhony
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was thinking about the same thing and then I’ve created this repo to consolidate my learnings.</p>
<p>There’s nothing yet. I’m only gathering the information and organizing the ideas on the readme file. The purpuse is trying different graphics libs.</p>
<p><a href="https://github.com/dhonysilva/maaite" class="onebox" target="_blank" rel="noopener nofollow ugc">https://github.com/dhonysilva/maaite</a></p>
<p>Moreover, since the Oban Web OOS release, I’m thinking about open it and understand what graphic lib they utilize to present the analytics, but I couldn’t manage it install it yet.</p>
<aside class="onebox allowlistedgeneric" data-onebox-src="https://oban.pro/articles/oss-web-and-new-oban">
  <header class="source">
      <img src="https://oban.pro/favicon.svg" class="site-icon" alt="" width="512" height="512">

      <a href="https://oban.pro/articles/oss-web-and-new-oban" target="_blank" rel="noopener nofollow ugc">Oban Pro</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/361;"><img src="https://oban.pro/images/oss-web-and-new-oban/social.jpg" class="thumbnail" alt="" width="690" height="361"></div>

<h3><a href="https://oban.pro/articles/oss-web-and-new-oban" target="_blank" rel="noopener nofollow ugc">OSS Oban Web and Oban v2.19</a></h3>

  <p>From open sourcing Oban Web, to releasing Oban with MySQL support, Web v2.11, and plan simplifications</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355889" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-355889" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355889"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="355920" data-post-id="355920">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Libraries like Ecto will manage the DB connection pool for you, so you don’t need to worry about that. If you’re new I wouldn’t bother with GenServers for now, you probably won’t need them for this project.</p>
<p>If you want to implement caching, Cachex is a great library. But avoid caching until you’re sure you really need it.</p>
<p>For a DB, stick with SQLite or Postgres until you run into performance problems. DuckDB and Clickhouse are <em>much</em> faster for analytical queries, but also more annoying to use, and if you don’t have much data it won’t matter.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355920" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-355920" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355920"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="355923" data-post-id="355923">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pelopo" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pelopo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks <a class="mention" href="/u/garrison" rel="nofollow">@garrison</a>. This is exactly my plan to go forward. I’ve done some hight level tests and since I’m mostly using SELECT and WHERE, the Duckdb, does not seem to be much faster at all. I do have a lot of data, but for purposes of displaying data, it’s seem like SQLite is enough for now.</p>
<p>Also I found that Duckdb does not seem to have any tool like ‘sqlite3_rsync’ or ‘streamline’ to update the production DB instance in a running state does not exist for Duckdb.</p>
<p>For now, I’m sticking with SQLite</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355923" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-355923" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355923"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="355924" data-post-id="355924">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="pelopo" data-post="16" data-topic="69223">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/p/35a633/48.png" class="avatar"> pelopo:</div>
<blockquote>
<p>I’m mostly using SELECT and WHERE, the Duckdb, does not seem to be much faster at all.</p>
</blockquote>
</aside>
<p>I don’t know exactly what your data looks like, but I guarantee if you try again with some analytical queries (like <code>sum</code> or <code>count</code> with a simple predicate) and a billion rows you will find DuckDB is a couple thousand times faster.</p>
<p>Like I said, if you don’t have much data (you probably don’t!) it’s not worth it.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355924" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-355924" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355924"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="355926" data-post-id="355926">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pelopo" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pelopo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I meant Duckdb is not much faster if I only need to display data for a chart, not to run any analytical SQL transform with it. I do it in Duckdb withing a python data pipeline and Duckdb flies … I wish Ecto added it…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355926" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-355926" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355926"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="355930" data-post-id="355930">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="garrison" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  garrison
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>For analytics data you usually do what are called “analytical queries”, stuff like</p>
<pre data-code-wrap="sql"><code class="lang-sql">select count(*) from pageviews where page='/home' group by day;
</code></pre>
<p>Then you would dump those rows into a chart.</p>
<p>Column stores like DuckDB or Clickhouse can perform this particular type of query much faster than row stores like SQLite or Postgres, but at the cost of a lot of other functionality.</p>
<p>If you have even millions of rows you are unlikely to notice much difference. If you have billions it will matter.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="355930" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-355930" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="355930"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="388650" data-post-id="388650">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cpursley" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cpursley/120/25075_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cpursley
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>We’ve put together a little package that brings together several ideas into a pluggable Elixir package: <a href="https://github.com/agoodway/goodanalytics" class="inline-onebox" rel="noopener nofollow ugc">GitHub - agoodway/goodanalytics: Visitor intelligence, link tracking, source attribution, and behavioral analytics for Phoenix · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="388650" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/choosing-the-best-tech-stack-for-an-analytics-dashboard-liveview-d3-or-react/69223/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-388650" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="388650"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>