mirror of
https://github.com/lux-apps/papers.git
synced 2026-10-30 18:15:21 +00:00
Restructured from flat .tex/.pdf files into per-paper subdirectories. Added Antje Worring as co-author on all papers. Synced PDFs to pdfs/ for download site.
91 lines
4.1 KiB
TeX
91 lines
4.1 KiB
TeX
\section{Case Studies}
|
|
\label{sec:cases}
|
|
|
|
We present four case studies demonstrating the Firebase Exit for common
|
|
application categories.
|
|
|
|
\subsection{Case Study 1: Notes Application}
|
|
|
|
\textbf{Firebase architecture:} Firestore for note storage, Firebase Auth
|
|
for user accounts, Cloud Functions for Markdown rendering and search
|
|
indexing, Firebase Hosting for the web app.
|
|
|
|
\textbf{Capsule architecture:} Encrypted SQLite for note storage with
|
|
FTS5 full-text search, DID for identity, local Markdown rendering (no
|
|
server needed), provider market for web hosting.
|
|
|
|
\textbf{Migration effort:} Approximately 2 weeks for a single developer.
|
|
The primary work is replacing Firestore queries with SQLite queries and
|
|
adding the CRDT sync layer. The payoff: notes load instantly (no spinner),
|
|
search works offline, and notes are end-to-end encrypted by default.
|
|
|
|
\textbf{Key metric:} Note open time drops from 200~ms (Firestore fetch)
|
|
to $<1$~ms (local read). Search latency drops from 300~ms to 5~ms.
|
|
|
|
\subsection{Case Study 2: CRM Application}
|
|
|
|
\textbf{Firebase architecture:} Firestore for contacts, deals, and
|
|
activities. Cloud Functions for email integration, reporting, and
|
|
scheduled follow-up reminders. Firebase Auth with team-based access control.
|
|
|
|
\textbf{Capsule architecture:} Encrypted SQLite with full relational
|
|
schema (contacts, deals, activities as proper tables with foreign keys---something
|
|
Firestore cannot express). Base Functions for email integration (via
|
|
compute provider in TEE mode). Threshold access control for team
|
|
workspaces (Section~\ref{sec:mapping}).
|
|
|
|
\textbf{Migration effort:} Approximately 4--6 weeks. The relational
|
|
data model is actually simpler in SQLite than in Firestore's document
|
|
model, where developers routinely denormalize data and maintain manual
|
|
indexes. The CRDT layer handles multi-user collaboration.
|
|
|
|
\textbf{Key metric:} Complex reports (e.g., ``deals closed this quarter
|
|
by sales rep, grouped by region'') that required Cloud Functions with
|
|
Firestore aggregation (2--5 seconds) now execute as local SQL queries
|
|
($<10$~ms).
|
|
|
|
\subsection{Case Study 3: Team Chat Application}
|
|
|
|
\textbf{Firebase architecture:} Firestore for messages, Firebase Auth
|
|
for users, Cloud Functions for push notifications and message
|
|
processing, Firestore real-time listeners for live updates.
|
|
|
|
\textbf{Capsule architecture:} Encrypted SQLite for message history,
|
|
CRDT sync for real-time message delivery, relay providers for push
|
|
notifications, threshold-encrypted channels for group conversations.
|
|
|
|
\textbf{Migration effort:} Approximately 4 weeks. The CRDT sync layer
|
|
provides the real-time update experience that Firebase listeners provided.
|
|
The key improvement: all messages are end-to-end encrypted. Firebase
|
|
Firestore stores messages in plaintext (Google can read every message).
|
|
The capsule model encrypts messages under channel keys that no provider
|
|
can access.
|
|
|
|
\textbf{Key metric:} Message delivery latency is comparable (50--100~ms
|
|
via relay providers vs.\ 50--150~ms via Firestore listeners). Message
|
|
history search is $50\times$ faster (local FTS5 vs.\ Firestore query).
|
|
|
|
\subsection{Case Study 4: Project Management Application}
|
|
|
|
\textbf{Firebase architecture:} Firestore for projects, tasks, comments.
|
|
Cloud Functions for Gantt chart computation, notification dispatch,
|
|
and integration with external tools. Firebase Auth with role-based
|
|
access control.
|
|
|
|
\textbf{Capsule architecture:} Encrypted SQLite for project data with
|
|
proper relational model (projects $\to$ tasks $\to$ subtasks $\to$ comments,
|
|
all as foreign-keyed tables). CRDT sync for collaborative editing.
|
|
Threshold access control for project-level permissions. Base Functions
|
|
for integrations.
|
|
|
|
\textbf{Migration effort:} Approximately 6--8 weeks (largest of the four
|
|
case studies, due to the complexity of role-based access control and
|
|
external integrations). The CRDT model is a natural fit for project
|
|
management: task updates from multiple team members merge automatically
|
|
without conflicts.
|
|
|
|
\textbf{Key metric:} Project dashboard load time drops from 1--3 seconds
|
|
(multiple Firestore queries for projects, tasks, and team members) to
|
|
$<50$~ms (single local SQL query with joins).
|
|
|