<?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: Kyle007</title>
    <description>The latest articles on DEV Community by Kyle007 (@nenoke).</description>
    <link>https://dev.to/nenoke</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%2F4025877%2F0c1e1aa8-12ce-480f-a3e9-7f161d9eadd0.jpg</url>
      <title>DEV Community: Kyle007</title>
      <link>https://dev.to/nenoke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nenoke"/>
    <language>en</language>
    <item>
      <title>Count usage when a job is accepted—not when the button is clicked</title>
      <dc:creator>Kyle007</dc:creator>
      <pubDate>Thu, 16 Jul 2026 10:26:22 +0000</pubDate>
      <link>https://dev.to/nenoke/count-usage-when-a-job-is-accepted-not-when-the-button-is-clicked-5e41</link>
      <guid>https://dev.to/nenoke/count-usage-when-a-job-is-accepted-not-when-the-button-is-clicked-5e41</guid>
      <description>&lt;p&gt;I'm building a browser-based AI photo editor with a no-signup editing flow.&lt;/p&gt;

&lt;p&gt;One of the first design choices was deciding what should count as usage.&lt;/p&gt;

&lt;p&gt;The tempting implementation is simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;User clicks “Edit” -&amp;gt; decrement quota&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But a click is only intent. It is not yet an accepted unit of work.&lt;/p&gt;

&lt;p&gt;A request can fail validation, fail before the upload is usable, or be rejected by the service before a job exists. Counting any of those as AI usage turns product or reliability friction into a user penalty.&lt;/p&gt;

&lt;p&gt;For anonymous capacity controls, I use a different unit:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One successfully accepted job consumes one unit of anonymous quota.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The server validates and authorizes the request, then creates the job and records the accepted attempt in the same transaction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BEGIN
  validate and authorize the request
  create the job
  record one accepted quota attempt
COMMIT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If that transaction does not commit, there is no job and nothing is counted.&lt;/p&gt;

&lt;p&gt;This also makes the system easier to reason about. Admission accounting happens once, at a clear server-side boundary. Later lifecycle events are recorded separately:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was the job accepted?&lt;/li&gt;
&lt;li&gt;Did it complete successfully?&lt;/li&gt;
&lt;li&gt;Was the result downloaded?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are useful signals for reliability and product quality, but they should not be confused with a browser click.&lt;/p&gt;

&lt;p&gt;The browser can still provide immediate feedback and discourage accidental repeat submissions. It is a UX layer, not the enforcement boundary. The service remains the source of truth for request admission and quota accounting.&lt;/p&gt;

&lt;p&gt;There is an important distinction here: an anonymous capacity quota is not the same thing as a paid credit system. If a product later sells credits, failed-result reversal or refund behavior needs its own explicit settlement policy. Reusing an anti-abuse quota rule for billing would be a mistake.&lt;/p&gt;

&lt;p&gt;I'm applying this pattern in Turner AI, a free AI photo editor - no signup, no watermark：&lt;a href="https://turner.art" rel="noopener noreferrer"&gt;https://turner.art&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For anonymous capacity controls, would you count an accepted job, an inference start, or only a successful output?&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>webdev</category>
      <category>backend</category>
    </item>
    <item>
      <title>Building an anonymous AI photo editor without letting one visitor take the GPU</title>
      <dc:creator>Kyle007</dc:creator>
      <pubDate>Wed, 15 Jul 2026 10:24:44 +0000</pubDate>
      <link>https://dev.to/nenoke/building-an-anonymous-ai-photo-editor-without-letting-one-visitor-take-the-gpu-dpo</link>
      <guid>https://dev.to/nenoke/building-an-anonymous-ai-photo-editor-without-letting-one-visitor-take-the-gpu-dpo</guid>
      <description>&lt;p&gt;I’m building Turner AI, a browser-based AI photo editor: &lt;a href="https://turner.art" rel="noopener noreferrer"&gt;https://turner.art&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The visible workflow is simple: upload a photo, write what should change, and download the result.&lt;/p&gt;

&lt;p&gt;The harder engineering problem is fairness.&lt;/p&gt;

&lt;p&gt;I wanted the first edit to work without an account. But image editing is not a zero-cost request, and anonymous traffic means a small number of visitors can consume a disproportionate amount of GPU time.&lt;/p&gt;

&lt;p&gt;The design we are moving toward separates convenience from authority:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;browser state can discourage accidental overuse;&lt;/li&gt;
&lt;li&gt;the server remains the source of truth for admission;&lt;/li&gt;
&lt;li&gt;usage is counted only after a job is actually created;&lt;/li&gt;
&lt;li&gt;queues and fair-use controls protect everyone else when capacity is tight.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last point matters. A failed upload, a failed human check, or a rejected request should not silently spend someone’s allowance.&lt;/p&gt;

&lt;p&gt;The product is free to try, requires no account, and successful downloads do not carry a Turner watermark.&lt;/p&gt;

&lt;p&gt;For developers who have shipped anonymous compute-heavy tools: would you add signup earlier, or keep the first-use flow open and enforce fairness behind the scenes?&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>webdev</category>
      <category>backend</category>
    </item>
  </channel>
</rss>
