<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[AniBrain Dev Chronicles]]></title><description><![CDATA[Join us as we rebuild AniBrain, an anime &amp; manga recommendation engine. Embark on a thrilling journey to unlock the full potential of your anime and manga passion today!]]></description><link>https://blog.anibrain.ai</link><generator>RSS for Node</generator><lastBuildDate>Wed, 08 Apr 2026 13:11:47 GMT</lastBuildDate><atom:link href="https://blog.anibrain.ai/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Chapter #3: Streamlining AniBrain's Data Pipeline - Enhancing Reliability and Efficiency]]></title><description><![CDATA[TL;DR: As part of the broader initiative to transition AniBrain's data pipeline to the cloud, a new database relationship model has been created to pave the way for improved performance and reliability.

Background
Maintaining AniBrain's database has...]]></description><link>https://blog.anibrain.ai/chapter-3-streamlining-anibrains-data-pipeline-enhancing-reliability-and-efficiency</link><guid isPermaLink="true">https://blog.anibrain.ai/chapter-3-streamlining-anibrains-data-pipeline-enhancing-reliability-and-efficiency</guid><category><![CDATA[Pipeline]]></category><category><![CDATA[ETL]]></category><category><![CDATA[data]]></category><category><![CDATA[manga]]></category><category><![CDATA[Anime]]></category><dc:creator><![CDATA[AniBrain Dev]]></dc:creator><pubDate>Sat, 24 Jun 2023 22:46:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1687640950651/30e080e2-8162-4984-b7ea-5f35146b406f.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<p><em>TL;DR: As part of the broader initiative to transition AniBrain's data pipeline to the cloud, a new database relationship model has been created to pave the way for improved performance and reliability.</em></p>
<hr />
<h3 id="heading-background">Background</h3>
<p>Maintaining <a target="_blank" href="https://anibrain.ai/"><strong>AniBrain</strong></a>'s database has always been a challenging task. Currently, I use pipelines to extract and transform anime/manga data from AniList, Kitsu, and MyAnimeList (MAL). These sources provide metadata and necessary properties for the recommendation engine. Initially, I had set up an automated process, but changes in the MAL API caused the pipeline to break, resulting in the inclusion of incorrect data in the database. To address this, I switched to manually running the pipeline on a local dev database and thoroughly testing the data before importing it to the production environment. This approach ensures that everything functions as intended, and aside from the extra time requirements, has been a success. <strong>I am currently focused on reclaiming my time and maintaining confidence in the pipeline. This will enable me to dedicate more effort to building new features and ensuring consistent updates to the database.</strong></p>
<h3 id="heading-problem">Problem</h3>
<p>AniBrain's current data pipeline consists of fetching data from three sources, transforming that data, and using it in production. At a high level, it looks like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686983944380/13032dc7-5499-46dc-bbcc-21d5e2f9e0ff.png?auto=compress,format&amp;format=webp" alt="AniBrain's Current Data Pipeline" /></p>
<p>The current data pipeline encounters several issues that hinder its efficiency:</p>
<ol>
<li><p><strong>Unreliable MyAnimeList API</strong>: The API frequently encounters errors during data fetching (in my experience), despite employing caution with request limits. This inconsistency leads to frequent failures.</p>
</li>
<li><p><strong>Reliability concerns with Kitsu API</strong>: While Kitsu's API is relatively reliable, transient errors occasionally disrupt data fetching for newly released seasons. Consequently, the pipeline needs to be rerun to ensure data accuracy.</p>
</li>
<li><p><strong>Lack of storage for raw results</strong>: Currently, there is no storage mechanism for raw results. As a result, mistakes made during data pre-processing, ML modeling, or data post-processing necessitate re-querying each data source and restarting the process. Additionally, relevant data that may not be immediately applicable to the AniBrain site is dropped to optimize storage.</p>
</li>
</ol>
<h3 id="heading-solution">Solution</h3>
<p>To address these challenges and improve the data pipeline, I've decided on the following solutions:</p>
<ol>
<li><p><strong>Consolidating data sources</strong>: AniList has been chosen as the sole data source, enhancing API reliability. While this decision results in the loss of synopsis data from MyAnimeList and Kitsu, the impact on the current recommendation engine is negligible.</p>
</li>
<li><p><strong>Introducing three databases</strong>: To capture snapshots of anime/manga information at different pipeline stages, AniBrain will employ three databases: "raw," "staging," and "prod." The raw database stores AniList's raw responses, the staging database houses data that has undergone pre-processing, ML model inference, and post-processing, while the prod database stores data exclusively required for the AniBrain site. The new pipeline will look like this:</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1687643755424/afd652a5-911b-4ea9-9c20-361d4981b367.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h3 id="heading-actions-taken">Actions Taken</h3>
<p>To work towards these changes, the following actions have been taken:</p>
<ol>
<li><p>Creation of an extraction-transform-load (ETL) pipeline for the raw database.</p>
</li>
<li><p>Implementation of error monitoring via Sentry and pipeline monitoring via Cronitor for the raw database pipeline.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1687644202592/5f735ce6-ecc3-4234-85d5-2cc147fcc791.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Initiation of a one-off cloud job to populate the raw database with anime and manga data released between 1910 and 2023.</p>
</li>
<li><p>Documentation of the raw database pipeline.</p>
</li>
</ol>
<h3 id="heading-next-steps">Next Steps</h3>
<p>To work towards the solution described above, I've outlined the following next steps:</p>
<ol>
<li><p>Establish a cron job for the raw database pipeline.</p>
</li>
<li><p>Development of a staging database pipeline.</p>
</li>
</ol>
<h3 id="heading-conclusion">Conclusion</h3>
<p>By refining the data pipeline and enhancing reliability, AniBrain aims to streamline its operations, reduce errors, and improve efficiency. The consolidation of data sources and the introduction of dedicated databases at different pipeline stages will enable AniBrain to maintain an accurate and up-to-date database, empowering me to focus on building new features.</p>
]]></content:encoded></item><item><title><![CDATA[Chapter #2: Migrating ML Models From Running Locally To The Cloud]]></title><description><![CDATA[TL;DR: As part of the broader initiative to transition AniBrain's data pipeline to the cloud, I successfully relocated the machine learning model API from my local device to the cloud.

Background
Maintaining AniBrain's database has always been a cha...]]></description><link>https://blog.anibrain.ai/chapter-2-migrating-ml-models-from-running-locally-to-the-cloud</link><guid isPermaLink="true">https://blog.anibrain.ai/chapter-2-migrating-ml-models-from-running-locally-to-the-cloud</guid><category><![CDATA[Anime]]></category><category><![CDATA[manga]]></category><category><![CDATA[ETL]]></category><category><![CDATA[DigitalOcean]]></category><category><![CDATA[Startups]]></category><dc:creator><![CDATA[AniBrain Dev]]></dc:creator><pubDate>Sat, 17 Jun 2023 12:00:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1686979264884/4222f39d-5a14-4c25-9573-aa0bb0aedb80.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<p><em>TL;DR: As part of the broader initiative to transition AniBrain's data pipeline to the cloud, I successfully relocated the machine learning model API from my local device to the cloud.</em></p>
<hr />
<h3 id="heading-background">Background</h3>
<p>Maintaining <a target="_blank" href="https://anibrain.ai">AniBrain</a>'s database has always been a challenging task. Currently, I use pipelines to extract and transform anime/manga data from AniList, Kitsu, and MyAnimeList (MAL). These sources provide metadata and necessary properties for the recommendation engine. Initially, I had set up an automated process, but changes in the MAL API caused the pipeline to break, resulting in the inclusion of incorrect data in the database. To address this, I switched to manually running the pipeline on a local dev database and thoroughly testing the data before importing it to the production environment. This approach ensures that everything functions as intended, and aside from the extra time requirements, has been a success. <strong>I am currently focused on reclaiming my time and maintaining confidence in the pipeline. This will enable me to dedicate more effort to building new features and ensuring consistent updates to the database.</strong></p>
<h3 id="heading-problem">Problem</h3>
<p>I developed an API to host the ML models required for AniBrain's recommendation engine. Although starting the API housing these models is simple, it is often overlooked, leading to pipeline failures. Without the API, the pipeline cannot successfully write to the database.</p>
<p>Here's a high-level view of the current pipeline:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1686983944380/13032dc7-5499-46dc-bbcc-21d5e2f9e0ff.png" alt="AniBrain's Current Data Pipeline" class="image--center mx-auto" /></p>
<p>To address this issue, I plan to migrate the ML model inference to the cloud, ensuring that the API remains accessible at all times, 24/7. This will provide a reliable solution for AniBrain's operations.</p>
<h3 id="heading-actions-taken">Actions Taken</h3>
<p>Here's how I resolved the issue:</p>
<ol>
<li><p>I created a Digital Ocean Droplet to host the ML models and serve them via an API. I followed the instructions provided in this guide: <a target="_blank" href="https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-20-04">https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-20-04</a></p>
</li>
<li><p>I utilized <a target="_blank" href="https://www.cloudflare.com/">Cloudflare</a> for enhanced protection.</p>
</li>
<li><p>I secured the routes behind an API key. This step became necessary as the API was now accessible over the internet, unlike before when it was only running locally.</p>
</li>
<li><p>I made necessary adjustments to the Droplet settings to ensure sufficient memory for the models.</p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[Chapter #1: Building In The Open]]></title><description><![CDATA[Welcome to our blog, where we dive into the fascinating world of "building in the open." In an era of collaboration and transparency, this approach to software development has gained momentum, transforming how projects are conceived, built, and share...]]></description><link>https://blog.anibrain.ai/chapter-1-building-in-the-open</link><guid isPermaLink="true">https://blog.anibrain.ai/chapter-1-building-in-the-open</guid><category><![CDATA[Startups]]></category><category><![CDATA[Anime]]></category><category><![CDATA[manga]]></category><dc:creator><![CDATA[AniBrain Dev]]></dc:creator><pubDate>Fri, 16 Jun 2023 22:15:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1686952609482/431c7cba-f64a-4f1e-8c60-2b28e06aa2eb.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome to our blog, where we dive into the fascinating world of "building in the open." In an era of collaboration and transparency, this approach to software development has gained momentum, transforming how projects are conceived, built, and shared with the world. Join us as we transform <a target="_blank" href="https://anibrain.ai">AniBrain</a>, the ultimate anime and manga recommendation engine site, into your go-to destination for discovering your next watch or read. Dive into our challenges, learnings, and solutions as we address existing issues and rebuild the site from scratch, introducing a host of new functionalities. Stay tuned for regular status updates as we usher in an exciting era for AniBrain. Witness firsthand the evolution and growth of our platform!</p>
]]></content:encoded></item></channel></rss>