<?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: Mohammad Ali Abdul Wahed</title>
    <description>The latest articles on DEV Community by Mohammad Ali Abdul Wahed (@maliano63717738).</description>
    <link>https://dev.to/maliano63717738</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1074510%2Ff8cd6a60-67a4-4301-9bec-2491b0e8e3f3.png</url>
      <title>DEV Community: Mohammad Ali Abdul Wahed</title>
      <link>https://dev.to/maliano63717738</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maliano63717738"/>
    <language>en</language>
    <item>
      <title>I Built an AI Agent Showcase with Laravel AI SDK — Here’s How You Can Do It</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Fri, 06 Feb 2026 20:41:47 +0000</pubDate>
      <link>https://dev.to/maliano63717738/i-built-an-ai-agent-showcase-with-laravel-ai-sdk-heres-how-you-can-do-it-13ld</link>
      <guid>https://dev.to/maliano63717738/i-built-an-ai-agent-showcase-with-laravel-ai-sdk-heres-how-you-can-do-it-13ld</guid>
      <description>&lt;p&gt;How Laravel’s new AI SDK makes building production-ready AI features surprisingly simple (with mock mode for instant demos)&lt;br&gt;
Yesterday, Laravel released their official AI SDK. As someone who’s been watching the AI integration space closely, I knew this was going to be a game-changer for PHP developers.&lt;br&gt;
So I did what any excited developer would do at 11 PM: I built a complete showcase application in one night.&lt;/p&gt;

&lt;p&gt;The result? A fully functional AI agent with chat, image generation, text-to-speech, and vector search — all working in your browser right now, no API keys required.&lt;/p&gt;

&lt;p&gt;🔗 Live Demo: &lt;a href="https://laravel-ai-showcase.onrender.com/" rel="noopener noreferrer"&gt;https://laravel-ai-showcase.onrender.com/&lt;/a&gt;&lt;br&gt;
💻 GitHub: &lt;a href="https://github.com/aliabdm/laravel-ai-showcase" rel="noopener noreferrer"&gt;https://github.com/aliabdm/laravel-ai-showcase&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s exactly how I built it, and how you can do the same.&lt;/p&gt;

&lt;p&gt;The Problem with AI Integration&lt;br&gt;
Let me be honest: integrating AI into applications has traditionally been a pain. You’re juggling multiple SDKs, managing API credentials, handling streaming responses, dealing with rate limits, and building fallback systems.&lt;/p&gt;

&lt;p&gt;Most developers want to experiment with AI features, but the barrier to entry is high. You need API keys, credit cards, and often hours of setup before you can even see your first result.&lt;/p&gt;

&lt;p&gt;Laravel’s AI SDK solves this brilliantly.&lt;/p&gt;

&lt;p&gt;What We’re Building&lt;br&gt;
A complete AI showcase with:&lt;/p&gt;

&lt;p&gt;✨ AI Chat with real-time streaming&lt;br&gt;
🎨 Image Generation&lt;br&gt;
🔊 Text-to-Speech&lt;br&gt;
🔍 Vector Search with embeddings&lt;br&gt;
🎯 Mock Mode — try everything without API keys&lt;br&gt;
🔄 Session-based mode switching for instant demos&lt;br&gt;
Step 1: Project Setup &amp;amp; Installation&lt;br&gt;
Let’s start fresh:&lt;/p&gt;

&lt;h1&gt;
  
  
  Create new Laravel project
&lt;/h1&gt;

&lt;p&gt;laravel new ai-showcase&lt;br&gt;
cd ai-showcase&lt;/p&gt;

&lt;h1&gt;
  
  
  Install Laravel AI SDK
&lt;/h1&gt;

&lt;p&gt;composer require laravel/ai&lt;/p&gt;

&lt;h1&gt;
  
  
  Publish configuration
&lt;/h1&gt;

&lt;p&gt;php artisan vendor:publish --tag=ai-config&lt;br&gt;
The configuration is beautifully simple:&lt;/p&gt;

&lt;p&gt;// config/ai.php&lt;br&gt;
return [&lt;br&gt;
    'mode' =&amp;gt; env('AI_MODE', 'mock'), // 'mock' or 'real'&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'providers' =&amp;gt; [
    'gemini' =&amp;gt; [
        'api_key' =&amp;gt; env('GEMINI_API_KEY'),
    ],
    'openai' =&amp;gt; [
        'api_key' =&amp;gt; env('OPENAI_API_KEY'),
    ],
],
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;];&lt;br&gt;
Step 2: The Secret Sauce — Mock Provider&lt;br&gt;
Here’s what makes this project special: a Mock Provider that lets anyone try the app instantly.&lt;/p&gt;

&lt;p&gt;Become a member&lt;br&gt;
No API keys. No setup. Just immediate results.&lt;/p&gt;

&lt;p&gt;// app/Ai/Providers/MockProvider.php&lt;br&gt;
namespace App\Ai\Providers;&lt;br&gt;
class MockProvider&lt;br&gt;
{&lt;br&gt;
    public function text(string $prompt): string&lt;br&gt;
    {&lt;br&gt;
        return "Hello! I'm a mock AI assistant. You asked: {$prompt}";&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function streamText(string $prompt): \Generator
{
    $response = $this-&amp;gt;text($prompt);
    $words = explode(' ', $response);

    foreach ($words as $word) {
        yield $word . ' ';
        usleep(100000); // 100ms delay for realistic streaming
    }
}

public function image(string $prompt): object
{
    return (object) [
        'url' =&amp;gt; 'https://placehold.co/600x400?text=' . urlencode($prompt),
        'prompt' =&amp;gt; $prompt,
    ];
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
This simple class saves hours of API setup and makes the app instantly demoable.&lt;/p&gt;

&lt;p&gt;Step 3: Smart Mode Switching&lt;br&gt;
Users need to switch between Mock and Real modes seamlessly. Here’s how:&lt;/p&gt;

&lt;p&gt;// app/Http/Middleware/AiModeMiddleware.php&lt;br&gt;
namespace App\Http\Middleware;&lt;br&gt;
class AiModeMiddleware&lt;br&gt;
{&lt;br&gt;
    public function handle($request, $next)&lt;br&gt;
    {&lt;br&gt;
        if ($request-&amp;gt;session()-&amp;gt;has('ai_mode')) {&lt;br&gt;
            config(['ai.mode' =&amp;gt; $request-&amp;gt;session()-&amp;gt;get('ai_mode')]);&lt;br&gt;
        }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    return $next($request);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
And the controller:&lt;/p&gt;

&lt;p&gt;// app/Http/Controllers/ModeController.php&lt;br&gt;
class ModeController extends Controller&lt;br&gt;
{&lt;br&gt;
    public function switch(Request $request)&lt;br&gt;
    {&lt;br&gt;
        $request-&amp;gt;validate(['mode' =&amp;gt; 'required|in:mock,real']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    $request-&amp;gt;session()-&amp;gt;put('ai_mode', $request-&amp;gt;mode);

    return response()-&amp;gt;json([
        'success' =&amp;gt; true,
        'mode' =&amp;gt; $request-&amp;gt;mode,
        'message' =&amp;gt; "Switched to {$request-&amp;gt;mode} mode"
    ]);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Users can now toggle modes with a single click. No server restart needed.&lt;/p&gt;

&lt;p&gt;Step 4: Building AI Features&lt;br&gt;
Chat Feature&lt;br&gt;
public function chat(Request $request)&lt;br&gt;
{&lt;br&gt;
    $request-&amp;gt;validate(['message' =&amp;gt; 'required|string']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (config('ai.mode') === 'mock') {
    $response = $this-&amp;gt;mockProvider-&amp;gt;text($request-&amp;gt;message);
} else {
    $response = \Laravel\Ai\Facades\Ai::text($request-&amp;gt;message);
}

return response()-&amp;gt;json([
    'response' =&amp;gt; (string) $response,
    'mode' =&amp;gt; config('ai.mode')
]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Image Generation&lt;br&gt;
public function generateImage(Request $request)&lt;br&gt;
{&lt;br&gt;
    $request-&amp;gt;validate(['prompt' =&amp;gt; 'required|string']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (config('ai.mode') === 'mock') {
    $image = $this-&amp;gt;mockProvider-&amp;gt;image($request-&amp;gt;prompt);
} else {
    $image = \Laravel\Ai\Facades\Ai::image($request-&amp;gt;prompt)
        -&amp;gt;landscape()
        -&amp;gt;generate();
}

return response()-&amp;gt;json(['url' =&amp;gt; $image-&amp;gt;url]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Text-to-Speech&lt;br&gt;
public function textToSpeech(Request $request)&lt;br&gt;
{&lt;br&gt;
    $request-&amp;gt;validate(['text' =&amp;gt; 'required|string']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (config('ai.mode') === 'mock') {
    $audio = $this-&amp;gt;mockProvider-&amp;gt;audio($request-&amp;gt;text);
} else {
    $audio = \Laravel\Ai\Facades\Ai::audio($request-&amp;gt;text)
        -&amp;gt;female()
        -&amp;gt;generate();
}

return response()-&amp;gt;json(['url' =&amp;gt; $audio-&amp;gt;url]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Notice the pattern? Every feature checks the mode and gracefully switches between mock and real AI.&lt;/p&gt;

&lt;p&gt;Step 5: Real-Time Streaming (The Highlight!)&lt;br&gt;
This is where it gets exciting. Real-time streaming makes AI responses feel instant and modern:&lt;/p&gt;

&lt;p&gt;// app/Http/Controllers/StreamingController.php&lt;br&gt;
public function streamWords(Request $request)&lt;br&gt;
{&lt;br&gt;
    $request-&amp;gt;validate(['prompt' =&amp;gt; 'required|string']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return response()-&amp;gt;stream(function () use ($request) {
    $provider = config('ai.mode') === 'mock' 
        ? $this-&amp;gt;mockProvider 
        : null;

    if ($provider) {
        foreach ($provider-&amp;gt;streamText($request-&amp;gt;prompt) as $chunk) {
            echo "data: " . json_encode(['chunk' =&amp;gt; $chunk]) . "\n\n";
            ob_flush();
            flush();
        }
    } else {
        $stream = \Laravel\Ai\Facades\Ai::stream($request-&amp;gt;prompt);
        foreach ($stream as $chunk) {
            echo "data: " . json_encode(['chunk' =&amp;gt; (string) $chunk]) . "\n\n";
            ob_flush();
            flush();
        }
    }

    echo "data: " . json_encode(['done' =&amp;gt; true]) . "\n\n";
}, 200, [
    'Content-Type' =&amp;gt; 'text/event-stream',
    'Cache-Control' =&amp;gt; 'no-cache',
]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Frontend JavaScript to consume the stream:&lt;/p&gt;

&lt;p&gt;async function streamResponse(prompt) {&lt;br&gt;
    const response = await fetch('/streaming/words', {&lt;br&gt;
        method: 'POST',&lt;br&gt;
        headers: { &lt;br&gt;
            'Content-Type': 'application/json',&lt;br&gt;
            'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content&lt;br&gt;
        },&lt;br&gt;
        body: JSON.stringify({ prompt })&lt;br&gt;
    });&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const reader = response.body.getReader();
const decoder = new TextDecoder();
let output = document.getElementById('output');
output.textContent = '';

while (true) {
    const { done, value } = await reader.read();
    if (done) break;

    const chunk = decoder.decode(value);
    const lines = chunk.split('\n');

    lines.forEach(line =&amp;gt; {
        if (line.startsWith('data: ')) {
            const data = JSON.parse(line.slice(6));
            if (data.chunk) {
                output.textContent += data.chunk;
            }
        }
    });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Users see responses appear word-by-word in real-time. The UX improvement is dramatic.&lt;/p&gt;

&lt;p&gt;Step 6: Vector Search with Embeddings&lt;br&gt;
For semantic search capabilities:&lt;/p&gt;

&lt;p&gt;// Migration&lt;br&gt;
Schema::create('articles', function (Blueprint $table) {&lt;br&gt;
    $table-&amp;gt;id();&lt;br&gt;
    $table-&amp;gt;string('title');&lt;br&gt;
    $table-&amp;gt;text('content');&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if ($this-&amp;gt;vectorAvailable()) {
    $table-&amp;gt;vector('embedding', dimensions: 768)-&amp;gt;index();
} else {
    $table-&amp;gt;text('embedding')-&amp;gt;nullable();
}

$table-&amp;gt;timestamps();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;});&lt;br&gt;
Search implementation:&lt;/p&gt;

&lt;p&gt;public function semanticSearch(Request $request)&lt;br&gt;
{&lt;br&gt;
    $request-&amp;gt;validate(['query' =&amp;gt; 'required|string']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (config('ai.mode') === 'mock') {
    return response()-&amp;gt;json([
        'results' =&amp;gt; [
            ['title' =&amp;gt; 'Mock Result', 'content' =&amp;gt; 'Related to: ' . $request-&amp;gt;query],
        ]
    ]);
}

$results = Article::query()
    -&amp;gt;whereVectorSimilarTo('embedding', $request-&amp;gt;query)
    -&amp;gt;limit(10)
    -&amp;gt;get();

return response()-&amp;gt;json(['results' =&amp;gt; $results]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Step 7: Bulletproof Error Handling&lt;br&gt;
Production apps need graceful degradation:&lt;/p&gt;

&lt;p&gt;private function shouldUseMock(): bool&lt;br&gt;
{&lt;br&gt;
    return config('ai.mode') === 'mock' &lt;br&gt;
        || !class_exists('Laravel\Ai\Facades\Ai')&lt;br&gt;
        || !$this-&amp;gt;hasApiKeys();&lt;br&gt;
}&lt;br&gt;
private function hasApiKeys(): bool&lt;br&gt;
{&lt;br&gt;
    return !empty(env('GEMINI_API_KEY')) &lt;br&gt;
        || !empty(env('OPENAI_API_KEY'));&lt;br&gt;
}&lt;br&gt;
// In controllers&lt;br&gt;
try {&lt;br&gt;
    if ($this-&amp;gt;shouldUseMock()) {&lt;br&gt;
        $response = $this-&amp;gt;mockProvider-&amp;gt;text($prompt);&lt;br&gt;
    } else {&lt;br&gt;
        $response = \Laravel\Ai\Facades\Ai::text($prompt);&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return response()-&amp;gt;json([
    'success' =&amp;gt; true,
    'response' =&amp;gt; $response,
    'mode' =&amp;gt; $this-&amp;gt;shouldUseMock() ? 'mock' : 'real'
]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;} catch (\Exception $e) {&lt;br&gt;
    return response()-&amp;gt;json([&lt;br&gt;
        'success' =&amp;gt; false,&lt;br&gt;
        'error' =&amp;gt; $e-&amp;gt;getMessage(),&lt;br&gt;
    ], 500);&lt;br&gt;
}&lt;br&gt;
The app never breaks. It always falls back gracefully.&lt;/p&gt;

&lt;p&gt;Step 8: Testing Everything&lt;br&gt;
// tests/Feature/AiShowcaseTest.php&lt;br&gt;
class AiShowcaseTest extends TestCase&lt;br&gt;
{&lt;br&gt;
    /** &lt;a class="mentioned-user" href="https://dev.to/test"&gt;@test&lt;/a&gt; */&lt;br&gt;
    public function mock_mode_works_without_api_keys()&lt;br&gt;
    {&lt;br&gt;
        config(['ai.mode' =&amp;gt; 'mock']);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    $response = $this-&amp;gt;postJson('/chat/demo', [
        'message' =&amp;gt; 'Hello world'
    ]);

    $response-&amp;gt;assertStatus(200)
        -&amp;gt;assertJson(['success' =&amp;gt; true, 'mode' =&amp;gt; 'mock']);
}

/** @test */
public function mode_switching_works_via_session()
{
    $response = $this-&amp;gt;postJson('/ai/mode/switch', ['mode' =&amp;gt; 'real']);

    $response-&amp;gt;assertStatus(200);
    $this-&amp;gt;assertEquals('real', session('ai_mode'));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
Run tests:&lt;/p&gt;

&lt;p&gt;php artisan test --filter AiShowcaseTest&lt;br&gt;
Key Lessons Learned&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mock Mode is Essential
Lets anyone try your app instantly
Zero API costs during development
Deterministic responses for testing
Perfect for demos and documentation&lt;/li&gt;
&lt;li&gt;Session-Based Switching is Powerful
Users toggle modes without server restart
Great for A/B testing
Clear visual feedback builds trust&lt;/li&gt;
&lt;li&gt;Streaming Transforms UX
Users see responses immediately
Perceived performance is dramatically better
Modern users expect real-time feedback&lt;/li&gt;
&lt;li&gt;Graceful Degradation is Non-Negotiable
Always have a fallback
Never break the user experience
Clear error messages help debugging
What We Built
✅ Complete AI Showcase with 4 core features
✅ Dual Mode System (Mock/Real) for flexibility
✅ Real-time Streaming with Server-Sent Events
✅ Session-based Switching for instant demos
✅ Comprehensive Testing with full coverage
✅ Production Ready with proper error handling&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Try It Yourself&lt;br&gt;
git clone &lt;a href="https://github.com/aliabdm/laravel-ai-showcase.git" rel="noopener noreferrer"&gt;https://github.com/aliabdm/laravel-ai-showcase.git&lt;/a&gt;&lt;br&gt;
cd laravel-ai-showcase&lt;br&gt;
composer install&lt;br&gt;
cp .env.example .env&lt;br&gt;
php artisan key:generate&lt;br&gt;
php artisan serve&lt;/p&gt;

&lt;h1&gt;
  
  
  Visit &lt;a href="http://localhost:8000" rel="noopener noreferrer"&gt;http://localhost:8000&lt;/a&gt;
&lt;/h1&gt;

&lt;h1&gt;
  
  
  All features work immediately in Mock Mode!
&lt;/h1&gt;

&lt;p&gt;Live Demo: &lt;a href="https://laravel-ai-showcase.onrender.com/" rel="noopener noreferrer"&gt;https://laravel-ai-showcase.onrender.com/&lt;/a&gt;&lt;br&gt;
(Note: It’s on Render free tier, so first load may take a minute)&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
The Laravel AI SDK makes building AI-powered applications incredibly simple. What would have taken days of integration work now takes hours.&lt;/p&gt;

&lt;p&gt;By implementing Mock Mode, session-based switching, and real-time streaming, we’ve created a showcase that:&lt;/p&gt;

&lt;p&gt;Works instantly for demos&lt;br&gt;
Scales to production&lt;br&gt;
Provides excellent developer experience&lt;br&gt;
Teaches best practices&lt;br&gt;
The key lesson? Always build with both development and production in mind. Mock modes and graceful fallbacks aren’t just nice-to-have — they’re essential for professional AI applications.&lt;/p&gt;

&lt;p&gt;What’s Next?&lt;br&gt;
I’m planning follow-up articles on:&lt;/p&gt;

&lt;p&gt;Deploying with Docker&lt;br&gt;
Performance optimization techniques&lt;br&gt;
Extending with custom AI tools&lt;br&gt;
Production security considerations&lt;br&gt;
Monitoring and logging AI usage&lt;br&gt;
Want the complete code? Check out the repository and star it if you find it useful!&lt;/p&gt;

&lt;p&gt;Questions? Drop them in the comments — I’d love to help you build your own AI showcase!&lt;/p&gt;

&lt;p&gt;Built with ❤️ using Laravel AI SDK&lt;br&gt;
GitHub: &lt;br&gt;
Mohammad Ali Abdul Wahed&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>ai</category>
      <category>agentaichallenge</category>
    </item>
    <item>
      <title>Firebase vs Supabase: Why I Switched for PostgreSQL and Cheaper Real-time</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Fri, 16 Jan 2026 14:19:58 +0000</pubDate>
      <link>https://dev.to/maliano63717738/firebase-vs-supabase-why-i-switched-for-postgresql-and-cheaper-real-time-2h4e</link>
      <guid>https://dev.to/maliano63717738/firebase-vs-supabase-why-i-switched-for-postgresql-and-cheaper-real-time-2h4e</guid>
      <description>&lt;p&gt;If you’re a developer, you’ve definitely heard of Firebase—Google’s powerhouse Backend-as-a-Service (BaaS). It has been the industry standard for years. However, as projects scale, many developers (myself included) start looking for something more flexible and, frankly, more affordable.&lt;/p&gt;

&lt;p&gt;Recently, I hit a wall with a project. I had two non-negotiable requirements: I needed a robust PostgreSQL database without the "cloud tax," and I needed a real-time solution that wouldn't bankrupt me as my user base grew. This led me straight to Supabase.&lt;/p&gt;

&lt;p&gt;Here is my honest comparison and the reasons why I believe Supabase is winning the battle for modern developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Database: NoSQL vs. The Power of SQL
&lt;/h2&gt;

&lt;p&gt;The biggest shift when moving from Firebase to Supabase is the underlying architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Firebase (Firestore):&lt;/strong&gt;&lt;br&gt;
 It’s a NoSQL document store. While it's great for simple data, it becomes a nightmare when you need complex relations. You often end up "denormalizing" data or doing multiple nested queries that increase your costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supabase (PostgreSQL):&lt;/strong&gt; &lt;br&gt;
This was the primary reason I made the switch. Supabase gives you a full PostgreSQL instance. For my project, getting a high-performance relational database for free (on the basic tier) was a game-changer. I could use joins, views, and complex filters that are simply impossible or too expensive in Firestore.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Real-Time: Better, Faster, and Significantly Cheaper
&lt;/h2&gt;

&lt;p&gt;There is a common misconception that Firebase is the only king of Real-time. In my experience, Supabase Real-time is not only a viable alternative but often a better one.&lt;/p&gt;

&lt;p&gt;Why Supabase Real-time impressed me:&lt;br&gt;
The Cost Factor: In Firebase, every real-time listener and every data sync counts as a "document read." If you have 1,000 users watching a list, your bill explodes. In Supabase, you aren't charged per "read" operation. You pay for bandwidth, which is significantly cheaper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Postgres Changes:&lt;/strong&gt; Supabase listens to the PostgreSQL Write-Ahead Log (WAL). This means you can subscribe to specific events (INSERT, UPDATE, DELETE) directly on your database tables.&lt;/p&gt;

&lt;p&gt;**Broadcast &amp;amp; Presence: **This is where I saved the most. Supabase allows you to send messages between clients (Broadcast) and track who is online (Presence) without writing any data to the database. It’s low-latency and incredibly cost-effective.&lt;/p&gt;

&lt;p&gt;JavaScript&lt;/p&gt;

&lt;p&gt;// Supabase Real-time is clean and efficient&lt;br&gt;
&lt;code&gt;const channel = supabase&lt;br&gt;
  .channel('room-1')&lt;br&gt;
  .on('postgres_changes', { event: 'INSERT', schema: 'public', table: 'messages' }, &lt;br&gt;
    payload =&amp;gt; {&lt;br&gt;
      console.log('New message received!', payload.new.text)&lt;br&gt;
  })&lt;br&gt;
  .subscribe()&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pricing: Escaping the "Success Tax"
&lt;/h2&gt;

&lt;p&gt;We’ve all heard the horror stories of Firebase "Bill Shocks." Firebase’s pay-per-read model means that if your app goes viral, you might wake up to a $5,000 bill.&lt;/p&gt;

&lt;p&gt;The Comparison:&lt;br&gt;
Firebase: You pay for every single operation. Read a document? Pay. Write a document? Pay. It’s hard to predict your monthly costs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supabase:&lt;/strong&gt; They offer a generous Free Tier (which includes that free Postgres DB I needed). Their Pro Plan is a flat &lt;strong&gt;$25/month&lt;/strong&gt;, which covers most of what an MVP needs with very predictable overage costs.&lt;/p&gt;

&lt;p&gt;My real-world experience: For a medium-sized app with high traffic, I found that Supabase can be &lt;strong&gt;75% to 80% cheaper than Firebase&lt;/strong&gt;, mainly because I wasn't being penalized for every database fetch.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. No Vendor Lock-in
&lt;/h2&gt;

&lt;p&gt;One of the most liberating things about Supabase is that it’s Open Source.&lt;/p&gt;

&lt;p&gt;Firebase is a closed Google product. If they raise prices or shut down a service (like they have in the past), you are stuck.&lt;/p&gt;

&lt;p&gt;Supabase is built on open tools. If you ever decide to leave their cloud platform, you can take your PostgreSQL database and self-host it anywhere. That peace of mind is priceless.&lt;/p&gt;

&lt;p&gt;Final Verdict: Which should you choose?&lt;br&gt;
Stick with Firebase if:&lt;/p&gt;

&lt;p&gt;You are building a mobile-first app that requires extremely complex offline-syncing out of the box.&lt;/p&gt;

&lt;p&gt;You are deeply integrated into the Google Cloud ecosystem.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Switch to Supabase if:&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
You want PostgreSQL: You need the reliability and power of a relational database.&lt;/p&gt;

&lt;p&gt;You need "Cheap" Real-time: You want to scale your real-time features without worrying about "per-operation" costs.&lt;/p&gt;

&lt;p&gt;You want predictable billing: You prefer a flat monthly fee over a "guessing game" bill.&lt;/p&gt;

&lt;p&gt;My Experience?&lt;br&gt;
I came for the free PostgreSQL, but I stayed for the Real-time performance and the fair pricing. Supabase has proven that you don't have to sacrifice power for price.&lt;/p&gt;

&lt;p&gt;Have you tried Supabase yet, or are you still loyal to Firebase? Let’s discuss in the comments!&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>firebase</category>
      <category>realtime</category>
      <category>postgressql</category>
    </item>
    <item>
      <title>AI Orchestration: The Microservices Approach to Large Language Models</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Sat, 03 Jan 2026 13:01:28 +0000</pubDate>
      <link>https://dev.to/maliano63717738/ai-orchestration-the-microservices-approach-to-large-language-models-4bj6</link>
      <guid>https://dev.to/maliano63717738/ai-orchestration-the-microservices-approach-to-large-language-models-4bj6</guid>
      <description>&lt;p&gt;Stop Asking “Which AI is Best?” Start Asking “How Do I Orchestrate Them?”&lt;br&gt;
As engineers building AI systems in 2025, we’re witnessing a fundamental shift in how we approach artificial intelligence integration. The question is no longer “Should I use GPT, Claude, or Gemini?” but rather “How do I orchestrate multiple specialized models to build robust AI systems?”&lt;/p&gt;

&lt;p&gt;This article explores why AI orchestration is the future of intelligent systems and how to implement it effectively.&lt;/p&gt;

&lt;p&gt;The Monolithic AI Fallacy&lt;br&gt;
Remember when we built monolithic applications? Everything in one massive codebase, tightly coupled, hard to scale, and impossible to maintain. Then microservices revolutionized software architecture by breaking systems into specialized, independent services.&lt;/p&gt;

&lt;p&gt;We’re at that exact inflection point with AI systems.&lt;/p&gt;

&lt;p&gt;The industry has been caught in a trap: comparing models head-to-head as if one must reign supreme. “GPT-5 beats Claude!” or “Claude is better at coding!” These comparisons miss the point entirely.&lt;/p&gt;

&lt;p&gt;The Reality Check&lt;br&gt;
No single model excels at everything. Each Large Language Model (LLM) has been optimized for different tasks, trained on different data, and architected with different trade-offs. Trying to find one “best” model is like trying to find the one “best” database — it doesn’t exist because the answer depends on your use case.&lt;/p&gt;

&lt;p&gt;The 2025 AI Landscape: Specialized Models for Specialized Tasks&lt;br&gt;
Let’s break down the current state of leading AI models and their sweet spots:&lt;/p&gt;

&lt;p&gt;Claude (Sonnet 4.5 / Opus 4)&lt;br&gt;
Strengths:&lt;/p&gt;

&lt;p&gt;Complex code generation: Claude excels at understanding intricate codebases and generating sophisticated solutions&lt;br&gt;
Long-context processing: With context windows up to 200K tokens, it handles extensive documents and conversations&lt;br&gt;
Technical depth: Superior performance on tasks requiring deep technical understanding&lt;br&gt;
Best for:&lt;/p&gt;

&lt;p&gt;Software development and code review&lt;br&gt;
Technical documentation analysis&lt;br&gt;
Long-form content creation&lt;br&gt;
Complex reasoning chains&lt;br&gt;
GPT-5 (OpenAI)&lt;br&gt;
Strengths:&lt;/p&gt;

&lt;p&gt;Advanced reasoning: Exceptional at multi-step logical reasoning and problem decomposition&lt;br&gt;
Mathematical prowess: Superior performance on mathematical and scientific tasks&lt;br&gt;
Analytical depth: Strong at breaking down complex problems into structured solutions&lt;br&gt;
Best for:&lt;/p&gt;

&lt;p&gt;Scientific research and analysis&lt;br&gt;
Mathematical problem-solving&lt;br&gt;
Strategic planning and decision-making&lt;br&gt;
Educational tutoring&lt;br&gt;
Gemini 3 Flash (Google)&lt;br&gt;
Strengths:&lt;/p&gt;

&lt;p&gt;Speed: Fastest inference times among major models&lt;br&gt;
Cost-effectiveness: Significantly lower costs per token&lt;br&gt;
Real-time capabilities: Optimized for streaming and interactive applications&lt;br&gt;
Best for:&lt;/p&gt;

&lt;p&gt;Customer service chatbots&lt;br&gt;
Real-time translation&lt;br&gt;
High-volume, low-complexity tasks&lt;br&gt;
Mobile and edge applications&lt;br&gt;
Open Source (LLaMA 3, DeepSeek, Mixtral)&lt;br&gt;
Strengths:&lt;/p&gt;

&lt;p&gt;Privacy: Complete data control with local deployment&lt;br&gt;
Customization: Fine-tune for specific domains and use cases&lt;br&gt;
Cost control: No per-token fees for self-hosted deployments&lt;br&gt;
Compliance: Meet strict regulatory requirements&lt;br&gt;
Best for:&lt;/p&gt;

&lt;p&gt;Healthcare and financial services&lt;br&gt;
Government and defense applications&lt;br&gt;
Proprietary research&lt;br&gt;
Specialized domain adaptation&lt;br&gt;
Introducing AI Orchestration&lt;br&gt;
AI Orchestration is the practice of intelligently routing tasks to the most appropriate model based on the requirements of each specific task. Think of it as a conductor leading an orchestra — each instrument (model) plays its part when needed to create a harmonious result.&lt;/p&gt;

&lt;p&gt;The Architecture&lt;br&gt;
User Request&lt;br&gt;
     ↓&lt;br&gt;
[Request Analyzer]&lt;br&gt;
     ↓&lt;br&gt;
[Routing Logic]&lt;br&gt;
     ↓&lt;br&gt;
┌────────┬────────┬────────┬────────┐&lt;br&gt;
│ Claude │  GPT   │ Gemini │  Local │&lt;br&gt;
│        │        │        │  Model │&lt;br&gt;
└────────┴────────┴────────┴────────┘&lt;br&gt;
     ↓&lt;br&gt;
[Response Aggregator]&lt;br&gt;
     ↓&lt;br&gt;
Final Response&lt;/p&gt;

&lt;p&gt;Key Components&lt;br&gt;
Request Classification: Analyze incoming requests to determine:&lt;/p&gt;

&lt;p&gt;Complexity level&lt;br&gt;
Domain (code, math, general, etc.)&lt;br&gt;
Latency requirements&lt;br&gt;
Privacy sensitivity&lt;br&gt;
Cost constraints&lt;br&gt;
Intelligent Routing: Direct each request to the optimal model based on:&lt;/p&gt;

&lt;p&gt;Model capabilities and benchmarks&lt;br&gt;
Current load and availability&lt;br&gt;
Cost optimization rules&lt;br&gt;
Privacy and compliance requirements&lt;br&gt;
Response Handling: Process model outputs through:&lt;/p&gt;

&lt;p&gt;Validation and quality checks&lt;br&gt;
Format standardization&lt;br&gt;
Error handling and fallbacks&lt;br&gt;
Caching for efficiency&lt;br&gt;
Feedback Loop: Continuously improve routing decisions based on:&lt;/p&gt;

&lt;p&gt;Response quality metrics&lt;br&gt;
User satisfaction scores&lt;br&gt;
Performance analytics&lt;br&gt;
Cost tracking&lt;br&gt;
Implementation Patterns&lt;br&gt;
Pattern 1: Task-Based Routing&lt;br&gt;
Route based on the nature of the task:&lt;/p&gt;

&lt;p&gt;def route_request(task):&lt;br&gt;
    if task.type == "code_generation":&lt;br&gt;
        return claude_api&lt;br&gt;
    elif task.type == "math_problem":&lt;br&gt;
        return gpt_api&lt;br&gt;
    elif task.type == "quick_query":&lt;br&gt;
        return gemini_api&lt;br&gt;
    elif task.is_sensitive_data:&lt;br&gt;
        return local_model&lt;br&gt;
Pattern 2: Cascading Intelligence&lt;br&gt;
Start with faster/cheaper models, escalate to more powerful ones:&lt;/p&gt;

&lt;p&gt;def cascading_request(query):&lt;br&gt;
    response = gemini_api.query(query)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if response.confidence &amp;lt; 0.7:
    response = gpt_api.query(query)

if response.confidence &amp;lt; 0.9:
    response = claude_api.query(query)

return response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Pattern 3: Parallel Processing with Consensus&lt;br&gt;
Query multiple models and aggregate results:&lt;/p&gt;

&lt;p&gt;async def consensus_query(question):&lt;br&gt;
    responses = await asyncio.gather(&lt;br&gt;
        claude_api.query(question),&lt;br&gt;
        gpt_api.query(question),&lt;br&gt;
        gemini_api.query(question)&lt;br&gt;
    )&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return aggregate_responses(responses)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Pattern 4: Specialized Pipelines&lt;br&gt;
Chain models for complex workflows:&lt;/p&gt;

&lt;p&gt;def content_pipeline(raw_data):&lt;br&gt;
    # Fast extraction&lt;br&gt;
    structured_data = gemini_api.extract(raw_data)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Deep analysis
insights = gpt_api.analyze(structured_data)

# Technical implementation
code = claude_api.generate_code(insights)

return code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Real-World Use Cases&lt;br&gt;
Case Study 1: Customer Support Platform&lt;br&gt;
Challenge: Handle 10,000+ daily support tickets with varying complexity&lt;/p&gt;

&lt;p&gt;Solution:&lt;/p&gt;

&lt;p&gt;Gemini Flash: Handle 80% of simple queries (password resets, status checks)&lt;br&gt;
GPT-5: Process 15% of medium complexity issues (troubleshooting, explanations)&lt;br&gt;
Claude Opus: Resolve 5% of complex technical problems (bug analysis, system integration)&lt;br&gt;
Results:&lt;/p&gt;

&lt;p&gt;70% cost reduction compared to single-model approach&lt;br&gt;
40% faster average response time&lt;br&gt;
25% improvement in customer satisfaction&lt;br&gt;
Case Study 2: Healthcare AI Assistant&lt;br&gt;
Challenge: Provide medical information while maintaining HIPAA compliance&lt;/p&gt;

&lt;p&gt;Solution:&lt;/p&gt;

&lt;p&gt;Local LLaMA model: Process all patient data on-premises&lt;br&gt;
Claude: Generate detailed medical documentation&lt;br&gt;
GPT-5: Analyze research papers and clinical guidelines&lt;br&gt;
Gemini: Handle appointment scheduling and basic queries&lt;br&gt;
Results:&lt;/p&gt;

&lt;p&gt;Full HIPAA compliance with local data processing&lt;br&gt;
Comprehensive medical knowledge through specialized routing&lt;br&gt;
Scalable system handling 100K+ monthly interactions&lt;br&gt;
Case Study 3: Development Environment&lt;br&gt;
Challenge: Create an AI coding assistant that handles diverse tasks&lt;/p&gt;

&lt;p&gt;Solution:&lt;/p&gt;

&lt;p&gt;Claude: Primary code generation and review&lt;br&gt;
GPT-5: Explain complex algorithms and architectural decisions&lt;br&gt;
DeepSeek: Fast code completion and suggestions&lt;br&gt;
Gemini: Quick documentation lookups&lt;br&gt;
Results:&lt;/p&gt;

&lt;p&gt;60% increase in developer productivity&lt;br&gt;
Better code quality through specialized review&lt;br&gt;
Reduced API costs by 50%&lt;br&gt;
Benchmarking and Evaluation&lt;br&gt;
To build effective AI orchestration, you need reliable benchmarks. Here are the essential resources:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;LMSYS Chatbot Arena
URL: &lt;a href="https://lmarena.ai" rel="noopener noreferrer"&gt;https://lmarena.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The most comprehensive community-driven benchmark, featuring:&lt;/p&gt;

&lt;p&gt;Head-to-head model comparisons&lt;br&gt;
Real user evaluations&lt;br&gt;
Category-specific rankings (coding, math, creative writing)&lt;br&gt;
Regular updates with new models&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Artificial Analysis
URL: &lt;a href="https://artificialanalysis.ai" rel="noopener noreferrer"&gt;https://artificialanalysis.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Focuses on practical metrics:&lt;/p&gt;

&lt;p&gt;Response speed comparisons&lt;br&gt;
Cost per token analysis&lt;br&gt;
Context window capabilities&lt;br&gt;
Quality-price ratio evaluations&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open LLM Leaderboard
URL: &lt;a href="https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard" rel="noopener noreferrer"&gt;https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Become a member&lt;br&gt;
Essential for open-source models:&lt;/p&gt;

&lt;p&gt;Standardized evaluation metrics&lt;br&gt;
Academic benchmarks (MMLU, HellaSwag, TruthfulQA)&lt;br&gt;
Model size and efficiency data&lt;br&gt;
Fine-tuning information&lt;br&gt;
Key Metrics to Track&lt;br&gt;
When orchestrating models, monitor these metrics:&lt;/p&gt;

&lt;p&gt;Task Success Rate: Percentage of successfully completed tasks per model&lt;br&gt;
Latency: Response time from request to completion&lt;br&gt;
Cost Per Task: Total API costs divided by number of requests&lt;br&gt;
Quality Score: User satisfaction or automated quality metrics&lt;br&gt;
Error Rate: Failed requests or low-confidence responses&lt;br&gt;
Token Efficiency: Average tokens used per successful task&lt;br&gt;
Building Your Orchestration Layer&lt;br&gt;
Step 1: Define Your Use Cases&lt;br&gt;
Map out all AI tasks in your application:&lt;/p&gt;

&lt;p&gt;What types of requests do you handle?&lt;br&gt;
What are the complexity levels?&lt;br&gt;
What are your latency requirements?&lt;br&gt;
What are your cost constraints?&lt;br&gt;
What are your privacy requirements?&lt;br&gt;
Step 2: Establish Baseline Benchmarks&lt;br&gt;
Test each potential model on your actual workload:&lt;/p&gt;

&lt;p&gt;Create a representative test set (100+ examples)&lt;br&gt;
Measure quality, speed, and cost for each model&lt;br&gt;
Identify each model’s strengths and weaknesses&lt;br&gt;
Document decision rules&lt;br&gt;
Step 3: Implement Smart Routing&lt;br&gt;
Start simple, iterate complex:&lt;/p&gt;

&lt;p&gt;class AIOrchestrator:&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self):&lt;br&gt;
        self.models = {&lt;br&gt;
            'claude': ClaudeAPI(),&lt;br&gt;
            'gpt': OpenAIAPI(),&lt;br&gt;
            'gemini': GeminiAPI(),&lt;br&gt;
            'local': LocalModel()&lt;br&gt;
        }&lt;br&gt;
        self.router = RequestRouter()&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def process(self, request):
    # Classify request
    classification = self.router.classify(request)

    # Select optimal model
    model_name = self.router.select_model(classification)
    model = self.models[model_name]

    # Execute with fallback
    try:
        response = model.generate(request)
        self.log_metrics(model_name, request, response)
        return response
    except Exception as e:
        return self.fallback_chain(request, [model_name])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Step 4: Monitor and Optimize&lt;br&gt;
Implement comprehensive observability:&lt;/p&gt;

&lt;p&gt;Log every request and response&lt;br&gt;
Track costs in real-time&lt;br&gt;
Monitor quality metrics&lt;br&gt;
A/B test routing rules&lt;br&gt;
Continuously refine your decision logic&lt;br&gt;
Common Pitfalls and How to Avoid Them&lt;br&gt;
Pitfall 1: Over-Engineering&lt;br&gt;
Problem: Building overly complex routing logic from day one&lt;/p&gt;

&lt;p&gt;Solution: Start with simple rules based on task type, add complexity only when data shows it’s needed&lt;/p&gt;

&lt;p&gt;Pitfall 2: Ignoring Costs&lt;br&gt;
Problem: Not tracking per-request costs until the bill arrives&lt;/p&gt;

&lt;p&gt;Solution: Implement cost tracking from day one, set budgets per model, use caching aggressively&lt;/p&gt;

&lt;p&gt;Pitfall 3: No Fallback Strategy&lt;br&gt;
Problem: Single point of failure when primary model is down or rate-limited&lt;/p&gt;

&lt;p&gt;Solution: Always have 2–3 fallback models configured with automatic failover&lt;/p&gt;

&lt;p&gt;Pitfall 4: Static Routing Rules&lt;br&gt;
Problem: Set routing rules once and never update them&lt;/p&gt;

&lt;p&gt;Solution: Regularly review performance data, update rules based on new benchmarks, adapt to model improvements&lt;/p&gt;

&lt;p&gt;Pitfall 5: Neglecting Privacy&lt;br&gt;
Problem: Sending sensitive data to external APIs without proper safeguards&lt;/p&gt;

&lt;p&gt;Solution: Classify data sensitivity, use local models for sensitive data, implement proper data anonymization&lt;/p&gt;

&lt;p&gt;The Economics of AI Orchestration&lt;br&gt;
Cost Optimization Strategies&lt;br&gt;
Tiered Routing: Use cheaper models for simpler tasks&lt;/p&gt;

&lt;p&gt;Gemini Flash: $0.10 per 1M tokens&lt;br&gt;
Claude Sonnet: $3.00 per 1M tokens&lt;br&gt;
Claude Opus: $15.00 per 1M tokens&lt;br&gt;
Caching: Store and reuse responses for common queries&lt;/p&gt;

&lt;p&gt;Reduce API calls by 40–60%&lt;br&gt;
Sub-millisecond response times&lt;br&gt;
Minimal infrastructure costs&lt;br&gt;
Batch Processing: Group similar requests for efficiency&lt;/p&gt;

&lt;p&gt;10–30% cost reduction through batching&lt;br&gt;
Better resource utilization&lt;br&gt;
Improved throughput&lt;br&gt;
Hybrid Deployment: Mix cloud and local models&lt;/p&gt;

&lt;p&gt;Zero marginal cost for local inference&lt;br&gt;
Control over data and privacy&lt;br&gt;
Backup during API outages&lt;br&gt;
ROI Analysis&lt;br&gt;
For a typical application processing 1M requests/month:&lt;/p&gt;

&lt;p&gt;Single Model Approach (Claude Opus only):&lt;/p&gt;

&lt;p&gt;Cost: ~$15,000/month&lt;br&gt;
Average latency: 3 seconds&lt;br&gt;
Quality: 95%&lt;br&gt;
Orchestrated Approach:&lt;/p&gt;

&lt;p&gt;Cost: ~$6,000/month (60% reduction)&lt;br&gt;
Average latency: 1.5 seconds (50% faster)&lt;br&gt;
Quality: 96% (through specialized routing)&lt;br&gt;
Break-even: Immediate positive ROI&lt;/p&gt;

&lt;p&gt;Future Trends in AI Orchestration&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Automated Model Selection
ML models that learn optimal routing decisions:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reinforcement learning for routing optimization&lt;br&gt;
Automatic A/B testing of model combinations&lt;br&gt;
Adaptive cost-quality trade-offs&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Specialized Model Ecosystems
More domain-specific models emerging:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Legal-specific models&lt;br&gt;
Medical-specific models&lt;br&gt;
Financial analysis models&lt;br&gt;
Code-only models&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Edge AI Orchestration
Extending orchestration to edge devices:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On-device models for privacy&lt;br&gt;
Cloud models for complex tasks&lt;br&gt;
Intelligent data sync&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Multimodal Orchestration
Routing across different modalities:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Text models for language tasks&lt;br&gt;
Vision models for image analysis&lt;br&gt;
Audio models for speech processing&lt;br&gt;
Code models for development&lt;br&gt;
Getting Started Today&lt;br&gt;
Immediate Actions&lt;br&gt;
Audit Your Current AI Usage&lt;/p&gt;

&lt;p&gt;What models are you using?&lt;br&gt;
What are your costs?&lt;br&gt;
What are your pain points?&lt;br&gt;
Benchmark Alternatives&lt;/p&gt;

&lt;p&gt;Test 2–3 models on your actual workload&lt;br&gt;
Compare quality, speed, and cost&lt;br&gt;
Identify clear winners for specific tasks&lt;br&gt;
Implement Simple Routing&lt;/p&gt;

&lt;p&gt;Start with if-else rules&lt;br&gt;
Add logging and metrics&lt;br&gt;
Iterate based on data&lt;br&gt;
Set Up Monitoring&lt;/p&gt;

&lt;p&gt;Track costs per model&lt;br&gt;
Measure response quality&lt;br&gt;
Monitor latency&lt;br&gt;
Resources for Learning More&lt;br&gt;
Technical Documentation:&lt;/p&gt;

&lt;p&gt;Claude API: &lt;a href="https://docs.claude.com" rel="noopener noreferrer"&gt;https://docs.claude.com&lt;/a&gt;&lt;br&gt;
OpenAI API: &lt;a href="https://platform.openai.com/docs" rel="noopener noreferrer"&gt;https://platform.openai.com/docs&lt;/a&gt;&lt;br&gt;
Google AI: &lt;a href="https://ai.google.dev/docs" rel="noopener noreferrer"&gt;https://ai.google.dev/docs&lt;/a&gt;&lt;br&gt;
Community Resources:&lt;/p&gt;

&lt;p&gt;r/LocalLLaMA for open-source models&lt;br&gt;
HuggingFace forums for model discussions&lt;br&gt;
AI engineering blogs and newsletters&lt;br&gt;
Tools and Frameworks:&lt;/p&gt;

&lt;p&gt;LangChain for orchestration&lt;br&gt;
LiteLLM for unified APIs&lt;br&gt;
Helicone for observability&lt;br&gt;
Conclusion: The Orchestrated Future&lt;br&gt;
The question “Which AI is best?” is becoming as outdated as “Which database is best?” The answer is always: it depends on your use case.&lt;/p&gt;

&lt;p&gt;The future of AI systems is orchestration. Just as modern software architecture embraces microservices, API gateways, and polyglot persistence, modern AI systems must embrace model diversity, intelligent routing, and specialized capabilities.&lt;/p&gt;

&lt;p&gt;The engineers who will build the most successful AI products aren’t the ones who pick the “best” model — they’re the ones who know how to orchestrate multiple models into cohesive, efficient, and powerful systems.&lt;/p&gt;

&lt;p&gt;Start thinking like an orchestra conductor, not a solo performer.&lt;/p&gt;

&lt;p&gt;The baton is in your hands. What will you create?&lt;/p&gt;

&lt;p&gt;About Benchmarking Resources&lt;br&gt;
Throughout this article, I’ve referenced three critical benchmarking platforms that should be part of every AI engineer’s toolkit:&lt;/p&gt;

&lt;p&gt;LMSYS Chatbot Arena (lmarena.ai): Community-driven, real-world evaluations&lt;br&gt;
Artificial Analysis (artificialanalysis.ai): Cost and performance metrics&lt;br&gt;
Open LLM Leaderboard (huggingface.co): Academic benchmarks and open-source focus&lt;br&gt;
These platforms are continuously updated as new models are released. Make checking them a regular part of your development workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft9s4t2xk6pq4famreek7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft9s4t2xk6pq4famreek7.jpg" alt=" " width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;BTLM&lt;br&gt;
Have you implemented AI orchestration in your systems? Share your experiences in the comments below!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>microservices</category>
      <category>architecture</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>I Built a PDF Chat App in Under an Hour Using RAG- Here's How You Can Too</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Mon, 29 Dec 2025 09:36:33 +0000</pubDate>
      <link>https://dev.to/maliano63717738/i-built-a-pdf-chat-app-in-under-an-hour-using-rag-heres-how-you-can-too-heh</link>
      <guid>https://dev.to/maliano63717738/i-built-a-pdf-chat-app-in-under-an-hour-using-rag-heres-how-you-can-too-heh</guid>
      <description>&lt;p&gt;🔗 Live Demo:&lt;br&gt;
&lt;a href="https://pdf-chat-rag-fx5nczbrwczzpou6qyczmj.streamlit.app/" rel="noopener noreferrer"&gt;https://pdf-chat-rag-fx5nczbrwczzpou6qyczmj.streamlit.app/&lt;/a&gt;&lt;br&gt;
📦 GitHub Repo:&lt;br&gt;
&lt;a href="https://github.com/aliabdm/pdf-chat-rag" rel="noopener noreferrer"&gt;https://github.com/aliabdm/pdf-chat-rag&lt;/a&gt;&lt;br&gt;
🤔 The Idea&lt;br&gt;
Ever wished you could talk to your documents instead of endlessly scrolling through pages?&lt;br&gt;
That’s exactly what I built using Retrieval-Augmented Generation (RAG) and modern GenAI tools.&lt;br&gt;
Upload a PDF → ask questions → get accurate, context-aware answers in seconds.&lt;br&gt;
❌ The Problem&lt;br&gt;
We’ve all been there:&lt;/p&gt;

&lt;p&gt;50-page research papers&lt;br&gt;
Long contracts&lt;br&gt;
Dense technical docs&lt;br&gt;
CVs in recruitment workflows&lt;/p&gt;

&lt;p&gt;Ctrl + F isn’t enough when you need:&lt;/p&gt;

&lt;p&gt;Summaries&lt;br&gt;
Cross-section answers&lt;br&gt;
Simple explanations&lt;br&gt;
Context-aware responses&lt;/p&gt;

&lt;p&gt;✅ The Solution: PDF Chat with RAG&lt;br&gt;
I built a web app that lets you:&lt;/p&gt;

&lt;p&gt;Upload any PDF&lt;br&gt;
Ask questions in natural language&lt;br&gt;
Get answers grounded only in your document&lt;/p&gt;

&lt;p&gt;👉 Try it live:&lt;br&gt;
&lt;a href="https://pdf-chat-rag-fx5nczbrwczzpou6qyczmj.streamlit.app/" rel="noopener noreferrer"&gt;https://pdf-chat-rag-fx5nczbrwczzpou6qyczmj.streamlit.app/&lt;/a&gt;&lt;br&gt;
🧱 Tech Stack (Why Each Tool Matters)&lt;br&gt;
🧩 LangChain — The RAG Backbone&lt;br&gt;
LangChain makes RAG production-ready by handling:&lt;/p&gt;

&lt;p&gt;Document chunking&lt;br&gt;
Embeddings&lt;br&gt;
Retrieval + generation orchestration&lt;/p&gt;

&lt;p&gt;Pythonfrom langchain_text_splitters import RecursiveCharacterTextSplitter&lt;/p&gt;

&lt;p&gt;text_splitter = RecursiveCharacterTextSplitter(&lt;br&gt;
    chunk_size=1000,&lt;br&gt;
    chunk_overlap=200&lt;br&gt;
)&lt;/p&gt;

&lt;p&gt;chunks = text_splitter.split_text(text)&lt;br&gt;
⚡ Groq — Lightning-Fast LLM Inference&lt;br&gt;
Groq uses custom LPU hardware and delivers:&lt;/p&gt;

&lt;p&gt;~2s response time&lt;br&gt;
Models like Llama 3.3 70B&lt;br&gt;
Generous free tier&lt;/p&gt;

&lt;p&gt;Pythonfrom langchain_groq import ChatGroq&lt;/p&gt;

&lt;p&gt;llm = ChatGroq(&lt;br&gt;
    model_name="llama-3.3-70b-versatile",&lt;br&gt;
    temperature=0,&lt;br&gt;
    groq_api_key=api_key&lt;br&gt;
)&lt;br&gt;
🔍 FAISS — Vector Similarity Search&lt;br&gt;
When your PDF becomes 100+ chunks, FAISS finds the most relevant ones fast.&lt;br&gt;
Pythonfrom langchain_community.vectorstores import FAISS&lt;/p&gt;

&lt;p&gt;vector_store = FAISS.from_texts(chunks, embeddings)&lt;br&gt;
🎨 Streamlit — UI in Minutes&lt;br&gt;
Why Streamlit?&lt;/p&gt;

&lt;p&gt;No frontend boilerplate&lt;br&gt;
Built-in chat + file upload&lt;br&gt;
Free deployment&lt;/p&gt;

&lt;p&gt;Pythonimport streamlit as st&lt;/p&gt;

&lt;p&gt;uploaded_file = st.file_uploader("Upload PDF", type=["pdf"])&lt;/p&gt;

&lt;p&gt;if question := st.chat_input("Ask a question"):&lt;br&gt;
    pass&lt;br&gt;
🧠 HuggingFace Embeddings&lt;br&gt;
We use all-MiniLM-L6-v2:&lt;/p&gt;

&lt;p&gt;Fast&lt;br&gt;
High quality&lt;br&gt;
Runs locally&lt;br&gt;
No API cost&lt;/p&gt;

&lt;p&gt;Pythonfrom langchain_community.embeddings import HuggingFaceEmbeddings&lt;/p&gt;

&lt;p&gt;embeddings = HuggingFaceEmbeddings(&lt;br&gt;
    model_name="sentence-transformers/all-MiniLM-L6-v2"&lt;br&gt;
)&lt;br&gt;
🔄 How RAG Works (Simple Breakdown)&lt;br&gt;
Phase 1 — Document Processing&lt;/p&gt;

&lt;p&gt;Upload PDF&lt;br&gt;
Extract text&lt;br&gt;
Split into chunks&lt;br&gt;
Generate embeddings&lt;br&gt;
Store in FAISS&lt;/p&gt;

&lt;p&gt;Phase 2 — Question Answering&lt;/p&gt;

&lt;p&gt;Embed the question&lt;br&gt;
Retrieve top 3 relevant chunks&lt;br&gt;
Build context&lt;br&gt;
Send to LLM&lt;br&gt;
Return grounded answer&lt;/p&gt;

&lt;p&gt;Pythondocs = vector_store.similarity_search(question, k=3)&lt;/p&gt;

&lt;p&gt;context = "\n\n".join([doc.page_content for doc in docs])&lt;/p&gt;

&lt;p&gt;prompt = f"""&lt;br&gt;
Context:&lt;br&gt;
{context}&lt;/p&gt;

&lt;p&gt;Question:&lt;br&gt;
{question}&lt;/p&gt;

&lt;p&gt;Answer ONLY based on the context above.&lt;br&gt;
"""&lt;/p&gt;

&lt;p&gt;answer = llm.invoke(prompt)&lt;br&gt;
🧪 Core RAG Logic (That’s It)&lt;br&gt;
Pythondef answer_question(question, vector_store, llm):&lt;br&gt;
    docs = vector_store.similarity_search(question, k=3)&lt;br&gt;
    context = "\n\n".join([doc.page_content for doc in docs])&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;prompt = ChatPromptTemplate.from_template("""
Context: {context}
Question: {question}

Provide a detailed answer based on the context.
""")

chain = prompt | llm | StrOutputParser()
return chain.invoke({"context": context, "question": question})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;🧠 Key Design Decisions&lt;/p&gt;

&lt;p&gt;Chunk overlap: avoids cutting context&lt;br&gt;
Temperature = 0: deterministic answers&lt;br&gt;
k = 3 chunks: best speed/accuracy balance&lt;/p&gt;

&lt;p&gt;⚠️ Challenges &amp;amp; Fixes&lt;br&gt;
PDF Text Extraction&lt;br&gt;
Some PDFs return broken text.&lt;br&gt;
✔️ Added validation + clear error messages.&lt;br&gt;
Context Window Limits&lt;br&gt;
Large docs exceeded limits.&lt;br&gt;
✔️ Limited chunk size + retrieval count.&lt;br&gt;
Answer Quality&lt;br&gt;
Early answers were vague.&lt;br&gt;
✔️ Strong prompt constraints.&lt;/p&gt;

&lt;p&gt;📊 Performance&lt;br&gt;
Metric,Value&lt;br&gt;
PDF size,50 pages&lt;br&gt;
Processing time,~15s&lt;br&gt;
Response time,~2s&lt;br&gt;
Chunks,87&lt;br&gt;
Accuracy,⭐ 8.5 / 10&lt;/p&gt;

&lt;p&gt;🚀 What’s Next?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-PDF support&lt;/li&gt;
&lt;li&gt;Conversation memory&lt;/li&gt;
&lt;li&gt;Export chat history&lt;/li&gt;
&lt;li&gt;Word / TXT support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🧑‍💻 Run It Locally&lt;br&gt;
&lt;code&gt;Bashgit clone https://github.com/aliabdm/pdf-chat-rag&lt;br&gt;
pip install -r requirements.txt&lt;br&gt;
streamlit run app.py&lt;/code&gt;&lt;br&gt;
Deploy on Streamlit Cloud in one click 🚀&lt;br&gt;
🧠 Lessons Learned&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;RAG is simpler than it looks&lt;/li&gt;
&lt;li&gt;Speed &amp;gt; model size&lt;/li&gt;
&lt;li&gt;Prompt engineering matters&lt;/li&gt;
&lt;li&gt;Start simple, iterate fast&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔚 Final Thoughts&lt;br&gt;
Modern AI is about orchestration, not reinventing tools.&lt;br&gt;
If this helped you, consider giving the repo a ⭐&lt;br&gt;
🔗 Connect With Me&lt;/p&gt;

&lt;p&gt;LinkedIn: &lt;a href="https://www.linkedin.com/in/mohammad-ali-abdul-wahed-1533b9171/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/mohammad-ali-abdul-wahed-1533b9171/&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/aliabdm" rel="noopener noreferrer"&gt;https://github.com/aliabdm&lt;/a&gt;&lt;br&gt;
Dev.to: &lt;a href="https://dev.to/maliano63717738"&gt;https://dev.to/maliano63717738&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy coding 🚀&lt;/p&gt;

</description>
      <category>rag</category>
      <category>langchain</category>
      <category>python</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Built a Free URL Shortener in 4 Hours Using Ruby on Rails - Here's Why Rails Still Rocks in 2025</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Sun, 28 Dec 2025 19:12:12 +0000</pubDate>
      <link>https://dev.to/maliano63717738/i-built-a-free-url-shortener-in-4-hours-using-ruby-on-rails-heres-why-rails-still-rocks-in-2025-p78</link>
      <guid>https://dev.to/maliano63717738/i-built-a-free-url-shortener-in-4-hours-using-ruby-on-rails-heres-why-rails-still-rocks-in-2025-p78</guid>
      <description>&lt;h1&gt;
  
  
  I Built a Free URL Shortener in 48 Hours Using Ruby on Rails — Here's Why Rails Still Rocks in 2025
&lt;/h1&gt;

&lt;h2&gt;
  
  
  The Problem That Started It All
&lt;/h2&gt;

&lt;p&gt;Yesterday, I was working on an article about my Elixir project. I needed to share multiple long URLs in the post, so naturally, I reached for a popular URL shortening service.&lt;/p&gt;

&lt;p&gt;Three clicks later, I hit a wall: &lt;strong&gt;"You've reached your limit of 3 short links this month."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a developer, this felt wrong. Why should something as simple as shortening URLs be locked behind paywalls and limits?&lt;/p&gt;

&lt;p&gt;So I did what any developer would do: I built my own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;48 hours later, I had a fully functional, free, open-source URL shortener deployed and running.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Ruby on Rails?
&lt;/h2&gt;

&lt;p&gt;In 2025, with all the new frameworks and tools out there, why would I choose Rails?&lt;/p&gt;

&lt;p&gt;Simple answer: &lt;strong&gt;productivity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Rails is built on the principle of "convention over configuration" — which means less time configuring, more time building. Here's what I got out of the box:&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚡ Speed of Development
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rails new url_shortener &lt;span class="nt"&gt;-d&lt;/span&gt; postgresql
rails generate scaffold Link original_url:text short_code:string clicks:integer
rails db:migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three commands. That's it. I had a full CRUD application with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Database schema&lt;/li&gt;
&lt;li&gt;RESTful routes&lt;/li&gt;
&lt;li&gt;Controller actions&lt;/li&gt;
&lt;li&gt;View templates&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🎯 Smart Defaults
&lt;/h3&gt;

&lt;p&gt;Rails made architectural decisions for me, so I could focus on the unique business logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Link&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ApplicationRecord&lt;/span&gt;
  &lt;span class="n"&gt;before_create&lt;/span&gt; &lt;span class="ss"&gt;:generate_short_code&lt;/span&gt;

  &lt;span class="kp"&gt;private&lt;/span&gt;

  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_short_code&lt;/span&gt;
    &lt;span class="kp"&gt;loop&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
      &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;short_code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;SecureRandom&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;alphanumeric&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="k"&gt;break&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="no"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists?&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;short_code: &lt;/span&gt;&lt;span class="n"&gt;short_code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Six lines of code to generate unique short codes. No external libraries needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  📦 The Ruby Ecosystem
&lt;/h3&gt;

&lt;p&gt;Need QR codes? There's a gem for that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;gem&lt;/span&gt; &lt;span class="s1"&gt;'rqrcode'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One line in the Gemfile, and suddenly I could generate QR codes for every short link:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;RQRCode&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;QRCode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;short_url&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;as_svg&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;The URL shortener includes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Instant Short Links&lt;/strong&gt; - Paste a URL, get a short code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click Analytics&lt;/strong&gt; - Track how many times each link is clicked&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QR Code Generation&lt;/strong&gt; - Automatic QR codes for every link&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Registration Required&lt;/strong&gt; - Anyone can use it freely&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clean, Responsive UI&lt;/strong&gt; - Built with inline CSS (no framework bloat)&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Technical Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Ruby on Rails 8.1&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; PostgreSQL&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QR Codes:&lt;/strong&gt; rqrcode gem&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment:&lt;/strong&gt; Render (free tier!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time to MVP:&lt;/strong&gt; Less than 48 hours&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Rails Made This Possible
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Active Record Is Magic
&lt;/h3&gt;

&lt;p&gt;Rails' ORM (Active Record) turned database operations into elegant Ruby code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="vi"&gt;@link&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_by!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;short_code: &lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:short_code&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="vi"&gt;@link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;increment!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:clicks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;redirect_to&lt;/span&gt; &lt;span class="vi"&gt;@link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;original_url&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No SQL, no boilerplate — just readable, maintainable code.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Database Migrations Are First-Class Citizens
&lt;/h3&gt;

&lt;p&gt;Every schema change is versioned and reversible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CreateLinks&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Migration&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;8.1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;change&lt;/span&gt;
    &lt;span class="n"&gt;create_table&lt;/span&gt; &lt;span class="ss"&gt;:links&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
      &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt; &lt;span class="ss"&gt;:original_url&lt;/span&gt;
      &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt; &lt;span class="ss"&gt;:short_code&lt;/span&gt;
      &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;integer&lt;/span&gt; &lt;span class="ss"&gt;:clicks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;default: &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
      &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;timestamps&lt;/span&gt;
    &lt;span class="k"&gt;end&lt;/span&gt;
    &lt;span class="n"&gt;add_index&lt;/span&gt; &lt;span class="ss"&gt;:links&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:short_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;unique: &lt;/span&gt;&lt;span class="kp"&gt;true&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Convention Over Configuration
&lt;/h3&gt;

&lt;p&gt;Rails assumes sensible defaults. Want a redirect route?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;get&lt;/span&gt; &lt;span class="s1"&gt;'/:short_code'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;to: &lt;/span&gt;&lt;span class="s1"&gt;'links#redirect'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One line. Rails handles the rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Deployment Is a Breeze
&lt;/h3&gt;

&lt;p&gt;With Render, deploying Rails apps is ridiculously simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Connect GitHub repo&lt;/li&gt;
&lt;li&gt;Add environment variables&lt;/li&gt;
&lt;li&gt;Hit deploy&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rails' convention-based structure means Render knows exactly how to build and run the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Results
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Live URL:&lt;/strong&gt; [Your Deployed URL]&lt;br&gt;
&lt;strong&gt;Source Code:&lt;/strong&gt; [GitHub Repository]&lt;/p&gt;

&lt;p&gt;The project is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ 100% free to use&lt;/li&gt;
&lt;li&gt;✅ Open source (MIT license)&lt;/li&gt;
&lt;li&gt;✅ Deployable in 10 minutes&lt;/li&gt;
&lt;li&gt;✅ No registration required&lt;/li&gt;
&lt;li&gt;✅ Fully functional with analytics and QR codes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Lessons Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Rails Still Delivers on Its Promise
&lt;/h3&gt;

&lt;p&gt;After nearly 20 years, Rails remains one of the fastest ways to build web applications. The "Rails way" isn't just convention — it's accumulated wisdom from thousands of production apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Choose Boring Technology
&lt;/h3&gt;

&lt;p&gt;Rails isn't trendy. It doesn't make headlines at tech conferences. But it &lt;strong&gt;works&lt;/strong&gt;, and it works consistently.&lt;/p&gt;

&lt;p&gt;When you need to ship fast, reach for boring, proven technology.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Open Source Wins
&lt;/h3&gt;

&lt;p&gt;Instead of paying for limited features, I built exactly what I needed and made it available for everyone. That's the power of open source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;The entire project is open source. You can:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use the live version&lt;/strong&gt; at [Your Live URL]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deploy your own&lt;/strong&gt; in under 10 minutes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fork and customize&lt;/strong&gt; to fit your needs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contribute features&lt;/strong&gt; via pull requests&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;In 2025, with AI, microservices, and serverless everything competing for our attention, it's easy to overcomplicate things.&lt;/p&gt;

&lt;p&gt;Sometimes, the best solution is the simplest one.&lt;/p&gt;

&lt;p&gt;Rails gave me superpowers: I went from idea to deployed product in 48 hours, with clean code, zero configuration headaches, and a fully functional app.&lt;/p&gt;

&lt;p&gt;That's the Rails magic that keeps me coming back.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What's your experience with Rails? Or what framework do you reach for when you need to ship fast? Let me know in the comments!&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;p&gt;📂 GitHub Repository: &lt;a href="https://github.com/aliabdm/url-shortener-rails" rel="noopener noreferrer"&gt;https://github.com/aliabdm/url-shortener-rails&lt;/a&gt;&lt;br&gt;
🚀 Live Demo: &lt;a href="https://url-shortener-rails.onrender.com/links" rel="noopener noreferrer"&gt;https://url-shortener-rails.onrender.com/links&lt;/a&gt;&lt;br&gt;
💼 Connect on LinkedIn:&lt;a href="https://www.linkedin.com/in/mohammad-ali-abdul-wahed-1533b9171/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/mohammad-ali-abdul-wahed-1533b9171/&lt;/a&gt;&lt;br&gt;
🐙 Follow on GitHub: &lt;a href="https://github.com/aliabdm" rel="noopener noreferrer"&gt;https://github.com/aliabdm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you found this helpful, give the project a ⭐ on GitHub!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built with ❤️ using Ruby on Rails&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>🚀 PlainAid: Real-Time AI Text Simplifier Built with Elixir &amp; Phoenix LiveView</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Sat, 27 Dec 2025 13:38:49 +0000</pubDate>
      <link>https://dev.to/maliano63717738/plainaid-real-time-ai-text-simplifier-built-with-elixir-phoenix-liveview-435m</link>
      <guid>https://dev.to/maliano63717738/plainaid-real-time-ai-text-simplifier-built-with-elixir-phoenix-liveview-435m</guid>
      <description>&lt;p&gt;I recently explored Elixir, a trending, high-performance language, and paired it with Phoenix LiveView to build PlainAid 🎯, a privacy-first web app that simplifies complex text instantly.&lt;/p&gt;

&lt;p&gt;Why I Chose Elixir &amp;amp; Phoenix LiveView&lt;/p&gt;

&lt;p&gt;Elixir: Runs on Erlang VM → handles millions of concurrent connections&lt;br&gt;
Fault-tolerant &amp;amp; scalable → apps stay reliable under load&lt;br&gt;
Phoenix LiveView: Real-time, interactive UI without heavy JavaScript&lt;br&gt;
Elixir + LiveView lets you build real-time web apps quickly, with clean code and high performance.&lt;/p&gt;

&lt;p&gt;What PlainAid Does&lt;br&gt;
PlainAid turns complex legal, official, or formal documents into clear, actionable insights:&lt;/p&gt;

&lt;p&gt;✅ Simplified Summary&lt;br&gt;
⚠️ Key Actions&lt;br&gt;
⏰ Deadlines&lt;br&gt;
🚨 Risks&lt;br&gt;
✓ Optional Items&lt;br&gt;
All real-time, secure, and privacy-first — no accounts, no data storage.&lt;/p&gt;

&lt;p&gt;flowchart TD&lt;br&gt;
&lt;code&gt;User --&amp;gt; LiveView[Phoenix LiveView UI]&lt;br&gt;
    LiveView --&amp;gt; Simplifier[Text Simplifier Module]&lt;br&gt;
    Simplifier --&amp;gt; AI[Groq API (Llama 3.3)]&lt;br&gt;
    AI --&amp;gt; Simplifier&lt;br&gt;
    Simplifier --&amp;gt; LiveView&lt;br&gt;
    LiveView --&amp;gt; User&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- User inputs text in the web form&lt;/li&gt;
&lt;li&gt;- LiveView updates instantly&lt;/li&gt;
&lt;li&gt;- Simplifier sends text to AI API&lt;/li&gt;
&lt;li&gt;- Returns structured summary &amp;amp; actionable points&lt;/li&gt;
&lt;li&gt;- Displayed real-time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tech Stack&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Technology&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;Elixir 1.19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;td&gt;Phoenix 1.7 + LiveView&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI Processing&lt;/td&gt;
&lt;td&gt;Groq API (Llama 3.3 70B)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP Client&lt;/td&gt;
&lt;td&gt;HTTPoison&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSON&lt;/td&gt;
&lt;td&gt;Jason&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Tailwind CSS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Render.com&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Try It Yourself&lt;br&gt;
🔗 Live Demo: &lt;a href="https://lnkd.in/dRFc8uMH" rel="noopener noreferrer"&gt;https://lnkd.in/dRFc8uMH&lt;/a&gt;&lt;br&gt;
📂 GitHub Repo (Open Source — MIT): &lt;a href="https://lnkd.in/dPR7YcGC" rel="noopener noreferrer"&gt;https://lnkd.in/dPR7YcGC&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why This Matters&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build interactive, real-time apps with minimal front-end code&lt;/li&gt;
&lt;li&gt;Scalable &amp;amp; fault-tolerant → handles growth effortlessly&lt;/li&gt;
&lt;li&gt;Privacy-first design → perfect for sensitive documents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ideas for Contribution&lt;br&gt;
Multi-language support (Arabic, Spanish, French)&lt;br&gt;
Browser extension&lt;br&gt;
Export results to PDF/DOCX&lt;br&gt;
Batch processing of documents&lt;br&gt;
Enhanced AI summarization&lt;br&gt;
📢 PlainAid is live &amp;amp; ready for testing!&lt;/p&gt;

&lt;p&gt;Give it a try, fork the repo, or contribute. Let’s make reading complex text simple for everyone.&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>phoenix</category>
      <category>ai</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Redis Hacks Your Future Self Will Thank You For 🚀 (No More Crashes, Slowdowns, or "Why Is Production Burning?!" Nights)</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Wed, 16 Apr 2025 16:36:48 +0000</pubDate>
      <link>https://dev.to/maliano63717738/title-redis-hacks-your-future-self-will-thank-you-for-no-more-crashes-slowdowns-or-why-is-46eh</link>
      <guid>https://dev.to/maliano63717738/title-redis-hacks-your-future-self-will-thank-you-for-no-more-crashes-slowdowns-or-why-is-46eh</guid>
      <description>&lt;p&gt;Redis isn’t just a fancy cache – it’s a grenade. Pull the wrong pin (ahem, maxmemory), and BOOM 💥&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzg8bqd3vb982jnw0yzs6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzg8bqd3vb982jnw0yzs6.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  maxmemory &amp;amp; Eviction Policies: Stop Redis From Ghosting Your Data
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;The Problem:&lt;/strong&gt; Redis doesn’t magically clean up. Set maxmemory too high, and it’ll eat your RAM like a Cookie Monster. Set it too low, and it’ll evict data mid-transaction.&lt;/p&gt;

&lt;p&gt;The Fix:&lt;br&gt;
First: set the max memory limit that Redis can't exceed out of your server resources&lt;br&gt;
Use the eviction strategy option that meets your needs. Example:&lt;br&gt;
volatile-lru for mixed workloads (bye-bye, least-recently-used expired keys).&lt;/p&gt;

&lt;p&gt;allkeys-lfu if you’re a data hoarder (prioritize frequently used keys, even if they’re immortal).&lt;/p&gt;

&lt;p&gt;All options:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6n22iql0w2mdfywyuag.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6n22iql0w2mdfywyuag.jpg" alt=" " width="800" height="1040"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; Test evictions before your app trends on Hacker News.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lua Scripts: Your Atomic Weapon Against Race Conditions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why It Matters:&lt;/strong&gt; 5 clients updating the same key? Chaos. Lua scripts execute atomically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnmhn2wdjggnj4ywsce8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frnmhn2wdjggnj4ywsce8.png" alt=" " width="534" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Later, you can pull your data from Redis into whatever DB you use for consistency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Retries, Timeouts &amp;amp; Processors (Yes, That’s a Word Now)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;- Retries:&lt;/strong&gt; 3 retries with exponential backoff. More? You’re just DDoSing yourself.&lt;br&gt;
&lt;strong&gt;- Timeouts:&lt;/strong&gt; connect_timeout: 5s, read_timeout: 2s. Your app isn’t a hostage negotiator.&lt;br&gt;
&lt;strong&gt;- Processors:&lt;/strong&gt; Redis is single-threaded. If your CPU cores are screaming, shard or migrate heavy ops to background workers.&lt;/p&gt;

&lt;p&gt;Redis isn’t ‘set it and forget it’ – it’s ‘set it, tweak it, and make your on-call rotations boring again’. Try one tip today, and thank me when you’re sleeping through deploy windows.&lt;/p&gt;

&lt;p&gt;Comment your worst Redis horror story – bonus points for plot twists involving &lt;strong&gt;FLUSHALL&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading&lt;/p&gt;

</description>
      <category>devops</category>
      <category>softwareengineering</category>
      <category>redis</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Understanding When and Why Top Talent Decides to Leave: A Crucial Insight for Employers</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Tue, 13 Aug 2024 20:48:26 +0000</pubDate>
      <link>https://dev.to/maliano63717738/understanding-when-and-why-top-talent-decides-to-leave-a-crucial-insight-for-employers-3l74</link>
      <guid>https://dev.to/maliano63717738/understanding-when-and-why-top-talent-decides-to-leave-a-crucial-insight-for-employers-3l74</guid>
      <description>&lt;p&gt;*&lt;em&gt;Retaining Top Talent: A Critical Insight for Employers&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Retaining top talent is essential for any organization's success, yet there are critical moments when even the most competent and loyal employees decide to leave. Recognizing these moments can help companies prevent costly turnover.&lt;/p&gt;

&lt;p&gt;**Stage 1: The First Day Disillusionment&lt;br&gt;
**Imagine a new hire who joins with high expectations, only to discover that the reality of the workplace differs significantly from what was portrayed during recruitment. For example, a software developer at a tech company was promised a collaborative environment with cutting-edge projects, only to find a culture of micromanagement and outdated tools. This misalignment led to an early resignation, highlighting the importance of transparency during the hiring process. Even a small deception can erode trust and lead to a quick exit.&lt;/p&gt;

&lt;p&gt;**Stage 2: The First Anniversary Without Recognition&lt;br&gt;
**After a year of dedication, employees often expect some form of recognition—whether it's a raise, a promotion, or even a simple acknowledgment of their contributions. A study revealed that a substantial percentage of workers leave because they feel undervalued. For instance, an employee at a financial services firm worked tirelessly, only to receive minimal feedback and no raise. The lack of recognition prompted them to seek opportunities elsewhere, where their efforts would be appreciated.&lt;/p&gt;

&lt;p&gt;**Stage 3: The Second Year Stagnation&lt;br&gt;
**By the second year, employees look for growth opportunities. Without new challenges or a clear path for career advancement, they may feel stagnant. A real-life example can be found in a mid-level manager at a retail company who, after two years of routine tasks and no prospects for development, decided to move on to a role that offered growth. The feeling of being "stuck" can be a powerful motivator for leaving, even if other aspects of the job are satisfactory.&lt;/p&gt;

&lt;p&gt;**The Consequences of Losing Top Talent&lt;br&gt;
**Losing a key employee can weaken an organization significantly, impacting productivity and morale. Research shows that the departure of just one highly skilled worker can disrupt workflows and lead to unexpected declines in output. Therefore, it's crucial for companies to invest in honest communication, meaningful recognition, and career development to retain their best employees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Employers must recognize these critical stages and take proactive steps to ensure that their top talent feels valued, challenged, and aligned with the company’s mission. The cost of replacing an experienced employee often far exceeds the cost of keeping them engaged and satisfied.&lt;/p&gt;

</description>
      <category>talentretention</category>
      <category>employeengagement</category>
      <category>recruitment</category>
      <category>hr</category>
    </item>
    <item>
      <title>Data Encryption</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Thu, 02 May 2024 17:23:56 +0000</pubDate>
      <link>https://dev.to/maliano63717738/data-encryption-5dfc</link>
      <guid>https://dev.to/maliano63717738/data-encryption-5dfc</guid>
      <description>&lt;p&gt;Unlocking the Mystery: What is Data Encryption and How Does it Work? 🔐&lt;/p&gt;

&lt;p&gt;Ever wondered how your sensitive information stays safe online? Let's dive into the world of data encryption and understand its inner workings, along with when to use each method and which algorithms to choose.&lt;/p&gt;

&lt;p&gt;Data encryption is like turning readable data into a secret code, ensuring security, authenticity, and integrity. But why do we need it?&lt;/p&gt;

&lt;p&gt;Three main reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security: Protecting important data from exposure&lt;/li&gt;
&lt;li&gt;Authenticity: Ensuring only authorized individuals can access the data&lt;/li&gt;
&lt;li&gt;Integrity: Guaranteeing that important data hasn't been tampered with
So, what are the types of data encryption?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjl7mk0arpzj40yizve7w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjl7mk0arpzj40yizve7w.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firstly, Symmetric Encryption:&lt;br&gt;
This method uses a single key to both encrypt and decrypt data. While algorithms like Blowfish and RC4 are outdated, AES stands as today's best practice.&lt;/p&gt;

&lt;p&gt;How does it work?&lt;br&gt;
These algorithms encrypt data bit by bit, with AES dividing data into blocks and adding an Initialization Vector (IV) to generate a unique random value for each block.&lt;/p&gt;

&lt;p&gt;But what if the key is compromised? Enter Asymmetric Encryption:&lt;br&gt;
This approach involves a public key to encrypt data and a private key to decrypt it. RSA and Diffie-Hellman are popular examples, safeguarding sensitive communications like SSH connections.&lt;/p&gt;

&lt;p&gt;But what about data modification?&lt;/p&gt;

&lt;p&gt;Enter the third type: Hashing Functions:&lt;br&gt;
These one-way encryption methods, like SHA and MD5, ensure data integrity. For example, passwords are stored as hashed values, and during login, the hashed input is compared to the stored hashed password.&lt;/p&gt;

&lt;p&gt;So, the next time you send a sensitive message or log into your bank account, remember the invisible fortress of encryption standing guard, keeping your information safe and sound.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>security</category>
      <category>programming</category>
      <category>development</category>
    </item>
    <item>
      <title>Integrating With OpenAi(ChatGPT)(With Code example)</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Fri, 23 Jun 2023 12:13:56 +0000</pubDate>
      <link>https://dev.to/maliano63717738/integrating-with-openaichatgptwith-code-example-j3b</link>
      <guid>https://dev.to/maliano63717738/integrating-with-openaichatgptwith-code-example-j3b</guid>
      <description>&lt;p&gt;If your project's requirement puts you in need of integrating it with OpenAi here is a brief depending on OpenAi documentation of how to do that :&lt;br&gt;
First, you need to make your needs clear because OpenAi depends on many models and engines each one of them is an Ai model trained on a specific amount of data and can provide a limited amount of words or types of responses.&lt;br&gt;
Based on the type of response it goes for 2 main categories :&lt;br&gt;
Completion:&lt;br&gt;
In this type, the usage will be for  the completing and text you send and as an example of it :&lt;br&gt;
text-davinci-001,text-davinci-002,text-davinci-003&lt;br&gt;
the number in the end represent the accuracy of the response,davinci 3 is the highest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs92f300svb43xvy3jknu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs92f300svb43xvy3jknu.png" alt=" " width="800" height="395"&gt;&lt;/a&gt;&lt;br&gt;
Chat:&lt;br&gt;
In this type, the usage will be for the Chat and it works 100% the same as you are chatting with Chatgpt, as an example of its models :&lt;br&gt;
gpt-3.5-turbo,gpt-3.5-turbo-0613 ..etc&lt;br&gt;
gpt-3.5-turbo-0613 is the newest one and the one with the highest accuracy,code example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fas3ngv94dcr21cwr4iow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fas3ngv94dcr21cwr4iow.png" alt=" " width="800" height="442"&gt;&lt;/a&gt;&lt;br&gt;
Note: please note that as much as you raise your accuracy the response time will be higher.&lt;/p&gt;

</description>
      <category>openai</category>
      <category>chatgpt</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What Is Trait In PHP?</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Sun, 28 May 2023 14:56:18 +0000</pubDate>
      <link>https://dev.to/maliano63717738/what-is-trait-in-php-2f6g</link>
      <guid>https://dev.to/maliano63717738/what-is-trait-in-php-2f6g</guid>
      <description>&lt;p&gt;Question asked in every interview: What does trait mean in PHP?&lt;br&gt;
Today's post is about PHP in general and specifically about something we use every day without delving deep into it, which is the trait class. We all know about object-oriented programming and how we can inherit from one class to another. However, sometimes we need to implement multiple inheritance, which means allowing a class to inherit from more than one class. Unfortunately, this feature is not supported in PHP, so we use traits instead.&lt;br&gt;
In the image below, there is an example comparing traits in PHP and the same concept in Python.&lt;br&gt;
In Laravel, all you need to do to use a trait is to start the class definition with the keyword "trait" and import the namespace "App\Traits." Apart from its main purpose, which is solving the problem of multiple inheritances, traits have many other uses, such as in SOLID principles, object-oriented programming, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkh1bipx1w1e3chbg2sg6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkh1bipx1w1e3chbg2sg6.jpg" alt=" " width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>oop</category>
      <category>php</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How Much PHP Do I Need To learn Laravel?</title>
      <dc:creator>Mohammad Ali Abdul Wahed</dc:creator>
      <pubDate>Sat, 27 May 2023 15:57:01 +0000</pubDate>
      <link>https://dev.to/maliano63717738/how-much-php-do-i-need-to-learn-laravel-1j87</link>
      <guid>https://dev.to/maliano63717738/how-much-php-do-i-need-to-learn-laravel-1j87</guid>
      <description>&lt;p&gt;OOP, some PDO would be great addition,know the concept of MVC and how it works, know PHP helpers and main functions, that's it you are good to go&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>php</category>
      <category>laravel</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
