<?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 Nashathnadhiya on Medium]]></title>
        <description><![CDATA[Stories by Nashathnadhiya on Medium]]></description>
        <link>https://medium.com/@nashathnadhiya?source=rss-77a59c27df7b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EXG_93hMyljB39B3</url>
            <title>Stories by Nashathnadhiya on Medium</title>
            <link>https://medium.com/@nashathnadhiya?source=rss-77a59c27df7b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 10:20:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nashathnadhiya/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[What My WSO2 Internship Taught Me Beyond Coding]]></title>
            <link>https://medium.com/@nashathnadhiya/what-my-wso2-internship-taught-me-beyond-coding-bb6f2234a3ba?source=rss-77a59c27df7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb6f2234a3ba</guid>
            <category><![CDATA[ballerina]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[wso2]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Nashathnadhiya]]></dc:creator>
            <pubDate>Sat, 02 May 2026 08:27:33 GMT</pubDate>
            <atom:updated>2026-05-02T08:31:19.540Z</atom:updated>
            <content:encoded><![CDATA[<p>Starting an internship is always a mix of excitement and uncertainty. But in an era where getting into tech has become competitive, getting the opportunity to intern at <strong>WSO2 </strong>felt meaningful to me. At a time when many students and fresh graduates are struggling to find their place in the industry, this opportunity was not something I took lightly. When I began my journey at WSO2, I expected to learn a few tools and gain some industry exposure. What I didn’t expect was how transformative the experience would be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*29PPnfzk7c-fAOZV4-1jdA.jpeg" /></figure><p><strong>What I Worked On</strong></p><p>Before starting my internship, I honestly expected to be part of the team and help with small, routine tasks. You know, the typical intern stereotype. Maybe assisting here and there, fixing tiny bugs, or doing what movies show interns doing: getting coffee for seniors. Just kidding… mostly.</p><p>But what I did <strong>not</strong> expect was to be assigned a project in a domain I barely knew at the beginning.</p><p>My project was related to the <strong>Ballerina AsyncAPI Tool</strong>, which is basically a code generation tool. In simple terms, you give the tool an AsyncAPI specification, and it generates the required Ballerina source code including listeners, service skeletons, and client skeletons, so developers do not have to write the boilerplate from scratch.</p><p>The task assigned to me was not just a small improvement or a minor bug fix. Key tasks involved:</p><ul><li>Redesigning the architecture to support the existing HTTP Webhook and WebSocket flows in a cleaner way, while making it easier to plug in new protocols in the future.</li><li>Introducing <strong>AsyncAPI 3.0.0</strong> new major version support, which came with major structural and breaking changes</li><li>Adding a new feature to generate <strong>webhook signature verification code</strong> using the tool</li></ul><p>For someone who had only a limited understanding of AsyncAPI specifications at the start, this felt challenging and honestly, a little intimidating.</p><p>But this is where the real learning started.</p><p>My mentors did not simply give me answers. Instead, they guided me on <strong>how to approach the problem</strong>. They helped me understand the domain, break down the task, read through the existing codebase, identify design limitations, and think about how the tool could evolve in the future.</p><p>That experience taught me something very important:</p><blockquote><em>In the tech industry, survival is not about knowing everything from day one. It is about knowing how to learn.</em></blockquote><p>Let me point out a few tips that came from my mentors that might be the holy grail of surviving in tech.</p><h3><strong>Clean Code is Not Optional</strong></h3><p>Writing code that works is one thing. Writing code that others can read, maintain, debug, and extend is another.</p><p>On my very first day, I was asked to read <em>Clean Code</em> by Robert C. Martin and learn some key principles from it.</p><p>It changed the way I looked at code. I started paying more attention to naming, function length, readability, structure, and whether another developer could understand my logic without needing a full explanation from me. For anyone who wants to improve the way they write code, my advice is simple: <strong>read <em>Clean Code</em>.</strong></p><h3><strong>Design Patterns Matter</strong></h3><p>Concepts like the <strong>Adapter Pattern</strong>, <strong>Builder Pattern</strong>, <strong>Factory Pattern </strong>and other design patterns are things we usually learn in software engineering modules. At university, they feel like concepts that exist only for exams, assignments, or diagrams. But during my internship, I saw how these patterns are actually used in real production systems to make code more flexible, maintainable, and scalable.</p><p>I also saw how my mentors relied on these patterns when making important architectural decisions.</p><h3><strong>Communication is Key</strong></h3><p>Sometimes, you will not know things and that is okay.</p><p>There were moments where I got stuck, especially because I was working in a domain that was new to me. What helped me move forward was learning to communicate blockers early instead of silently struggling for too long.</p><p>I also learned the value of asking for feedback from seniors and mentors. Their feedback helped me see problems from different angles, improve my approach, and write better code. Progress happens faster when people share context, ask questions, discuss blockers, and learn from each other.</p><h3><strong>Document Your Learnings</strong></h3><p>Documenting can feel like a tiring task, especially when you are already trying to understand something new. But one thing I learned is this: <strong>do not document only for others, document for yourself too.</strong></p><p>When you are learning something for the first time, there is a high chance it will not fully stick in your head immediately. You might understand it in the moment, but when you come back to it days or weeks later, it can feel unfamiliar again.</p><p>That is where documentation helps.</p><p>Writing down what you learned, the steps you followed, the errors you faced, and how you solved them saves your future self a lot of confusion. Instead of staring at the code blankly and trying to rebuild the context from scratch, you have your own notes to guide you back.</p><p>This internship was more than just a line on my CV. It was a journey filled with growth and challenges. It helped me understand what real-world software engineering looks like. Not just writing code, but designing a maintainable system, communicating and continuously learning.</p><p>Now, I am back at university to complete my final year. If things work out, I would love to go back to start my career there!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb6f2234a3ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Webhook Listeners Got Faster with Ballerina’s AsyncAPI Tool]]></title>
            <link>https://medium.com/@nashathnadhiya/building-webhook-listeners-got-faster-with-ballerinas-asyncapi-tool-475a81bb874c?source=rss-77a59c27df7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/475a81bb874c</guid>
            <dc:creator><![CDATA[Nashathnadhiya]]></dc:creator>
            <pubDate>Thu, 30 Apr 2026 02:02:17 GMT</pubDate>
            <atom:updated>2026-04-30T02:02:17.484Z</atom:updated>
            <content:encoded><![CDATA[<p>Webhook listeners are one of those things that <em>feel</em> simple until you actually build one. You need an HTTP endpoint, request parsing, event type detection, routing logic, signature verification, and type-safe handlers. All of this boiler plate before you write a single line of actual business logic is boring.</p><p>Ballerina’s AsyncAPI tool cuts through all of that. Give it an AsyncAPI contract describing your webhook events, and it generates a fully structured listener in seconds. You walk away with clean, typed Ballerina code and nothing left to wire up manually.</p><p>Let’s walk through it using GitHub webhooks as a real example.</p><p>When GitHub fires a webhook, it sends an HTTP POST to your endpoint with:</p><ul><li>An X-GitHub-Event header identifying the event category (e.g., push, pull_request)</li><li>An action field in the JSON body identifying the specific action (e.g., opened, closed)</li><li>A signature in X-Hub-Signature-256 to verify the payload came from GitHub</li></ul><p>Handling even three or four event types means writing a non-trivial amount of routing and validation code. Scale that to a real integration covering pushes, pull requests, issues, deployments, and workflow runs..yeah it’s tiring to write bunch of repetitive codes when all you need is a shortcut. Throwing in a little fun fact: GitHub has 75+ events, each with multiple actions..and you’re looking at a lot of repetitive plumbing before you get to the interesting parts.</p><p><strong>The AsyncAPI-First Approach</strong></p><p>Instead of coding the listener from scratch, you describe your webhook events in an AsyncAPI contract and let the tool generate the skeleton. Let’s use the GitHub star event as a focused example.</p><pre>asyncapi: 3.0.0<br><br>info:<br>  title: GitHub Webhooks API<br>  version: 1.0.0<br><br>x-ballerina-event-identifier:<br>  type: &quot;composite&quot;<br>  name: &quot;X-GitHub-Event&quot;<br>  path: &quot;action&quot;<br><br>x-ballerina-auth:<br>  header: &quot;X-Hub-Signature-256&quot;<br><br>channels:<br>  star:<br>    address: /<br>    description: |<br>      Fired when a repository is starred or unstarred.<br>      Actions: created, deleted.<br>    messages:<br>      starCreated:<br>        $ref: &#39;#/components/messages/StarCreatedMessage&#39;<br>      starDeleted:<br>        $ref: &#39;#/components/messages/StarDeletedMessage&#39;<br>    bindings:<br>      http:<br>        method: POST<br><br>components:<br>  messages:<br>    StarCreatedMessage:<br>      name: star<br>      title: Star Created<br>      summary: A repository was starred<br>      x-ballerina-event-type: &quot;star_created&quot;<br>      payload:<br>        $ref: &#39;#/components/schemas/StarPayload&#39;<br><br>    StarDeletedMessage:<br>      name: star<br>      title: Star Deleted<br>      summary: A repository was unstarred<br>      x-ballerina-event-type: &quot;star_deleted&quot;<br>      payload:<br>        $ref: &#39;#/components/schemas/StarPayload&#39;<br><br>  schemas:<br>    StarPayload:<br>      type: object<br>      required:<br>        - action<br>        - starred_at<br>      properties:<br>        action:<br>          type: string<br>          enum:<br>            - created<br>            - deleted<br>        starred_at:<br>          type: string<br>          format: date-time<br>          nullable: true<br>          description: Time the star was created. Null for the deleted action.<br>        sender:<br>          $ref: &#39;#/components/schemas/User&#39;<br>        repository:<br>          $ref: &#39;#/components/schemas/Repository&#39;<br>        organization:<br>          $ref: &#39;#/components/schemas/Organization&#39;<br>        installation:<br>          $ref: &#39;#/components/schemas/Installation&#39;<br>        enterprise:<br>          $ref: &#39;#/components/schemas/Enterprise&#39;<br><br>    User:<br>      type: object<br>      required:<br>        - login<br>        - id<br>      properties:<br>        login:<br>          type: string<br>        id:<br>          type: integer<br>        node_id:<br>          type: string<br>        avatar_url:<br>          type: string<br>          format: uri<br>        gravatar_id:<br>          type: string<br>          nullable: true<br>        html_url:<br>          type: string<br>          format: uri<br>        type:<br>          type: string<br>          enum:<br>            - User<br>            - Bot<br>            - Organization<br>        site_admin:<br>          type: boolean<br><br>    Repository:<br>      type: object<br>      required:<br>        - id<br>        - name<br>        - full_name<br>        - owner<br>        - private<br>      properties:<br>        id:<br>          type: integer<br>        name:<br>          type: string<br>        full_name:<br>          type: string<br>        owner:<br>          $ref: &#39;#/components/schemas/User&#39;<br>        private:<br>          type: boolean<br>        html_url:<br>          type: string<br>          format: uri<br>        description:<br>          type: string<br>          nullable: true<br>        language:<br>          type: string<br>          nullable: true<br>        stargazers_count:<br>          type: integer<br>        forks_count:<br>          type: integer<br>        default_branch:<br>          type: string<br>        visibility:<br>          type: string<br>          enum:<br>            - public<br>            - private<br>            - internal<br>        created_at:<br>          type: string<br>          format: date-time<br>        updated_at:<br>          type: string<br>          format: date-time<br>        license:<br>          type: object<br>          nullable: true<br>          properties:<br>            key:<br>              type: string<br>            name:<br>              type: string<br>            spdx_id:<br>              type: string<br><br>    Organization:<br>      type: object<br>      properties:<br>        login:<br>          type: string<br>        id:<br>          type: integer<br>        avatar_url:<br>          type: string<br>          format: uri<br>        description:<br>          type: string<br>          nullable: true<br><br>    Installation:<br>      type: object<br>      properties:<br>        id:<br>          type: integer<br>        node_id:<br>          type: string<br><br>    Enterprise:<br>      type: object<br>      properties:<br>        id:<br>          type: integer<br>        slug:<br>          type: string<br>        name:<br>          type: string<br>        avatar_url:<br>          type: string<br>          format: uri<br>        html_url:<br>          type: string<br>          format: uri<br>        created_at:<br>          type: string<br>          format: date-time<br>        updated_at:<br>          type: string<br>          format: date-time</pre><p>A few things worth noting at the top of this spec:</p><p><strong>x-ballerina-event-identifier</strong> tells the listener how to identify incoming events. GitHub uses a composite approach : the event category comes from the X-GitHub-Event HTTP header, and the specific action comes from the action field in the request body. One line in the spec, and the tool handles all the routing logic for you.</p><p><strong>x-ballerina-event-type</strong> on each message (&quot;star_created&quot;, &quot;star_deleted&quot;) is how the tool knows which handler to route each action to.</p><p><strong>x-ballerina-auth</strong> enables webhook signature verification using the X-Hub-Signature-256 header that GitHub sends with every payload.</p><p>With the contract ready, run:</p><pre>$ bal asyncapi http -i github_webhooks.yaml</pre><p>What’s left for you is just to create the config.toml, define your webhookSecret:</p><pre>webhookSecret=&quot;secret123&quot;</pre><p>and write a small application for testing it out:</p><pre>import ballerina/log;<br><br>configurable string webhookSecret = ?;<br><br>listener Listener githubListener = check new (webhookSecret = webhookSecret);<br><br>service StarService on githubListener {<br>    remote function onStarCreated(StarPayload event) {<br>        //implement your logic here<br>    }<br><br>    remote function onStarDeleted(StarPayload event) {<br>        <br>    }<br>}</pre><p>For large webhook APIs with many event types like GitHub’s full surface the time savings are significant. But even for a focused single-event integration like this one, starting from a generated skeleton rather than a blank file is just a better way to work.</p><p>Webhook listeners shouldn’t require this much needless effort. With the AsyncAPI tool, they don’t.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=475a81bb874c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If You’re Not Using AsyncAPI, You’re Building Your Event Driven Architecture Wrong]]></title>
            <link>https://medium.com/@nashathnadhiya/if-youre-not-using-asyncapi-you-re-building-your-event-driven-architecture-wrong-2a7f6e2d44a6?source=rss-77a59c27df7b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a7f6e2d44a6</guid>
            <dc:creator><![CDATA[Nashathnadhiya]]></dc:creator>
            <pubDate>Sat, 18 Apr 2026 10:43:47 GMT</pubDate>
            <atom:updated>2026-04-29T04:39:11.262Z</atom:updated>
            <content:encoded><![CDATA[<p>Every team knows how to document a REST API. You write an OpenAPI spec and your endpoints are self-describingcand understood across teams.</p><p>But what about your Kafka topics? Your RabbitMQ queues? Your WebSocket streams?</p><p>This is where AsyncAPI steps in. It is an open source specification for describing asynchronous, event driven APIs. Think of it as OpenAPI but for message based communication. It supports a wide range of protocols and brokers including Apache Kafka, RabbitMQ (AMQP), MQTT, WebSockets, AWS SNS/SQS, Google Cloud Pub/Sub, NATS, Solace, and more.</p><p>An AsyncAPI document answers three questions about the application:<br><strong>Who are you? </strong>Application identity<strong><br>Where do you connect? </strong>Servers, brokers, and connection details<br><strong>What do you exchange? </strong>Channels, operations, and message schemas</p><p><strong>Why AsyncAPI Is Necessary in Event Integration ?</strong></p><p>In REST APIs, the communication is clear . But in event-driven systems, a producer publishes a message and walks away. It doesn’t look back. The consumer processes it asynchronously.</p><p>Without proper documentation, this invisibility becomes technical debt. When something breaks, nobody knows what schema version the producer was using, what casing the consumer expects, or what happens when a null field arrives.</p><p>AsyncAPI makes these visible and clear. It also lets you version your message contracts independently of your services, enforce schema validation at the broker or gateway level, generate type safe clients and stubs in multiple languages, spin up mock servers so consumers can develop without a real broker, and more.</p><p><strong>Now Let’s See How to Write a Great AsyncAPI 3.0 Spec</strong></p><ol><li><strong>Write a Descriptive </strong><strong>info section</strong></li></ol><p>Don&#39;t just fill in a title. Include a meaningful description, docs link, a contact to help people get the gist of the system.</p><p><strong>2. Write Message Definitions with Full Metadata and Examples</strong></p><p>Don’t just include the schema pointer only and call it a day. A message definition should be more than a schema pointer. Include name, title, summary, contentType and critically one concrete example. This makes it possible for a new engineer to understand in five minutes. This is also useful for mock server generation.</p><pre>components:<br>  messages:<br>    OrderCreated:<br>      name: OrderCreated<br>      title: Order Created<br>      summary: A new order has been placed by a customer<br>      contentType: application/json<br>      headers:<br>        $ref: &#39;#/components/schemas/EventHeaders&#39;<br>      payload:<br>        $ref: &#39;#/components/schemas/OrderCreatedPayload&#39;<br>      examples:<br>        - name: StandardOrder<br>          summary: A typical domestic order<br>          headers:<br>            eventId: evt_01HK2V3XYZABC123<br>            eventType: OrderCreated<br>            eventVersion: &quot;2.1&quot;<br>            correlationId: trace_01HK2VABCDEF456<br>            producedAt: &quot;2026-01-15T10:30:00Z&quot;<br>            source: order-service<br>          payload:<br>            orderId: ord_01HK2V3XYZABC123<br>            customerId: cust_7f3a9b2c<br>            status: CREATED<br>            currency: USD<br>            totalAmount: 149.99<br>            lineItems:<br>              - productId: prod_abc123<br>                sku: WIDGET-BLUE-L<br>                quantity: 2<br>                unitPrice: 74.995<br>            shippingAddress:<br>              line1: 123 Main Street<br>              city: Austin<br>              state: TX<br>              postalCode: &quot;78701&quot;<br>              country: US<br>            createdAt: &quot;2026-01-15T10:30:00Z&quot;</pre><p><strong>3. Name Your Channels Consistently and Use Parameters for Environments</strong></p><p>A channel address should be readable at a glance. A consistent pattern like {domain}.{environment}.{entity} makes it clear what a channel is for.</p><p>The idea here is to use <strong>parameters</strong> for the parts that vary by environment. Instead of hardcoding the production, you can define the variable once and reference it. The same spec then describes all environments cleanly.</p><pre>channels:<br>  orderEvents:<br>    address: orders.{environment}.events<br>    description: Carries all order state change events.<br>    parameters:<br>      environment:<br>        $ref: &#39;#/components/parameters/environment&#39;<br>    messages:<br>      orderCreated:<br>        $ref: &#39;#/components/messages/OrderCreated&#39;<br>      orderCancelled:<br>        $ref: &#39;#/components/messages/OrderCancelled&#39;<br><br>components:<br>  parameters:<br>    environment:<br>      description: The deployment environment<br>      enum:<br>        - production<br>        - staging<br>        - development</pre><p><strong>4. Separate </strong><strong>send and </strong><strong>receive Operations</strong></p><p>AsyncAPI 3.0 introduced a cleaner separation between channel definitions and operations. Use it. Mixing up these is a common mistake that make it unclear whether your application is a producer, the consumer, or both.</p><p>This matters practically when generating code using your spec. Generators use action: send vs action: receive to determine whether to generate a publisher or a subscriber . Getting this wrong the code with opposite of what you intended.</p><pre>operations:<br>  publishOrderCreated:<br>    action: send<br>    channel:<br>      $ref: &#39;#/channels/orderEvents&#39;<br>    messages:<br>      - $ref: &#39;#/channels/orderEvents/messages/orderCreated&#39;<br><br>  consumeOrderCreated:<br>    action: receive<br>    channel:<br>      $ref: &#39;#/channels/orderEvents&#39;<br>    messages:<br>      - $ref: &#39;#/channels/orderEvents/messages/orderCreated&#39;</pre><p><strong>5. Document All Your Servers Including the Non-Production Ones</strong></p><p>Every environment your app connects to should be in the spec. Use a clear description on each server so the purpose is obvious at a glance.</p><p><strong>6. Reuse with </strong><strong>$ref</strong></p><p>If you find yourself copying a schema definition between messages, you’re creating a maintenance problem. Shared structures belong in components/schemas and then reference it everywhere they&#39;re needed. For multi team organisations, you can extract shared schemas into a separate common-schemas file and reference it externally too.</p><pre># Instead of repeating this in every payload...<br>components:<br>  schemas:<br>    Address:<br>      type: object<br>      required:<br>        - line1<br>        - city<br>        - country<br>      properties:<br>        line1:<br>          type: string<br>        line2:<br>          type: string<br>          nullable: true<br>        city:<br>          type: string<br>        postalCode:<br>          type: string<br>          nullable: true<br>        country:<br>          type: string<br>          description: ISO 3166-1 alpha-2 country code<br><br><br># ...reference it anywhere it&#39;s needed<br>    OrderCreatedPayload:<br>      properties:<br>        shippingAddress:<br>          $ref: &#39;#/components/schemas/Address&#39;</pre><p>AsyncAPI is the contract for your event-driven architecture. When used correctly, it eliminates ambiguity between producer and consumer teams and enables automated code generation and mock testing.</p><p>So make sure to define the contract first, generate the skeleton, build the implementation. Spec-first development for events is as transformative as it has been for REST APIs.</p><p><strong>References</strong></p><p><a href="https://www.asyncapi.com/en">https://www.asyncapi.com/en</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a7f6e2d44a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>