Skip to content

Commit

Permalink
deploy: aebaa89
Browse files Browse the repository at this point in the history
  • Loading branch information
akclace committed Oct 27, 2024
1 parent bbd67ea commit 3a0ef75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions blog/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ an appserver for containerized web apps implemented in any language.
</div>
</div>
<h2>Background<span class="hx-absolute -hx-mt-20" id="background"></span>
<a href="#background" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Clace is built to serve web applications, primarily for internal tools. Clace provides functionality usually handled separately by a web server and an application server. When the development of Clace was started last year, one of the first decisions was how to store the application data (files) and metadata. The app metadata obviously made sense to store in a database, since apps are created dynamically. The app data (static files, app code, config files etc) is usually stored on the file system. That is how most web servers do it.</p>
<a href="#background" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>Clace is built to serve web applications, primarily for internal tools. Clace provides functionality usually handled separately by a web server and an application server. When the development of Clace was started last year, one of the first decisions was how to store the application data (files) and metadata. The app metadata obviously made sense to store in a database, since apps are created dynamically. The app data (static files, app code, config files etc) is usually stored on the file system by most web servers.</p>
<h2>Using SQLite for serving files<span class="hx-absolute -hx-mt-20" id="using-sqlite-for-serving-files"></span>
<a href="#using-sqlite-for-serving-files" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>For Clace, the decision was made to use <a href="https://www.sqlite.org/" target="_blank" rel="noopener">SQLite</a> for app files storage instead of using the file system. The reasoning was mainly to be able to do atomic version changes. When updating an app, since there could be lots of files being updated, using a database would allow all changes to be done atomically in a transaction. This would prevent broken web pages from being served during a version change.</p>
<p>Clace uploads all files to the SQlite database during app creation and updates. File are uploaded from GitHub or file local disk. Only for <a href="https://clace.io/docs/applications/lifecycle/#development-apps" >development mode</a>, the local file system is used.</p>
<p>Clace uploads all files to the SQlite database during app creation and updates. Files are uploaded from GitHub or from local disk. Only for <a href="https://clace.io/docs/applications/lifecycle/#development-apps" >development mode</a>, the local file system is used.</p>
<h2>Benefits of using SQLite<span class="hx-absolute -hx-mt-20" id="benefits-of-using-sqlite"></span>
<a href="#benefits-of-using-sqlite" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The decision to use SQLite for file storage has provided lots of additional benefits (some of then unexpected).</p>
<a href="#benefits-of-using-sqlite" class="subheading-anchor" aria-label="Permalink for this section"></a></h2><p>The decision to use SQLite for file storage has provided lots of additional benefits (some unanticipated).</p>
<ul>
<li>
<p><strong>Transactional Updates</strong> : This is the main benefit. Updating multiple files can be done in one transaction. Isolation ensures that there are no broken webapps during the update.</p>
Expand Down
Loading

0 comments on commit 3a0ef75

Please sign in to comment.