<?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[Tech Enthusiasts - Medium]]></title>
        <description><![CDATA[Welcome to Tech Enthusiasts — we are the heartbeat of a thriving community. Our publications bring together professionals, enthusiasts, and innovators from around the globe, fostering a dynamic platform for sharing knowledge, experiences and ideas. - Medium]]></description>
        <link>https://medium.com/tech-enthusiasts?source=rss----967883e27f4a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Tech Enthusiasts - Medium</title>
            <link>https://medium.com/tech-enthusiasts?source=rss----967883e27f4a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 21:52:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/tech-enthusiasts" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Getting Started with Error Handling in Camunda 8 Workflows]]></title>
            <link>https://medium.com/tech-enthusiasts/getting-started-with-error-handling-in-camunda-8-workflows-aa1f06ddf6c6?source=rss----967883e27f4a---4</link>
            <guid isPermaLink="false">https://medium.com/p/aa1f06ddf6c6</guid>
            <category><![CDATA[bpmn2]]></category>
            <category><![CDATA[bpmn]]></category>
            <category><![CDATA[workflow]]></category>
            <category><![CDATA[camunda]]></category>
            <category><![CDATA[camunda8]]></category>
            <dc:creator><![CDATA[Shashir]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 22:05:57 GMT</pubDate>
            <atom:updated>2025-08-29T22:59:45.354Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will explore the importance of Incidents, errors, and error handling in Camunda, covering how to handle technical and business exceptions, and how <strong>Operate</strong> (<strong>Cockpit</strong> in Camunda 7) comes to the rescue to monitor process workflows, re-trigger incidents, and verify errors.</p><p>We will also explore various methods for implementing retry mechanisms for process instances when errors occur, including unblocking process instances stuck due to incidents, through Operate, BPMN, and programmatically. This will provide a detailed understanding of error-handling mechanisms and best practices for effective implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o_gtAp-M1-fXBIp4" /><figcaption>Photo by <a href="https://unsplash.com/@cookiethepom?utm_source=medium&amp;utm_medium=referral">Cookie the Pom</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Exceptions are an inevitable part of daily coding lives. However, it’s essential to know how to handle them effectively to ensure a seamless and uninterrupted flow. In this article, we’ll deep dive into some best practices for exception handling, exploring strategies to mitigate errors and maintain a graceful continuation.</p><blockquote><strong>What are Incidents and Jobworker in Camunda 8?</strong></blockquote><p>An incident in Camunda occurs when a process instance is blocked due to a problem (error) at a specific task/gateway/event. By default, Camunda automatically retries failed jobs three times and results in an Incident once the retry count is exhausted. We need to resolve the incident manually from the <strong>Operate</strong> (Camunda 8) or <strong>Cockpit</strong> (Camunda 7) to unblock the process instance. However, error handling in Camunda 7 is outside the scope of this article.</p><p>Incidents are represented by process instances stuck at a particular component (task, gateway, event, etc.) in RED colour.</p><blockquote><strong><em>Job workers </em></strong>:</blockquote><p>In simple terms, Job workers (similar to external task handlers in Camunda 7) are external services responsible for performing a specific task as per the assigned job type in the BPMN process.</p><p>Zeebe creates the Job of the specified type for the service task. In parallel, Job workers keep polling the topic at specific intervals as configured for the job type and process the request.</p><blockquote><strong><em>How do we deal with errors in Camunda workflows?</em></strong></blockquote><p>BPMN uses error events to manage errors that arise during the execution of a specific activity or at a particular stage in the process flow. Error Events can be configured as catch/throw events as below, applicable for both Camunda 7 and 8.</p><ol><li><strong><em>Error Start event</em></strong><em> </em>— this acts as a catching type &amp; can be done only with event subprocesses.</li><li><strong><em>Error Boundary event</em> — </strong>another<strong> </strong>catching type, which is an intermediate boundary event.</li><li><strong><em>Error End event</em></strong><em> </em>— This is a throwing type, which acts as an end event.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*6i7y7JRzy7M5OOvrItOYbg.png" /><figcaption>Error events configured on BPMN</figcaption></figure><p><strong>Note</strong>: The error boundary event acts as an intermediate event on top of user tasks, service tasks, sub-processes, call activities, send/receive tasks, and business rule tasks (DMNs).</p><p>Camunda, by default, will not handle any exceptions/errors unless we provide details on how to react to specific errors.</p><p>What does that mean in real-time?</p><p>As we know, there are numerous challenges and scenarios to expect while writing code. We need to differentiate between two categories of expected exceptions: Business exceptions and Technical exceptions.</p><p>E.g., Business exceptions — when we are trying to debit funds from the account (<strong>OR</strong>) we are placing an order for an item that has gone out of stock (<strong>OR</strong>) a User has tried to perform an unauthorised action (<strong>OR</strong>) Mandatory request data is missing to complete the functional flow.</p><p>E.g., Technical exceptions — Application outage (i.e., Application/Database server is down), network glitch, or dependent third-party service not available.</p><p>Let’s get into more details on how to configure error events with an example.</p><blockquote><strong>Use-case: Order Management – Card Payments</strong></blockquote><p>This is a simplified version of Payment closure for the orders use case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YRSNFlEkgacSqm8n-iL2ng.png" /><figcaption>Order Management — Payment Process</figcaption></figure><blockquote>W<strong>orkflow in simple terms:</strong></blockquote><p>The payment process begins when we receive the order and triggers a job worker to initiate payment using the provided credit card details. In case of invalid credit card details, like ‘expired card’, we will catch an error with the help of an “<strong>intermediate error boundary event</strong>” and request the user to update valid credit card details and re-attempt the payment operation.</p><p>Once the payment is successful, we have a gateway to verify “receipt generation”. If it evaluates to ‘<strong>Failed</strong>’, then we utilise “<strong>Error end event</strong>”, which is a throw event to invoke “<strong>error event subprocess</strong>”.</p><p>In a positive case, i.e., the receipt will be generated using another job worker and sent to the customer to complete the business flow.</p><blockquote><strong>Pre-requisites</strong>: Camunda 8 environment setup:</blockquote><p>- Self-managed — C8Run (<strong>or</strong>) Docker Compose <br>- SAAS environment</p><p><strong><em>Note</em></strong><em>: Camunda 8 setup — links provided under the reference section.</em></p><p>In this demo, I am running Camunda 8 on Docker Compose. Let’s verify the Docker containers for Camunda 8 are up and running:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0y7j3o_u0s_OWMNbEtglg.png" /></figure><p>Running Camunda 8 components can be accessed with the username “<strong>demo</strong>” and password “<strong>demo</strong>”.</p><ul><li><strong>Operate</strong>: <a href="http://localhost:8081/">http://localhost:8081</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i8u5x3WiqGdRrLw6qMtDoA.png" /></figure><ul><li><strong>Tasklist</strong>: <a href="http://localhost:8082/">http://localhost:8082</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*flmbkvs3kThFvSg5SXd58g.png" /></figure><ul><li><strong>Zeebe</strong>: <a href="http://localhost:26500/">http://localhost:26500</a></li></ul><p>We will be using Spring Boot, Maven and Camunda SDK with Camunda repository in this example.</p><p><em>Dependency</em></p><pre>&lt;dependency&gt;<br>    &lt;groupId&gt;io.camunda&lt;/groupId&gt;<br>    &lt;artifactId&gt;spring-boot-starter-camunda-sdk&lt;/artifactId&gt;<br>    &lt;version&gt;8.6.0&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p><em>Repository:</em></p><pre>&lt;repository&gt;<br>    &lt;releases&gt;<br>        &lt;enabled&gt;true&lt;/enabled&gt;<br>    &lt;/releases&gt;<br>    &lt;snapshots&gt;<br>        &lt;enabled&gt;false&lt;/enabled&gt;<br>    &lt;/snapshots&gt;<br>    &lt;id&gt;identity&lt;/id&gt;<br>    &lt;name&gt;Camunda Identity&lt;/name&gt;<br>    &lt;url&gt;https://artifacts.camunda.com/artifactory/camunda-identity/&lt;/url&gt;<br>&lt;/repository&gt;</pre><p><strong><em>Application.yaml</em></strong></p><p>We need to configure the Camunda configuration in YAML or a properties file.</p><pre>camunda:<br>  client:<br>    mode: self-managed<br>    zeebe:<br>      enabled: true<br>      grpc-address: http://localhost:26500<br>      rest-address: http://localhost:8080</pre><p>Let’s create a Camunda Job worker (same as external tasks in Camunda 7) as below.</p><p><strong><em>CreaditCardJobWorker</em></strong></p><p>The job worker type should match the Job type under “Task definition” configuration in BPMN. Setting retries in BPMN is optional, depending on the use case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXOy03WIBM55_l2mI9JJEQ.png" /></figure><p>We use the @Jobworker annotation to configure the job type (to match BPMN) in the code.</p><pre>@Component<br>public class CreditCardJobWorker {<br><br>    private static final Logger log = LoggerFactory.getLogger(CreditCardJobWorker.class);<br><br>    CreditCardServiceHandler creditCardServiceHandler;<br><br>    @Autowired<br>    public CreditCardJobWorker() {<br>        creditCardServiceHandler = new CreditCardServiceHandler();<br>    }<br><br>    @JobWorker(<br>            type = &quot;credit-card-payment&quot;,<br>            autoComplete = false<br>    )<br>    public void creditCardPayment(final JobClient jobClient, final ActivatedJob activatedJob) {<br>        log.info(&quot;CreditCardJobWorker - Request data received: {}&quot;, activatedJob.getVariablesAsMap());<br>        creditCardServiceHandler.handle(jobClient, activatedJob);<br>        log.info(&quot;CreditCardJobWorker - Credit Card Payment with details {} - COMPLETED&quot;, activatedJob.getKey());<br>    }<br>}</pre><p><strong><em>CreditCardServiceHandler</em></strong></p><p>Let’s understand the handler. We have a sample code to enable an exception scenario by throwing a custom (user-created) exception when the condition is met.</p><ul><li>CreditCardServiceException – Just consider this exception will be triggered when the balance is divisible by 5.</li><li>InvalidCreditCardException – simple validations on the provided card details</li></ul><pre>@Service<br>public class CreditCardServiceHandler implements JobHandler {<br><br>    private static final Logger log = LoggerFactory.getLogger(CreditCardServiceHandler.class);<br><br>    @Override<br>    public void handle(JobClient jobClient, ActivatedJob activatedJob) {<br><br>        Map&lt;String, Object&gt; variablesAsMap = activatedJob.getVariablesAsMap();<br>        log.info(&quot;CreditCardServiceHandler - Credit Card Payment with details {} - Started!!!&quot;, variablesAsMap);<br><br>        String creditCardNumber = String.valueOf(variablesAsMap.get(&quot;creditCardNumber&quot;));<br>        String creditCardname = String.valueOf(variablesAsMap.get(&quot;creditCardName&quot;));<br>        String creditCardExpiry = String.valueOf(variablesAsMap.get(&quot;creditCardExpiry&quot;));<br>        String cvvCode = String.valueOf(variablesAsMap.get(&quot;cvvCode&quot;));<br><br>        int balance = calculateCreditBalance();<br>        try {<br>            if (StringUtils.isNotBlank(creditCardExpiry) &amp;&amp; StringUtils.isNotBlank(creditCardNumber) &amp;&amp; StringUtils.isNotBlank(cvvCode)) {<br>                int expiryYear = Integer.parseInt(creditCardExpiry.substring(3, 7));<br>                if (expiryYear &lt; LocalDate.now().getYear() || creditCardNumber.length() &lt; 14 || cvvCode.length() != 3) {<br>                    throw new InvalidCreditCardException(&quot;Invalid CC details provided!!!&quot;);<br>                }<br>            }<br>            if (balance % 5 == 0) {<br>                throw new CreditCardServiceException(&quot;Ineligible Credit Balance!!!&quot;);<br>            }<br>        } catch (CreditCardServiceException creditCardServiceException) {<br>            ...<br>            ...<br>            log.info(&quot;CreditCardServiceException - Credit Card Payment with details - FAILED!!!&quot;);<br>        } catch (InvalidCreditCardException invalidCreditCardException) {<br>            ...<br>            ...<br>            log.info(&quot;InvalidCreditCardException - Credit Card Payment with details - FAILED!!!&quot;);<br>        }<br><br>        Map&lt;String, Object&gt; responseVaraibles = new HashMap&lt;&gt;();<br>        ...<br>        ...<br>        jobClient.newCompleteCommand(activatedJob.getKey()).variables(responseVaraibles).send().join();<br>        log.info(&quot;CreditCardServiceHandler - Credit Card Payment {} - Completed!!!&quot;, responseVaraibles);<br>    }<br><br>    private int calculateCreditBalance() {<br>        return new Random().nextInt(1000, 9999);<br>    }<br>}</pre><p>Camunda provides various built-in methods to handle failures and errors. Let’s understand catch blocks using the built-in fail or throw-error command methods.</p><h4><em>Fail Command — with Retries</em></h4><pre>jobClient.newFailCommand(activatedJob.getKey())<br>        .retries(remainingRetries - 1)<br>        .errorMessage(creditCardServiceException.getMessage())<br>        .retryBackoff(Duration.ofSeconds(13))<br>        .variables(Map.of(&quot;Payment&quot;, &quot;Failed&quot;))<br>        .send()<br>        .join();</pre><p>Here we are invoking a chain of methods using the jobClient reference.</p><blockquote>“newFailCommand” — accepts a job key</blockquote><blockquote>“retries” — accepts a number of retries,</blockquote><blockquote>“retryBackoff” — accepts ‘Duration’ to retry after specified seconds.</blockquote><blockquote>“variables” — accepts a variable map to pass into a case variable.</blockquote><h4><em>Throw Error Command</em></h4><pre>jobClient.newThrowErrorCommand(activatedJob.getKey())<br>        .errorCode(&quot;invalidCreditCardData&quot;)<br>        .errorMessage(invalidCreditCardException.getMessage())<br>        .send()<br>        .join();</pre><blockquote>“newThrowErrorCommand” — accepts a job key</blockquote><blockquote>“errorCode” — accepts a string (this should be same as configured in BPMN),</blockquote><blockquote>“errorMessage” — accepts a string as a error description for the error code.</blockquote><p>Main class: <strong>ExceptionErrorHandlingApplication</strong></p><p>@Deployment — helps to deploy the specified process during startup into Operate.</p><p>ZeebeClient — helps create a new process instance for a BPMN process, given a specific BPMN version and input variables.</p><pre>@SpringBootApplication<br>@Deployment(resources = &quot;classpath:credit-card-payment-error-handling-process.bpmn&quot;)<br>public class ExceptionErrorHandlingApplication implements CommandLineRunner {private static final Logger LOG = LoggerFactory.getLogger(ExceptionErrorHandlingApplication.class);<br>    <br>    @Autowired<br>    private ZeebeClient zeebeClient;<br>    public static void main(String[] args) {<br>       SpringApplication.run(ExceptionErrorHandlingApplication.class, args);<br>    }<br><br>    @Override<br>    public void run(final String... args) {<br>       var bpmnProcessId = &quot;credit-card-payment-error-handling-process&quot;; <br>       var event = zeebeClient.newCreateInstanceCommand()<br>            .bpmnProcessId(bpmnProcessId)<br>            .latestVersion()<br>            .variables(generateCreditCardInfo())<br>            .send()<br>            .join();<br>       LOG.info(String.format(&quot;started a process: %d&quot;, event.getProcessInstanceKey()));<br>    }<br><br>    private Map&lt;String, Object&gt; generateCreditCardInfo() {<br>       Map&lt;String, Object&gt; responseVaraibles = new HashMap&lt;&gt;();<br>        ...<br>        ...<br>       LOG.info(&quot;generateCreditCardInfo : {}&quot;, responseVaraibles);<br>       return responseVaraibles;<br>    }<br>}</pre><p>Now we get into Camunda Operate to understand the process instance states.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*N4XL9qjNmULU5chfjKtwnQ.png" /><figcaption>Camunda 8 — Instance states</figcaption></figure><ul><li>Active – Green tokens indicate active tokens in a wait state.</li><li>Active – Red tokens indicate an Incident (requiring manual intervention from Operate).</li><li>Terminated instances, either completed or cancelled instances, are represented as grey tokens — the token at the end event indicates completed tokens, and the grey tokens at the intermediate catch / throw error event are cancelled tokens.</li></ul><p>The screen below refers to the BPMN process deployed in Operate with 300 process instances in various states.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6MwF9cxrThJMW1YFBDzqfg.png" /></figure><p>We can see the screenshot below with a user task “<strong>Verify and Update Card details</strong>” with 28 and “<strong>Generate Receipt</strong>” with 60 active instances in the task list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GTcXN_e6tbvNTSrcG2FDAw.png" /></figure><p>When we select only incidents under “Instance States”, we can see all the incidents from the specific process version as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0XuRje7Gnb2-gckWMZI3yw.png" /></figure><p>When you click on the incident, we can see additional details as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oigZNu_f7YafjgX9R8bm2g.png" /></figure><p>Click on View Incident and use the retry option under “<strong>operations</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cjkWP7H7PtAQJjlsXM0Zxg.png" /></figure><p>I conclusion, this article has helped to understand and implement exception handling and manage incidents along with retry configurations for Job workers, using a simple credit card payment process as an example. We explored the various configuration properties and their purposes, leveraging annotation levels and property configurations provided by the Camunda 8 library. This knowledge should help you set up and manage Job worker tasks, monitor incidents, process instance states and retries efficiently in Camunda 8 workflows using Operate and Tasklist.</p><p><strong><em>References:</em></strong></p><ol><li><a href="https://docs.camunda.io/docs/self-managed/setup/deploy/local/docker-compose/">https://docs.camunda.io/docs/self-managed/setup/deploy/local/docker-compose/</a></li><li><a href="https://docs.camunda.io/docs/self-managed/setup/deploy/local/docker-compose/">https://docs.camunda.io/docs/self-managed/setup/deploy/local/docker-compose/</a></li><li><a href="https://docs.camunda.io/docs/components/concepts/incidents/">https://docs.camunda.io/docs/components/concepts/incidents/</a></li><li><a href="https://docs.camunda.io/docs/components/best-practices/development/dealing-with-problems-and-exceptions/">https://docs.camunda.io/docs/components/best-practices/development/dealing-with-problems-and-exceptions/</a></li><li><a href="https://camunda.com/blog/2023/09/resolving-process-incidents-exceptions-operate/">https://camunda.com/blog/2023/09/resolving-process-incidents-exceptions-operate/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa1f06ddf6c6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-enthusiasts/getting-started-with-error-handling-in-camunda-8-workflows-aa1f06ddf6c6">Getting Started with Error Handling in Camunda 8 Workflows</a> was originally published in <a href="https://medium.com/tech-enthusiasts">Tech Enthusiasts</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Camunda Service Tasks: Implementing External Tasks (Topics) — A Step-by-Step Guide]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/tech-enthusiasts/camunda-service-tasks-implementing-external-tasks-topics-a-step-by-step-guide-b26c0ca2f57b?source=rss----967883e27f4a---4"><img src="https://cdn-images-1.medium.com/max/2600/0*kf-cLIVdE8YnX1pS" width="6000"></a></p><p class="medium-feed-snippet">In this article, we&#x2019;ll explore the concept of external tasks, their benefits, and how to configure a service task implementation as an&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/tech-enthusiasts/camunda-service-tasks-implementing-external-tasks-topics-a-step-by-step-guide-b26c0ca2f57b?source=rss----967883e27f4a---4">Continue reading on Tech Enthusiasts »</a></p></div>]]></description>
            <link>https://medium.com/tech-enthusiasts/camunda-service-tasks-implementing-external-tasks-topics-a-step-by-step-guide-b26c0ca2f57b?source=rss----967883e27f4a---4</link>
            <guid isPermaLink="false">https://medium.com/p/b26c0ca2f57b</guid>
            <category><![CDATA[camunda]]></category>
            <category><![CDATA[bpmn]]></category>
            <category><![CDATA[camunda-bpmn]]></category>
            <dc:creator><![CDATA[Shashir]]></dc:creator>
            <pubDate>Sat, 08 Mar 2025 01:21:36 GMT</pubDate>
            <atom:updated>2025-02-10T12:05:36.482Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Kubernetes (K8S) Deployment Strategies]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/tech-enthusiasts/kubernetes-k8s-deployment-strategies-1ef4c1dc1c6c?source=rss----967883e27f4a---4"><img src="https://cdn-images-1.medium.com/max/2600/0*JjHHMu9voqLLH7E5" width="5453"></a></p><p class="medium-feed-snippet">Its pretty common to have Microservices architecture in recent times where we can avail the benefit of frequent releases &#x2014; quick time to&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/tech-enthusiasts/kubernetes-k8s-deployment-strategies-1ef4c1dc1c6c?source=rss----967883e27f4a---4">Continue reading on Tech Enthusiasts »</a></p></div>]]></description>
            <link>https://medium.com/tech-enthusiasts/kubernetes-k8s-deployment-strategies-1ef4c1dc1c6c?source=rss----967883e27f4a---4</link>
            <guid isPermaLink="false">https://medium.com/p/1ef4c1dc1c6c</guid>
            <category><![CDATA[kubernetes-deployment]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Shashir]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 23:52:39 GMT</pubDate>
            <atom:updated>2025-02-08T05:41:13.118Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Generative AI for Java Made Easy: A Quick Start with Spring AI]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/tech-enthusiasts/generative-ai-for-java-made-easy-a-quick-start-with-spring-ai-8451742707ea?source=rss----967883e27f4a---4"><img src="https://cdn-images-1.medium.com/max/2600/0*PC_GzF4LXtL2t7SF" width="2765"></a></p><p class="medium-feed-link"><a href="https://medium.com/tech-enthusiasts/generative-ai-for-java-made-easy-a-quick-start-with-spring-ai-8451742707ea?source=rss----967883e27f4a---4">Continue reading on Tech Enthusiasts »</a></p></div>]]></description>
            <link>https://medium.com/tech-enthusiasts/generative-ai-for-java-made-easy-a-quick-start-with-spring-ai-8451742707ea?source=rss----967883e27f4a---4</link>
            <guid isPermaLink="false">https://medium.com/p/8451742707ea</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[spring-ai]]></category>
            <category><![CDATA[spring]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[openai]]></category>
            <dc:creator><![CDATA[Shashir]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 23:47:48 GMT</pubDate>
            <atom:updated>2025-02-08T05:37:59.614Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Microservice Design Pattern: Sidecar pattern]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/tech-enthusiasts/microservice-design-pattern-sidecar-sidekick-pattern-dbcea9bed783?source=rss----967883e27f4a---4"><img src="https://cdn-images-1.medium.com/max/920/1*b2F4OPWS_ZEW_kUA1jM5Bg.png" width="920"></a></p><p class="medium-feed-snippet">In microservice architecture, it&#x2019;s very common to have multiple services/apps often require common functionalities like logging&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/tech-enthusiasts/microservice-design-pattern-sidecar-sidekick-pattern-dbcea9bed783?source=rss----967883e27f4a---4">Continue reading on Tech Enthusiasts »</a></p></div>]]></description>
            <link>https://medium.com/tech-enthusiasts/microservice-design-pattern-sidecar-sidekick-pattern-dbcea9bed783?source=rss----967883e27f4a---4</link>
            <guid isPermaLink="false">https://medium.com/p/dbcea9bed783</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[sidecar-pattern]]></category>
            <category><![CDATA[software-patterns]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[microservices-pattern]]></category>
            <dc:creator><![CDATA[Shashir]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 23:46:39 GMT</pubDate>
            <atom:updated>2025-02-08T05:43:15.785Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[FastAPI — Modern High-Performance Python Web Framework]]></title>
            <link>https://medium.com/tech-enthusiasts/fastapi-modern-high-performance-python-web-framework-12fdfe3382a0?source=rss----967883e27f4a---4</link>
            <guid isPermaLink="false">https://medium.com/p/12fdfe3382a0</guid>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[python-web-framework]]></category>
            <dc:creator><![CDATA[Shashir]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 23:44:41 GMT</pubDate>
            <atom:updated>2025-02-14T11:06:52.445Z</atom:updated>
            <content:encoded><![CDATA[<h3>FastAPI — Modern High-Performance Python Web Framework</h3><p>This article is the first in a series on FastAPI for beginners. It provides an overview of the need for the FastAPI framework, its key features, and how it differs from other Python web frameworks like Django and Flask. Additionally, we will build a simple application, creating FastAPI routes (API endpoints) to serve basic HTTP requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dfkFoSlYUdTSXGw9" /><figcaption>Photo by <a href="https://unsplash.com/@ccausse_images?utm_source=medium&amp;utm_medium=referral">Charles Causse</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>What is FastAPI?</strong></p><p><em>FastAPI is a modern, high-performance, web framework for building REST APIs with </em><strong><em>Python 3.8 </em></strong><em>and later versions to support the latest changes</em><strong><em>. </em></strong><em>It’s</em><strong><em> </em></strong><em>noted for its speed and exceptional use of ‘</em><strong><em>type hints’</em></strong><em>. In addition, it also </em><strong><em>generates OpenAPI documentation for the APIs automatically</em></strong><em>.</em></p><p><strong>Key Features include:</strong></p><ul><li><em>Performance</em></li><li><em>Better Code Quality</em></li><li><em>Faster Development</em></li><li><em>Autogenerated documentation</em></li></ul><p><em>FastAPI uses </em><strong><em>Pydantic</em></strong><em> (a Python library) for data validation, serialising and deserializing data making it simpler to work with complex data types in Python. It is also backed by </em><strong><em>Starlette, </em></strong><em>which is a lightweight Asynchronous Server Gateway Interface (ASGI) framework for building web applications and microservices in Python.</em></p><p>Let’s understand how FastAPI differs from Python frameworks like Django and Flask.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w2GRKj74052jxhObnzTABg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O1q22eUyNN3PNb2781G52Q.png" /><figcaption>Python Web framework comparision: FastAPI vs Flask vs Django</figcaption></figure><blockquote><strong>Note</strong>: Assuming you already have Python 3.8 or higher version installed on your machine.</blockquote><p>Let’s install the below prerequisite packages before jumping into the coding example.</p><ol><li><strong>FastAPI </strong><em>framework</em>: <strong><em>pip install fastapi</em></strong></li><li><strong>Uvicorn</strong> web server: <strong><em>pip install uvicorn</em></strong></li></ol><p>Verify the installation with: <strong><em>pip list</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*WHf5m5ALc_jWPDMsMJdnig.png" /></figure><p>Let’s build sample end-points for basic HTTP operations — GET, POST, PUT and DELETE.</p><blockquote><strong>Note</strong>: This is a basic application to kickstart with FastAPI, I will cover further topics like connecting to the database, Pydantics, Exceptions etc., separately).</blockquote><p>Create a Python file named ‘<strong><em>gadgets.py</em></strong>’ and add the code below. Here we are using hardcoded values to keep it simple.</p><p>To start with, we need to import FastAPI and Body from fastapi framework as shown below.</p><p>Followed by creating a Python list with the name ‘gadgets’ that holds a Python dictionary with sample values.</p><pre>from fastapi import Body, FastAPI<br><br>app = FastAPI()<br><br>gadgets = [<br>    {&#39;gadget_name&#39;: &#39;Samsung ULTRA&#39;, &#39;gadget_category&#39;:&#39;Mobile&#39;, &#39;year&#39;:&#39;2025&#39;},<br>    {&#39;gadget_name&#39;: &#39;Samsung Fold&#39;, &#39;gadget_category&#39;:&#39;Mobile&#39;, &#39;year&#39;:&#39;2024&#39;},<br>    {&#39;gadget_name&#39;: &#39;Samsung Galaxy&#39;, &#39;gadget_category&#39;:&#39;Tablet&#39;, &#39;year&#39;:&#39;2025&#39;},<br>    {&#39;gadget_name&#39;: &#39;Apple IPhone 16.x&#39;, &#39;gadget_category&#39;:&#39;Mobile&#39;, &#39;year&#39;:&#39;2024&#39;},<br>    {&#39;gadget_name&#39;: &#39;Apple IPad&#39;, &#39;gadget_category&#39;:&#39;Tablet&#39;, &#39;year&#39;:&#39;2024&#39;},<br>]<br><br>def gadget_by_name(gadget_name):<br>    for gadget in gadgets:<br>        if gadget_name.casefold() == gadget.get(&#39;gadget_name&#39;).casefold():<br>                return gadget</pre><p>We created a method with the name “gadget_by_name” which returns the requested gadget based on gadget_name .</p><p><strong><em>Implement HTTP — Get method :</em></strong></p><p>The @app decorator references the FastAPI instance, which provides standard HTTP methods for performing various operations, similar to other web frameworks.</p><p>The below method maps the GET request with the path as ‘/gadgets’ and returns the gadgets list to the client application.</p><pre># Fetch all Gadgets<br><br>@app.get(&quot;/gadgets&quot;)<br>async def display_gadget_api():<br>    return gadgets</pre><p><strong><em>Implement HTTP — Get method using Path Param:</em></strong></p><p>The following method maps a GET request to the ‘/gadgets’ path, incorporating a path parameter ‘gadget_name’, and returns the corresponding gadget to the client application.</p><pre># Fetch Gadget by name - PATH PARAM<br><br>@app.get(&quot;/gadget/{gadget_name}&quot;)<br>async def fetch_gadget_by_name(gadget_name: str):<br>    return gadget_by_name(gadget_name)</pre><p><strong><em>Implement HTTP — Get method using Query Param:</em></strong></p><p>The following method maps a GET request to the ‘/gadgets’ path, utilizing a query parameter ‘gadget_name’, and returns the corresponding gadget to the client application.</p><pre># Fetch Gadget by name - QUERY PARAM<br><br>@app.get(&quot;/gadget&quot;)<br>async def gadget_by_name_query(gadget_name: str):<br>    return gadget_by_name(gadget_name)</pre><p><strong><em>Implement HTTP — Post method:</em></strong></p><p>The following method maps a POST request to the ‘/gadgets’ path. This method accepts an incoming request body containing new gadget details, which are then added to the existing gadgets list. Upon successful execution, a success message is returned to the client application.</p><pre># Create a new Gadget<br><br>@app.post(&quot;/gadgets&quot;)<br>async def add_gadget(new_gadget=Body()):<br>    gadgets.append(new_gadget)<br>    return &#39;Successful!!!&#39;</pre><p><strong><em>Implement HTTP — Put method:</em></strong></p><p>The following method maps a PUT request to the ‘/gadgets’ path. This method accepts an incoming request body containing the existing gadget details to be updated in the gadgets list. No response is returned to the caller.</p><pre># Update an existing Gadget <br><br>@app.put(&quot;/gadgets&quot;)<br>async def update_gadget(existing_gadget = Body()):<br>    for index in range(len(gadgets)):<br>        if gadgets[index].get(&#39;gadget_name&#39;).casefold() == existing_gadget.get(&#39;gadget_name&#39;).casefold():<br>            gadgets[index] = existing_gadget<br>            break</pre><p><strong><em>Implement HTTP — Delete method:</em></strong></p><p>The following method maps a DELETE request to the ‘/gadgets’ path, incorporating a path parameter ‘gadget_name’. This method executes a delete operation on the existing gadgets list by matching the incoming ‘gadget_name’ path parameter against the existing gadgets. No response is returned to the caller.</p><pre># Delete an existing Gadget<br><br>@app.delete(&quot;/gadget/{gadget_name}&quot;)<br>async def remove_gadget(gadget_name: str):<br>    for index in range(len(gadgets)):<br>        if gadgets[index].get(&#39;gadget_name&#39;).casefold() == gadget_name.casefold():<br>            gadgets.pop(index)<br>            break</pre><p>Now execute the ‘gadgets.py’ file on your local system using any of the below commands</p><blockquote>1. Using Uvicorn command:<strong> uvicorn gadgets:app — reload</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WucfhYIH8GMb0Pl8JqwCLg.png" /></figure><blockquote>2. Using FastAPI command: <strong>fastapi dev gadgets.py</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCBMg_qk6c896_vd5b0QSQ.png" /></figure><p>OpenAPI (Swagger) Specification generated out of the box for the above end-points on the URL: <a href="http://127.0.0.1:8000/docs">http://127.0.0.1:8000/docs</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xd5YGmnJ8lxhlI4ShRzTSQ.png" /></figure><p>Let’s Verify the above FastAPI routes:</p><ol><li>Get all gadgets in the store:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bMJW6-7Jt4Djv3UNa8BONA.png" /></figure><p>2. Get Gadget by Gadget Name (QUERY):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Px8o4lcJlXteA_t8o0zzg.png" /></figure><p>3. Create a new Gadget:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OsqDCTvedSTpfGIRVimNfQ.png" /></figure><p>4. Get the new Gadget we created with the Post method above by Gadget Name (PATH):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9nmWCQogzyayxtV0V35Qg.png" /></figure><p><strong><em>In conclusion:</em></strong></p><p>In this article, we explored the capabilities and benefits of FastAPI, a modern Python web framework. We discussed its key features and provided instructions on installing FastAPI along with the Uvicorn server to run applications locally. We built a sample program through hands-on examples that performed basic CRUD operations on the static list and developed examples utilizing path and query parameters. Additionally, we discovered FastAPI’s built-in support for OpenAPI, which allowed us to verify and document our application’s routes effortlessly. By leveraging the features and capabilities of FastAPI, developers can easily create robust, efficient, and scalable web applications.</p><p>References:</p><ul><li><a href="https://fastapi.tiangolo.com/">https://fastapi.tiangolo.com/</a></li><li><a href="https://docs.pydantic.dev/latest/">https://docs.pydantic.dev/latest/</a></li><li><a href="https://piptrends.com/compare/Flask-vs-Django-vs-fastapi">https://piptrends.com/compare/Flask-vs-Django-vs-fastapi</a></li><li><a href="https://blog.jetbrains.com/pycharm/2023/12/django-vs-fastapi-which-is-the-best-python-web-framework/">https://blog.jetbrains.com/pycharm/2023/12/django-vs-fastapi-which-is-the-best-python-web-framework/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12fdfe3382a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-enthusiasts/fastapi-modern-high-performance-python-web-framework-12fdfe3382a0">FastAPI — Modern High-Performance Python Web Framework</a> was originally published in <a href="https://medium.com/tech-enthusiasts">Tech Enthusiasts</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>