<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kwame Osei</title>
    <description>The latest articles on DEV Community by Kwame Osei (@kwame_osei).</description>
    <link>https://dev.to/kwame_osei</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4215067%2Fa1b96c93-277c-4d01-8e8e-b40940bf4578.jpg</url>
      <title>DEV Community: Kwame Osei</title>
      <link>https://dev.to/kwame_osei</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kwame_osei"/>
    <language>en</language>
    <item>
      <title>Offline-first mobile: SQLite and a sync queue</title>
      <dc:creator>Kwame Osei</dc:creator>
      <pubDate>Sun, 01 Nov 2026 15:12:53 +0000</pubDate>
      <link>https://dev.to/kwame_osei/offline-first-mobile-sqlite-and-a-sync-queue-481k</link>
      <guid>https://dev.to/kwame_osei/offline-first-mobile-sqlite-and-a-sync-queue-481k</guid>
      <description>&lt;p&gt;Mobile apps in places with unreliable networks taught me more about sync than any tutorial.&lt;/p&gt;

&lt;p&gt;The pattern that works for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SQLite is the source of truth for the UI.&lt;/strong&gt; Reads never wait on the network.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writes go to the local table&lt;/strong&gt; and append an operation to a sync queue.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A worker drains the queue&lt;/strong&gt; when connectivity returns, with idempotency keys so retries are safe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conflicts resolve with a version column&lt;/strong&gt;, and the UI shows the winner with an undo.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The parts people skip:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The queue needs a max size and a policy for what to drop. Disk is not infinite.&lt;/li&gt;
&lt;li&gt;The server needs to accept out-of-order operations. They will arrive out of order.&lt;/li&gt;
&lt;li&gt;You need a way to test the offline path, or nobody will.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is an app that feels fast even when the network is bad, which is most of the time.&lt;/p&gt;

&lt;p&gt;How do you handle conflicts on the server side?&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>sqlite</category>
      <category>sync</category>
    </item>
    <item>
      <title>Offline-first is a data model decision</title>
      <dc:creator>Kwame Osei</dc:creator>
      <pubDate>Thu, 29 Oct 2026 10:54:49 +0000</pubDate>
      <link>https://dev.to/kwame_osei/offline-first-is-a-data-model-decision-5gea</link>
      <guid>https://dev.to/kwame_osei/offline-first-is-a-data-model-decision-5gea</guid>
      <description>&lt;p&gt;We spent a month treating offline support as a caching problem, and it did not work.&lt;/p&gt;

&lt;p&gt;The pattern we had: fetch from the API, write to a local cache, fall back to the cache when the network fails. It broke in every way you'd expect. Edits made offline disappeared. Two devices disagreed. A failed sync left the database half-written.&lt;/p&gt;

&lt;p&gt;The fix was to stop thinking about cache and start thinking about the model. There is one local database, and it is the source of truth for the UI. The network is a sync mechanism that moves changes between that database and the server, with a queue of pending mutations.&lt;/p&gt;

&lt;p&gt;Once that was the model:&lt;/p&gt;

&lt;p&gt;Offline edits live in the same table as everything else, marked pending, so the UI never shows stale or vanished data.&lt;/p&gt;

&lt;p&gt;Sync is idempotent per mutation, so retrying after a crash is safe.&lt;/p&gt;

&lt;p&gt;Conflicts are decided in one function instead of three screens.&lt;/p&gt;

&lt;p&gt;The caching version was a week of work that failed for a month. The data model version was three weeks that then worked. Offline is not a feature you add at the end; it is a decision about where the truth lives.&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>android</category>
      <category>ios</category>
    </item>
  </channel>
</rss>
