<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Berkay Bindebir on Medium]]></title>
        <description><![CDATA[Stories by Berkay Bindebir on Medium]]></description>
        <link>https://medium.com/@berkaybindebir?source=rss-91652a8a4608------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aBIOpfiZ-YBIInaaJNDx5g@2x.jpeg</url>
            <title>Stories by Berkay Bindebir on Medium</title>
            <link>https://medium.com/@berkaybindebir?source=rss-91652a8a4608------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 13:44:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@berkaybindebir/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Managing Distributed Workflows: Orchestration vs. Choreography]]></title>
            <link>https://levelup.gitconnected.com/managing-distributed-workflows-orchestration-vs-choreography-9d8eeb432a55?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d8eeb432a55</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 12:12:32 GMT</pubDate>
            <atom:updated>2026-08-21T16:17:07.959Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>Below are my personal notes on Chapter 11, </em><strong><em>“Managing Distributed Workflows,”</em></strong><em> from </em>Software Architecture: The Hard Parts<em>. I highly recommend reading the book if you haven’t already.</em></blockquote><p>A business workflow often spans multiple domains and operations that inherently depend on each other. Once these operations are distributed across different services, architects must decide how to preserve these relationships without introducing unnecessary coupling.</p><p>The challenge is not eliminating coupling, since some coupling is inherent in the problem domain, but choosing how that coupling is implemented across distributed components.</p><h3>Semantic coupling is unavoidable; implementation coupling is a design choice.</h3><p>Every business workflow has some inherent coupling imposed by the problem domain. If one operation depends on another, that relationship exists regardless of how the system is designed.</p><p>DDD and bounded contexts can help identify and define domain boundaries, but they cannot eliminate semantic coupling between those domains. An architect cannot reduce the semantic coupling inherent in the problem through implementation choices; they can only avoid introducing unnecessary implementation coupling or make it worse through poor design choices.</p><p>This distinction becomes especially important in <strong>distributed workflows</strong>. When a semantically coupled business process is distributed across multiple services, architects must decide how those inherent relationships should be implemented.</p><p>Three main forces contribute to this implementation coupling:</p><ul><li><strong>Communication:</strong> how services exchange information.</li><li><strong>Consistency:</strong> how consistent their state needs to be across the workflow.</li><li><strong>Coordination:</strong> how the individual steps of the workflow are managed.</li></ul><p>Managing distributed workflows is therefore largely about <strong>implementing the unavoidable semantic coupling of a business process across distributed components without introducing unnecessary implementation coupling</strong>.</p><p>Two common approaches to workflow coordination are <strong>orchestration and choreography</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sXc6twI7TFD-CA3HAA8YEQ.png" /><figcaption>Orchestration vs. Choreography</figcaption></figure><h3>Orchestration Communication Style</h3><p>This communication style introduces an orchestrator/mediator to manage a distributed workflow. The orchestrator does not contain the domain behavior of the individual services it coordinates. Its responsibility is to coordinate those services, Its sole responsibility is coordinating the workflow, while domain behavior remains within the appropriate bounded contexts.</p><p>It may not seem as useful when considering only the <strong>happy path</strong>, since its usefulness becomes more apparent as semantic coupling and workflow complexity increase, particularly around error handling.</p><p>While the orchestrator/mediator is responsible for communication and coordination, each service owns its transactional state. When an error occurs, the orchestrator coordinates the necessary recovery or compensating actions using the existing communication paths, without introducing new communication paths between the participating services.</p><p>Since the orchestrator owns the workflow, it provides several advantages as workflow complexity increases: it centralizes workflow state and behavior, coordinates error handling and compensating actions, and can recover from temporary outages through mechanisms such as retries.</p><p>As workflow ownership is centralized, orchestration also introduces trade-offs: the orchestrator can become a bottleneck or single point of failure unless designed for resilience and horizontal scaling. Centralized coordination can also reduce potential parallelism and increase coupling between the orchestrator and the participating services.</p><h3>Choreography Communication Style</h3><p>In this communication pattern, the initiating request goes to the first service in the chain of responsibility. Each service performs its responsibility and sends a message that triggers the next participant in the workflow. Since there is no centralized coordinator, workflow state such as processing status, error states, retry counts, and compensation state may need to be tracked across the participating services.</p><p>At first glance, choreography seems straightforward. However, complexity increases when considering error cases. Unlike orchestration, handling these errors may require additional communication paths between services, causing services to interact directly with each other.</p><p>Since workflow state must be managed somehow, choreography commonly uses patterns such as <strong>Front Controller</strong>, <strong>Stateless Choreography</strong>, and <strong>Stamp Coupling</strong>.</p><ul><li><strong>Front Controller:</strong> A dedicated component tracks the overall workflow state while services still coordinate through choreography. It simplifies state tracking but introduces a centralized component and additional coupling.</li><li><strong>Stateless Choreography:</strong> No component explicitly tracks the overall workflow state; each service reacts to incoming messages and performs its part. It’s simple but becomes difficult to manage as workflow and error-handling complexity grows.</li><li><strong>Stamp Coupling:</strong> Workflow state is carried along with the messages exchanged between services. This avoids centralized state storage but increases message size and couples services to the shared workflow-state structure.</li></ul><p>Each pattern manages or propagates workflow state differently and introduces its own trade-offs in coupling, complexity, and state ownership.</p><p>Since there is no centralized coordinator, choreography provides more opportunities for parallelism, allows services to scale independently, avoids a central point of failure, and reduces coupling to an orchestrator. However, distributed coordination comes with trade-offs. Without a workflow owner, managing workflow state, error and boundary conditions becomes harder. Services need more knowledge about the overall workflow, increasing the complexity of error handling and making recovery from failures or temporary outages more difficult.</p><h3>Conclusion</h3><p>Neither orchestration nor choreography should always be chosen over the other. Choosing between them requires looking beyond the <strong>happy path</strong> and understanding the <strong>semantic coupling</strong> inherent in the business workflow, including its error and boundary conditions.</p><p>We cannot change the inherent coupling imposed by the business domain, but we can control the implementation coupling introduced by our architectural decisions.</p><p>As workflow complexity grows, these trade-offs become increasingly important. Our responsibility as architects is to understand the primary forces creating that complexity and choose the communication style that best fits the workflow without introducing unnecessary implementation coupling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d8eeb432a55" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/managing-distributed-workflows-orchestration-vs-choreography-9d8eeb432a55">Managing Distributed Workflows: Orchestration vs. Choreography</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hype-Driven Development: The Biggest Problem in Modern Software]]></title>
            <link>https://levelup.gitconnected.com/hype-driven-development-the-biggest-problem-in-modern-software-3258c5d89c2a?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/3258c5d89c2a</guid>
            <category><![CDATA[engineering-culture]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[careers-in-tech]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 13:21:25 GMT</pubDate>
            <atom:updated>2025-10-01T14:15:49.706Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Today, anything can go viral in seconds. Marketing has more power than ever. Whether through a 6-second video, a viral X (formerly Twitter) thread, or even an article like this one. Software development is no exception; we’re just as influenced by trends and hype as any other industry.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYOo2OFeF7Jzm0yTcJ9L9A.jpeg" /><figcaption>Modern Software Development vs Tech Influencers</figcaption></figure><h3>Most Shiny Tools Are Just Good PR</h3><p><a href="https://www.statista.com/statistics/1092819/global-influencer-market-size/">The influencer market reached <strong>$30 billion in 2025</strong>, up from $20 billion just a year earlier</a>. While most people associate influencers with fashion, lifestyle, or travel, there is a big slice of “<strong>tech influencers”</strong>. Their reach is enormous, shaping the perspectives of aspiring developers, startups, and even established companies.</p><p>There are millions of content creators in the software development niche, but most are full-time creators rather than practicing software developers. Because content creation relies on influence to generate income, many tech influencers earn money through paid sponsorships, affiliate links, and similar revenue streams.</p><p>At the same time, companies spend thousands — <strong>even millions</strong> — on PR budgets to promote their products. With the right marketing team, they can convince thousands of developers to adopt tools or practices that might not actually be the best fit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t5sJKCamBTBEBmCl.jpg" /><figcaption>AWS F1 — <a href="https://aws.amazon.com/sports/f1/">https://aws.amazon.com/sports/f1/</a></figcaption></figure><h3>Selling Dreams</h3><p>Tech influencers often use hooks to grab your attention, like:</p><ul><li><em>“Learn this and land a six-figure job.”</em></li><li><em>“I scaled my app to 1M users with just this stack.”</em></li><li><em>“This is the only tool you need as a developer in 2025.”</em></li></ul><p>These lines sound inspiring, but they’re designed to sell a dream. Often oversimplifying reality and glossing over the hard work, trade-offs, and failures behind real success.</p><p>Remember, <strong>they’re getting paid. What about you?</strong></p><h3>The Cost of Hype</h3><p>This leads early-stage startups into <strong>vendor lock-in</strong>, where they burn through a significant share of their investment or revenue on tools that look shiny in the beginning but don’t scale when the business grows. Instead of focusing on product-market fit or customer needs, much of their runway gets tied up in subscriptions, infrastructure commitments, or platforms they can’t easily escape from.</p><p>For developers, the story isn’t much brighter. Many get trapped in <strong>“tutorial hell”</strong> jumping from one crash course to another without ever applying the knowledge to meaningful <strong>real-world problems</strong>. The relentless pace of new tools creates a sense of <strong>constant pressure to keep up</strong>, which often spirals into <strong>imposter syndrome</strong>: the belief that everyone else is ahead while you’re falling behind. Over time, this culture of hype not only wastes resources but also erodes confidence, motivation, and in some cases, careers.</p><h3>Hype or Not Framework</h3><p>This is the framework I use to navigate hype. It has saved me from making costly mistakes more than once.</p><ul><li><strong>Wait:</strong> Sleep on it. Sometimes for months, even years. If a tool survives the hype cycle, it’s worth a second look.</li><li><strong>Investigate:</strong> I check the GitHub Issues tab, Reddit threads, and community discussions. Look for recurring pain points.</li><li><strong>Experiment:</strong> Tutorials are great for learning the basics, but I always test against real problems I face in projects.</li><li><strong>Compare:</strong> Stack it up against alternatives. Is it actually better, or just newer? Does it solve a unique problem, or reinvent the wheel with flashier branding?</li><li><strong>Validate:</strong> Look for battle-tested evidence, case studies, production usage, and benchmarks. Is anyone at scale using it successfully?</li><li><strong>Decide:</strong> If it checks out, adopt it gradually. If not, move on without regret.</li></ul><h3>A Personal Note</h3><p>I’m <strong>not against</strong> companies spending on PR, nor do I think every influencer is bad. In fact, many <strong>gorgeous, well-built products</strong> have grown thanks to big marketing budgets. At the same time, I’ve also seen — <strong><em>and personally fallen for</em></strong> — solutions that were all hype with no real substance. I’ve invested time, energy, and money into tools that weren’t battle-tested and never grew beyond the early stages. That’s the reality of today’s ecosystem: influence is powerful, for better or worse.</p><h3>Special Thanks</h3><p>Many highly skilled engineers share knowledge responsibly. These creators are aware of their influence and produce content that genuinely helps thousands of developers learn, grow, and build better software. Supporting them is how we build a healthier developer ecosystem, one where influence comes from trust and experience, not just marketing.</p><p><strong><em>Drop a comment if you know someone who deserves recognition for doing this right.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3258c5d89c2a" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/hype-driven-development-the-biggest-problem-in-modern-software-3258c5d89c2a">Hype-Driven Development: The Biggest Problem in Modern Software</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Adding 4x More Memory Saved Us 50% on Lambda Costs — Here’s Why]]></title>
            <link>https://berkaybindebir.medium.com/how-adding-4x-more-memory-saved-us-50-on-lambda-costs-heres-why-ad8dc30fbbe6?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad8dc30fbbe6</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloud-cost-optimization]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 11:25:10 GMT</pubDate>
            <atom:updated>2025-09-11T15:53:27.146Z</atom:updated>
            <content:encoded><![CDATA[<h3>How Adding 4x More Memory Saved Us 50% on Lambda Costs — Here’s Why</h3><p><strong><em>TLDR:</em></strong><br>I ran into a weird production issue: socket timeouts in a Lambda function that had always worked fine. After a deep dive, I discovered the real cause wasn’t the network — it was CPU starvation. The fix? Adding <strong>4x more memory</strong>, which not only solved the timeouts but also made the function run faster <strong>and 50% cheaper</strong>. Sometimes, more RAM really does make things cheaper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WViK74pORxY6NcN4.png" /></figure><p>It all started with a weird issue in one of our Lambda functions. Everything had been working fine — until it wasn’t.</p><p>At first, I thought it was just a flaky network problem. But after digging deeper, I found out it was actually a hidden CPU issue inside the Lambda itself.</p><p>And the fix? Adding more memory made it <strong>faster</strong> and <strong>cheaper</strong>.</p><p>Let me walk you through the full story.</p><h3>The First Sign of Trouble</h3><p>One afternoon, I got an alert:<br>One of the warehouses was not receiving return transfer messages since the 19th.</p><p>Okay, sounds simple. Maybe some network blip?</p><p>So I tried the usual stuff:</p><ul><li>Re-drive failed executions.</li><li>Increase the Lambda timeout.</li><li>Check the logs.</li></ul><p>None of them worked, and something deeper was going on.</p><h3>Digging Deeper</h3><p>I pulled down some of the failed files and ran them locally.</p><p><strong>That’s when I saw it:<br></strong> The failures occurred before any data was sent, during the socket connection phase (TLS handshake part).</p><p>Hmm. That’s not a normal application error. That smells like something inside the Lambda is choking.</p><h3>Understanding Lambda CPU Scaling (the hidden part)</h3><p>Here’s something that many developers — even experienced ones — don’t always realize about AWS Lambda:</p><p>When you increase the <strong>memory</strong> you allocate to a Lambda function, AWS also increases the amount of <strong>CPU power</strong> it gives you.</p><p><strong><em>Less memory? Less CPU.</em></strong><br><strong><em>More memory? More CPU.</em></strong></p><p>But here’s the catch — this isn’t obvious in the Lambda settings UI. There’s no explicit “CPU” slider.</p><p><a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html">It’s linked behind the scenes to how much memory you assign.</a></p><p>Most people think:<br>“<em>I just need 1 GB of memory to hold my data in RAM, so that should be enough.</em>”</p><p>But they forget that if your function does a lot of <strong>processing</strong>, <strong>async I/O</strong>, or <strong>network requests</strong>, CPU matters just as much, and memory allocation is how you buy more of it.</p><p>In our case, we were running this function at <strong>1 GB</strong>.</p><p>And that worked perfectly well… until it didn’t.</p><p><strong>Here’s the thing:</strong><br>We had been running this function with 1 GB of memory. Sounds small, but it had been enough — our code was solid.</p><p>Our Lambda was happily processing files over 20 MB with no problems.</p><p>But this time… the files that were failing were smaller — just 16 MB.</p><p><strong>Why?</strong></p><p>The problem was that they contained <strong>very large arrays of items to process</strong>.</p><p><strong>That means:</strong></p><ul><li>More memory allocations</li><li>More work for the Node.js event loop</li><li>More async calls triggered</li></ul><p>In short, the event loop was getting blocked.</p><p><strong>The result?</strong></p><ul><li>Async calls were stacking up.</li><li>Socket connections were delayed.</li><li>TLS handshakes started timing out.</li></ul><h3>The Lambda “Math” That Surprised Me</h3><blockquote>How can it be <strong>cheaper</strong>?</blockquote><blockquote><strong>More memory,</strong> <strong>less cost?</strong> Sounds crazy, right?</blockquote><p>This is where it gets really interesting.</p><p>We always hear this classic advice: <strong>Use less memory — it’s cheaper.</strong></p><p>But in reality? Not always.</p><p>Here’s what I measured:</p><pre>| Memory | Avg Execution Time | Cost per Execution |<br>| ------ | ------------------ | ------------------ |<br>| 1 GB   | 21 seconds         | X                  |<br>| 2 GB   | 18 seconds         | ~1.2X              |<br>| 4 GB   | 8 seconds          | ~0.5X              |</pre><p>At <strong>1 GB</strong>:</p><ul><li>CPU was too low.</li><li>Event loop was too slow.</li><li>Socket timeouts everywhere.</li></ul><p>At <strong>2 GB</strong>:</p><ul><li>Slight improvement.</li><li>Timeouts gone.</li><li>Still not super fast.</li></ul><p>At <strong>4 GB</strong>:</p><ul><li>The function absolutely flew.</li><li>No timeouts.</li><li>And here’s the punchline: <strong>it costs HALF as much</strong> as the 1 GB version.</li></ul><p>Yes — more RAM made it <strong>faster</strong> <em>and</em> <strong>cheaper</strong>.</p><p>Why?</p><p>Because AWS bills you in <strong>GB-seconds</strong>.</p><p>If your function runs <strong>3x faster</strong> at <strong>4 GB</strong>, you pay for <strong>fewer total execution seconds</strong> — even if the <strong>per-second rate is higher</strong>.</p><p>So the lesson?<br><strong>More RAM doesn’t just buy you performance — it can literally save you money.</strong></p><h3>What Was Really Happening</h3><p>Here’s the simple version:</p><ul><li>Our Lambda had enough memory for the data itself.</li><li>But it didn’t have enough CPU to keep up with async processing.</li><li>The event loop got blocked.</li><li>Socket connection attempts stalled.</li><li>Timeouts happened.</li></ul><p>It wasn’t a TLS bug.<br>It wasn’t a flaky network.<br>It was CPU starvation, plain and simple.</p><h3>The Fix</h3><p>Once I knew the root cause, the fix was simple:</p><ol><li>Increase memory from <strong>1 GB → 4 GB</strong>. Now the function had enough CPU to handle async I/O.</li><li>Redrive failed invocations</li></ol><p>After this, all failed files were processed successfully. No more socket timeouts.</p><p>And the cost was actually lower than before.</p><h3>Key Lessons I Learned</h3><ul><li>More memory can save money. Faster functions run cheaper in Lambda’s billing model.</li><li>In Lambda, memory also means CPU. If your function handles lots of I/O, don’t trust just the memory usage charts — you might need more memory simply to get enough CPU to keep up.</li><li>Socket timeouts aren’t always network problems. They can be symptoms of slow processing inside your app.</li></ul><h3>Final Thoughts</h3><p>This issue reminded me that serverless isn’t magic. It’s just compute, memory, and CPU — and you have to tune it for your workload.</p><p>In this case, adding more memory made our function:</p><ul><li>More stable</li><li>Much faster</li><li>Cheaper</li></ul><p>Sometimes the best optimization is not clever code — it’s giving your code enough room to breathe.</p><p>If you’ve hit similar Lambda scaling problems, I’d love to hear your story.<br>Feel free to drop a comment or message me.</p><p><a href="https://www.linkedin.com/in/berkaybindebir">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad8dc30fbbe6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built a Watermark Tool Using FFmpeg]]></title>
            <link>https://awstip.com/how-i-build-a-watermark-tool-using-ffmpeg-f588e4c4c1e5?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/f588e4c4c1e5</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[ffmpeg]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[lambda]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Thu, 28 Mar 2024 14:10:03 GMT</pubDate>
            <atom:updated>2025-09-11T15:54:41.282Z</atom:updated>
            <content:encoded><![CDATA[<h3>Solve Your Problem</h3><p>I needed to add a watermark to audio files for one of my projects a couple of months ago.</p><p>I’ve spent hours to find a tool to solve my problem. There are a lot of tools that allow you to add watermarks to images, videos, and PDFs but somehow there is no tool for audio files.</p><p>After coming up with the idea of &quot;Can I? Of course I can,&quot; I began building it.</p><h3>God Bless FFmpeg</h3><blockquote>Oh FFmpeg, my sweet FFmpeg</blockquote><p>If you do not know what is <a href="https://ffmpeg.org/">FFmpeg</a>, you should know.</p><p>It&#39;s like a superpower, I’ve never felt this much powerful. I mean if you are thinking “Can it do XXX?” yeah probably it can.</p><blockquote>Do you need to add subtitles to a video? You can. Do you need to extract audio from the video? You can. Do you need Gif from video? You can. And list goes on…</blockquote><p>So, I came up with “Can it mix two audios by given configuration?” Yes, it can.</p><h3>Proof of Concept</h3><p>I’ve installed FFmpeg and read the documentation and time to see if it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRXb_AotT5l-5suI8nz5Eg.png" /></figure><p>And above command, took 2 seconds then added a watermark to my audio. -Goosebumps-</p><p>After I’ve done my research on complex mixes and time to build it!</p><h3>Dynamic Watermarking in FFmpeg</h3><p>So dynamic watermarking is kinda like;<br>add <strong>T seconds</strong> offset after the audio started, then add a watermark for each <strong>N seconds</strong>.</p><p><strong>Splitting audio into different zones:</strong></p><p>I’ve decided to split the audio <strong>offset </strong>and split the audio by <strong>watermark interval</strong></p><blockquote>for example; offset: 30s and interval 10s.</blockquote><blockquote>I have 3:00 minutes audio, I only need 30 seconds later after started. So, I need to split 150 seconds (2.5 minutes) to 10 + watermark duration pieces.</blockquote><p>Then mix the watermark with that piece</p><p>So, how I’ve implemented that?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pegk2Qq3RgLUObJL7H7q9g.png" /><figcaption>Zone splitting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DN_4qocvs-PkRRU7lpkWgg.png" /><figcaption>Creating filters</figcaption></figure><h3>Serverless Solution</h3><blockquote>Time to build! My tech stack is on AWS so I can build it with AWS.</blockquote><p>I’ve tried to build a watermark processor as AWS lambda but it was kinda problematic due to lambda limitations on files and FFmpeg was kinda problematic due to streams.</p><p>So I’ve given up using lambda and changed my solution to use AWS Fargate.</p><blockquote>AWS Fargate is more flexible than Lambda when it comes to file processing and much cheaper.</blockquote><p>So, I’ve created a s3 bucket and added a lambda event trigger. This lambda is responsible for triggering the AWS Fargate task when a file is uploaded to the bucket.</p><p>I’ve summed up all the necessary information like file, watermark, and watermark configuration file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2N1Lgy5ZnrNgjKXG4Ui1oQ.png" /></figure><p>Then I created a docker image for my Fargate task to run my processor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*RbnKbu6LP9ltKiqAOyi3Gw.png" /><figcaption>My infra -roughly- like this</figcaption></figure><p>This solution solved my all problems. I’m able to add a watermark to an audio file. <em>-goosebumps again-</em></p><h3>Making It a Product</h3><p>I decided to make it a product so people can use it. I’ve quickly created a product by using the serverless solution all I need is to collect the watermark config, watermark, and audio files from the client.</p><p>But I’m not done yet...</p><blockquote>I’ve handled all fancy frontend stuff which I won’t explain in detail because I’m a backend developer and I know modern frontend <strong>just enough.</strong></blockquote><blockquote><strong>The tech stack was:</strong></blockquote><blockquote>Nextjs 14, MongoDB, Shadcn/ui, NextAuth and Stripe</blockquote><h3>Browser Solution</h3><p>The product was ready but I didn’t want to be concerned about <strong>privacy and security</strong> and started thinking that could be done in the browser.</p><p>Yes, thanks to <strong>WebAssembly</strong>!</p><p>I’ve found <a href="https://github.com/ffmpegwasm/ffmpeg.wasm">https://github.com/ffmpegwasm/ffmpeg.wasm</a> which means I can use FFmpeg in the browser without building my own FFmpeg wasm.</p><p>I’ve copied all watermark logic in the processor, and fixed issues related to browser limitations and some tweaks for performance concerns. I’ve summed up everything and It’s working perfectly!</p><p>Then I added a video watermark tool besides the audio watermark tool by using almost the same code in 15 minutes<em> -I was waiting for domain registrations-</em></p><p>And finally here is <a href="https://watermark.run/">https://watermark.run</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_hgIp9BwJNM1kc2rXEBU1Q.png" /><figcaption>https://watermark.run</figcaption></figure><h3>Conclusion</h3><p>It was a long post but I didn’t want to split parts and I want to share all the details about the problem, solution, and iterations I went through because that is how we develop stuff in our daily life.</p><p><em>-also, it was free to advertise and I suck at SEO-</em></p><p>Want to use <a href="https://www.watermark.run/">watermark.run</a> — Coupon Code: <strong>MONTHLY60</strong></p><p>Thanks for reading!</p><ul><li><a href="https://www.linkedin.com/in/berkaybindebir/">https://www.linkedin.com/in/berkaybindebir/</a></li><li><a href="https://github.com/berkaybindebir">https://github.com/berkaybindebir</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f588e4c4c1e5" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/how-i-build-a-watermark-tool-using-ffmpeg-f588e4c4c1e5">How I Built a Watermark Tool Using FFmpeg</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deep Dive Node JS]]></title>
            <link>https://awstip.com/deep-dive-node-js-762552ad31a8?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/762552ad31a8</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Tue, 22 Oct 2019 20:43:44 GMT</pubDate>
            <atom:updated>2025-09-11T15:54:56.270Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Have you ever considered about NODE JS?</em></p><p><em>Have you ever considered it deeply? what is the event loop? What does “As an asynchronous event-driven JavaScript runtime” or What is a “V8 engine”?</em></p><h3>Let&#39;s start with V8</h3><p>“V8 is a Javascript engine written in C++” so what does that mean? V8 is an open-source project of Google created for use in the Chrome browser. It’s basically a compiler. It compiles and executes Javascript code, handles call stack, handles memory allocation, handles garbage collecting, and provides all the data types, operators, objects, and functions that are used on Vanilla Javascript. But V8 cannot handle DOM because there is no browser. It’s fair.</p><p>V8 runs the JS code in a single thread and the engine takes everything in the same order in the JS code and runs in an event loop.</p><blockquote>Don&#39;t freak out, we will talk about the event loop</blockquote><p>Let’s take a look at the Node Js source code and see how V8 provides all the data types, operators, objects, and functions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/287/1*92KZ9bHGSm9aRe94zYSm6w.png" /></figure><p>If you opened the <a href="https://github.com/nodejs/node/blob/master/src/node_crypto.cc">crypto</a> lib in NodeJS source code you will see some code like this. That&#39;s how V8 joins the game.</p><h3>process.binding()</h3><p><em>The NodeJs without process.binding() is a just vanilla JS, All power of the Node JS is this function. This is an internal function that using on Node JS so you can’t use this function in your Node JS code</em></p><p><strong>But what is actually process.binding()?</strong></p><p>Basically, process.binding() is a bridge that connects the javascript code we wrote to low-level built-in Node JS libraries on the C++ side. So a lot of your code relies upon ultimately C++ code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*6o2Xj2WQT-bmqhm-TIn0ag.png" /></figure><h4>All the NodeJs is %30 Javascript %70 C++</h4><p><em>We have already talked about process.binding(), let’s talk about the role of the C++</em></p><p>C++ is a rabbit hole of the Node JS. You can access the file system or create an HTTP server or anything else with just a tiny JS code. Umm, So It’s not that simple actually. I wish were.</p><p>Once we required the fs module in our Node Js app, actually we are using this <a href="https://github.com/nodejs/node/blob/master/src/node_file.cc">fs library</a>, It’s complicated and huge...</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*GlooJQpY_AH5jKhNTrwqkg.png" /><figcaption>C++ side of the fs module</figcaption></figure><h3>Here comes the Rockstar, LibUV</h3><blockquote><em>“Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.”</em></blockquote><h4>“Event-driven, non-blocki — bla bla bla”. What that mean actually?</h4><p>It’s just a massive, flawless library called <a href="https://github.com/libuv/libuv">libuv</a> written for using in Node JS. As I said this library is huge, but we will keep focusing on some key points.</p><ul><li><em>Asynchronous file and file system operations</em></li><li><em>File system events</em></li><li><em>Asynchronous TCP and UDP sockets</em></li><li><em>Asynchronous DNS resolution</em></li><li><em>Thread pool</em></li><li><em>Signal handling</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*6g4uKhaabh0JBT3WqGIf_w.jpeg" /><figcaption>Libuv Architecture</figcaption></figure><p><strong>Before the explain libuv, I have to explain Event Loop first</strong></p><p>Once we’ve run “node index.js” for executing our Node JS code, Node creates a new process and executes our codes into an event loop, Each instance of Node has own event loop and each instance will run in a single thread in CPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*YkyXaNiIixCaRkkpjAywkQ.png" /></figure><p>As you can see above, Node makes come checks for exiting the event loop. Let’s keep it short, for exiting the event loop these should be done;</p><ul><li>Timers (setTimeout, setInterval)</li><li>Os Task (http, https)</li><li>Long Pending Operations (fs)</li></ul><p>If all pending tasks are done, event loops run all close callbacks and exit from the loop.</p><p><strong>After a little event loop brief, we can turn back to the libuv.</strong></p><p>As I said above, every node instance runs our code into an event loop in a single thread. It does not mean Node JS is single-threaded, The event loops run in a single thread but the low-level operations like reading a file or requesting an HTTP server work in another thread in the “<strong>Thread Pool</strong>” and this is handled by libuv.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*XoQihuNXgXaYs6z90_veUQ.jpeg" /><figcaption>Thread Pool NodeJS</figcaption></figure><blockquote>By default, libuv thread pool size is 4, so that’s mean only 4 operations run at the same time on Thread Pool.</blockquote><p>So to sum up briefly,</p><ul><li>It’s not magic, just C++ and also process.binding()</li><li>Every Node instances run our code into an event loop in a single thread but that does not mean Node is a single thread.</li><li>Event Loop won’t end till pending Timers (setTimeout, setInterval), Os Task (http, https), Long Pending Operations (fs) are done.</li><li>libuv handles Low-level operations like OS tasks or File System tasks on the thread pool and we are receiving a callback from completed tasks.</li><li>Async programming is just like ordering food. Once you order food you don&#39;t need to wait in front of the window, you can do your other task!</li></ul><p><em>I’ll drop my social stuff below if needed.</em></p><ul><li><a href="https://github.com/berkaybindebir">Github</a></li><li><a href="http://berkaybindebir@gmail.com/">Gmail</a></li><li><a href="https://www.linkedin.com/in/berkaybindebir/">Linkedin</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=762552ad31a8" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/deep-dive-node-js-762552ad31a8">Deep Dive Node JS</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kod Kalitenizi Arttıracak 12 Javascript Konsepti]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Javascript, komplike dildir. &#xC7;o&#x11F;u konseptin ilk ba&#x15F;ta anla&#x15F;&#x131;lmas&#x131; kar&#x131;&#x15F;&#x131;k ve zordur. E&#x11F;er bir Javascript geli&#x15F;tirici iseniz veya yeni&#x2026;</p><p class="medium-feed-link"><a href="https://berkaybindebir.medium.com/kod-kalitenizi-artt%C4%B1racak-12-javascript-konsepti-8e91007ce39d?source=rss-91652a8a4608------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://berkaybindebir.medium.com/kod-kalitenizi-artt%C4%B1racak-12-javascript-konsepti-8e91007ce39d?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e91007ce39d</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Tue, 09 Jul 2019 20:21:53 GMT</pubDate>
            <atom:updated>2024-07-24T19:03:14.411Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Javascript Promise Yapısı]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Javascript bir &#xE7;ok kafa kar&#x131;&#x15F;t&#x131;r&#x131;c&#x131; yap&#x131;ya sahip, bunlardan birisi Promise yap&#x131;s&#x131;d&#x131;r. &#x130;lk &#xF6;&#x11F;renmeye &#xE7;al&#x131;&#x15F;t&#x131;&#x11F;&#x131;n&#x131;zda biraz anlams&#x131;z ve &#x201C;Ya&#x2026;</p><p class="medium-feed-link"><a href="https://berkaybindebir.medium.com/javascript-promise-yap%C4%B1s%C4%B1-c7ee13505444?source=rss-91652a8a4608------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://berkaybindebir.medium.com/javascript-promise-yap%C4%B1s%C4%B1-c7ee13505444?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7ee13505444</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[promises]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Fri, 04 Jan 2019 23:10:53 GMT</pubDate>
            <atom:updated>2024-03-28T19:10:23.087Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Authentication Senaryosu ile React ve Redux]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://berkaybindebir.medium.com/authentication-senaryosu-ile-react-ve-redux-fa2868d23b75?source=rss-91652a8a4608------2"><img src="https://cdn-images-1.medium.com/max/1109/1*Qr1EqAjC6pJ0orNeHrsiwg.png" width="1109"></a></p><p class="medium-feed-snippet">&#x201C;Fullstack Web Developer&#x201D;, hepimiz duymu&#x15F;uzdur. Junior Developer olarak 2 sene &#xF6;nce Node.js ve Web Geli&#x15F;tirme ile tan&#x131;&#x15F;t&#x131;m, tan&#x131;&#x15F;t&#x131;ktan&#x2026;</p><p class="medium-feed-link"><a href="https://berkaybindebir.medium.com/authentication-senaryosu-ile-react-ve-redux-fa2868d23b75?source=rss-91652a8a4608------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://berkaybindebir.medium.com/authentication-senaryosu-ile-react-ve-redux-fa2868d23b75?source=rss-91652a8a4608------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa2868d23b75</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Berkay Bindebir]]></dc:creator>
            <pubDate>Mon, 10 Dec 2018 23:50:13 GMT</pubDate>
            <atom:updated>2024-03-28T16:09:18.147Z</atom:updated>
        </item>
    </channel>
</rss>