<?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 Har D on Medium]]></title>
        <description><![CDATA[Stories by Har D on Medium]]></description>
        <link>https://medium.com/@har-d?source=rss-8e981fe2c5fd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LqKSxf8ykIAvi1MP8kM9WQ.jpeg</url>
            <title>Stories by Har D on Medium</title>
            <link>https://medium.com/@har-d?source=rss-8e981fe2c5fd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 16:45:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@har-d/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[PromptVault: An Open LLM Prompt Repository]]></title>
            <link>https://har-d.medium.com/promptvault-an-open-llm-prompt-repository-6fc435395c7e?source=rss-8e981fe2c5fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fc435395c7e</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Har D]]></dc:creator>
            <pubDate>Wed, 22 Oct 2025 12:01:09 GMT</pubDate>
            <atom:updated>2025-10-22T12:01:09.312Z</atom:updated>
            <content:encoded><![CDATA[<p>Sharing and managing complex prompts for LLMs is becoming increasingly cumbersome. <strong>PromptVault</strong> reimagines this process — not as a separate tool, but as an <strong>LLM agent, ChatGPT plugin, or what Sam Altman calls “a ChatGPT app.”</strong></p><p>Here’s how it works:</p><ol><li>Within your LLM interface, simply submit a large prompt using the keyword:</li></ol><blockquote><strong>PVault shrink this &lt;your huge prompt&gt;</strong></blockquote><ol><li>PromptVault generates a <strong>loooongg hashcode</strong> that uniquely represents your prompt.</li><li>Share just the hashcode instead of the full prompt.</li><li>Recipients can reconstruct and run the full prompt via:</li></ol><blockquote><strong>PVault read this &lt;hashcode&gt;</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vp65jFVoqNf_gO7pyT5C7Q.png" /></figure><p><strong>Why PromptVault matters:</strong></p><ul><li><strong>Seamless Integration:</strong> Works directly inside ChatGPT, Gemini, or any LLM — no extra software required.</li><li><strong>Efficiency:</strong> Execute massive prompts with a tiny hashcode. Yup not a new idea. Something like a tinyurl</li><li><strong>Consistency:</strong> Everyone runs the same instructions exactly.</li><li><strong>Open &amp; Collaborative:</strong> Prompts become discoverable and reusable in a shared repository.</li><li><strong>Privacy &amp; Security:</strong> Only the hashcode is shared; full prompts stay internal until executed. ( This is a quite far fetched. May be you can imagine this being a ChatGPT + feature where you can sign the hashcode )</li></ul><p>If I explained it right, we should have a respository like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i73n2aitgzFpbY9y7HIsuQ.png" /></figure><p><strong>PromptVault</strong> transforms prompt sharing into a <strong>cryptographically unique, lightweight, and collaborative workflow</strong> — all from within your LLM interface. It’s not a separate app; it’s your <strong>prompt management agent inside ChatGPT.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fc435395c7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What If we have a dedicated productivity day every week]]></title>
            <link>https://har-d.medium.com/what-if-we-have-a-dedicated-productivity-day-every-week-c2afa8e46288?source=rss-8e981fe2c5fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2afa8e46288</guid>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Har D]]></dc:creator>
            <pubDate>Thu, 13 Mar 2025 09:07:34 GMT</pubDate>
            <atom:updated>2025-03-13T09:07:34.663Z</atom:updated>
            <content:encoded><![CDATA[<p>Lets get straight to the point</p><p><em>Do you feel you are always on those never ending meetings ? everyday ? forever ?</em></p><p><strong>Yes ?</strong></p><p>You are right. Because your calendar looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CbckDrK-uTzYtI-FuMCSAA.png" /></figure><p>And you are the reason why it looks like that. You kept your calendar open for every one to squeeze meetings whenever possible. Right when you start at work (8.30 AM ) and just before leaving ( 5.00 PM ).</p><p>We have sick days, casual days , vacation days and other occasion days. What we need is a regular day , just to do our work without any interruption , what I call as <strong>“Productivity Day”.</strong></p><h3>Why meetings are bad</h3><p>Believe it or not, meetings can be useful or pointless, but they’re not as bad as you think. The real problem is that they disrupt your workflow. Meetings have set start and end times, but your work doesn’t. You can’t always pause your work at a specific time — especially in creative fields.</p><p>Stopping mid-task, leaving it unfinished, sitting through an hour-long meeting, and then trying to pick up where you left off? By then, the flow is gone… and you know what comes next — coffee break!</p><h3>What is a Productivity day</h3><p>Its a day you are dedicating yourself just for being productive at work . To put it a fun way, its a personal “work” day for you. You will wake up with the peace of mind that, today there wont be any meetings, discussions , session and its just to do your work.</p><p>It might sound rebellious, but I will tell you how to do it professionally</p><h3>How to MYOPD ( Make Your Productivity Day )</h3><p>You have 5 working days ( yeh ! sherlock ). We are going to divide this in to 3 types of days</p><ul><li><strong>Productivity day</strong></li><li><strong>Meeting day ( 2 days )</strong></li><li><strong>Flexible day ( 2 days )</strong></li></ul><h3>Productivity day</h3><p>As I mentioned above, its the one day of the week , you work without any disturbance. To achieve this , you will have to make some arrangements in your schedule and alter your working style.</p><p>Block one day per week in your calendar with a full-day dummy meeting invite. This signals to your colleagues that you’re unavailable for meetings. Over time, you’ll receive fewer last-minute invites and unnecessary CC-ed optional meetings because your status will show as “Busy” when they schedule. And if they still book a meeting ?, see you dodged an unneccesary meeting or lets call its less important.</p><h3>Meeting day</h3><p>This is the opposite of a productivity day. We all know meetings aren’t productive, so why not contain them? Dedicate a specific day to meetings — stack them all together. Wake up knowing it’s a day of back-to-back calls and discussions. Embrace it. Encourage others to schedule meetings only on this day, freeing up the rest of your week for real work.</p><p>Just imagine few regular conversations we have every day</p><blockquote><strong>You :</strong> Hey john ! lets catch up , what about Tuesday ( meeting day 1 )</blockquote><blockquote><strong>John :</strong> Sorry, am busy this Tuesday , I have a workshop</blockquote><blockquote><strong>You :</strong> What about Thursday ( meeting day 2 )</blockquote><blockquote><strong>John :</strong> Sorry again. Its for 3 days</blockquote><blockquote><strong>You :</strong> Ok next week then.</blockquote><p>John is not going to be busy forever. He must be available on one of you meetings days.</p><h3><strong>Flexible Days</strong></h3><p>Yes, it’s a flexible day — the day you step into the role of the regular office worker. You attend meetings, and in between, you squeeze in some productive work.</p><p>But it’s important to set boundaries. Don’t let these flexible days become a dumping ground for overflow meetings. They’re not “reserved” for meetings; they’re simply structured to keep your week organized.</p><p>You’re not being rigid, and you’re not being rebellious. You’re simply taking a professional approach to managing your time effectively.</p><h3>Productivity as a team</h3><p>It is much more easier to make it work as a team , than as an individual.</p><p><strong>He is not available on Tuesdays and Thursday —</strong><em> wow! that’s so rude . He cannot chose when to meet people , he is not the CEO</em></p><p><strong>The team is not available on Tuesdays and Thursdays — </strong><em>well ..ok! we will meet on Wednesday then.</em></p><p>Push all your team meetings to a one single day . Sit it out and the next day you don&#39;t disturb you team. Let them work to the fullest.</p><h3>You have some doubts ?</h3><p>Yes. This is the FAQ section</p><h4>What if the meeting is very important to me , I have to make it happen and it might have to be on my productivity day.</h4><p>Simple.<strong> You take it</strong>. The objective is not to reconstruct the work culture and organization policies. You try your best to organize your work and as usual there are exceptions.</p><h4>What if I my meeting days are Monday and Tuesday , but my colleague chose Wednesday and Thursday. We can never meet ?</h4><p>Use your flexible day. Moreover, you control the agenda here. You are consciously picking the meeting schedule, instead of giving everyone the flexibility of filling your calendar.</p><h4><strong>What if I have more meetings that I cant fit them in those 2 meetings days ?</strong></h4><p>Move it to next week. But unless and until its absolutely necessary, do not use your flexible days. You dont have to say a strict NO , but you can still say a firm SORRY.</p><h4>Am a consultant. I will have to be on meetings and I have to co-ordinate people every day. Will it work for me ?</h4><p>Nope. This article is not for you. Thanks for reading</p><h3>Summary</h3><p>Your calendar should start looking like this. And if you do this right, your flexible days will also become your productive days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CLrR9EoOkTQAFCgFiThikA.png" /></figure><p>Go ahead. Use the comment box to tell me why this wont work . Am all ears.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2afa8e46288" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No-Code AI for App Development: YouTube Hype or Reality?]]></title>
            <link>https://har-d.medium.com/no-code-ai-for-app-development-youtube-hype-or-reality-439d4ae4c2a6?source=rss-8e981fe2c5fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/439d4ae4c2a6</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cursor-ai]]></category>
            <category><![CDATA[no-code-development]]></category>
            <dc:creator><![CDATA[Har D]]></dc:creator>
            <pubDate>Tue, 11 Feb 2025 03:25:02 GMT</pubDate>
            <atom:updated>2025-03-10T06:11:17.502Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Disclaimer:</em></strong><em> The introduction was written with the help of AI. As most of them are book definitions and they are must to have to any article. You can jump directly to the main content.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bo_Jug1xNj08bIKh-mwOmA.png" /></figure><h3><strong>Introduction</strong></h3><p>In recent times, YouTube has been flooded with videos claiming, <em>“How AI Helped Me Develop an App Without Coding a Single Line!”</em> The thumbnails are eye-catching — bright colors, and bold text that promises an effortless journey into app development. The video content itself is often engaging, featuring fast-paced editing, upbeat music, and step-by-step demonstrations that make it look <em>almost too easy</em> to create an app with AI.</p><p>The appeal is undeniable. Who wouldn’t want to build an app without the headaches of learning programming languages, debugging code, or dealing with complex backend logic? These videos create an impression that AI has made app development as simple as dragging and dropping elements, letting machine learning models do the heavy lifting.</p><p>Is it an impression or just an illusion. Let’s find out !!</p><h3><strong>AI Powered Coding assistants</strong></h3><p>AI-powered coding assistants have revolutionized the way developers write and manage code, making the entire process faster and more efficient. Tools like GitHub Copilot offer intelligent suggestions, automate repetitive tasks, and provide real-time debugging support, making them invaluable assets in modern development workflows.</p><p>One tool that particularly stood out to me was <strong>Cursor AI</strong>. Unlike other code completion assistants, this is kind of an autonomous robot, capable of doing tougher tasks by itself .</p><p>I decided to purchase a license and try them out for myself. There’s absolutely nothing wrong with investing in these tools — after all, time is money. These AI-driven assistants guarantee to save hours of manual effort, making them well worth the cost.</p><h3><strong>Quick impression about Cursor AI</strong></h3><p>Cursor AI is an AI powered software, I would say, more or less<em> an IDE ( read with an upward inflection) </em>. To put in a lay man point of view, Cursor AI can spit out a entire project source code files with one single command. Something like “Create a ToDo list app using Flutter” (Yep! I Like flutter). Looking at the Cursor AI interface, I just said “Hello VS Code”.</p><p><strong><em>Disclaimer : </em></strong><em>Before I dive deeper, I would like to make it double clear that, this article is not to evaluate Cursor AI. This is to validate whether those eye catchy YouTube videos are accurate. With that in mind let’s move forward</em></p><h3><strong>The Experiment</strong></h3><p>So, I picked up one of the YouTube tutorials, and yes, not the step by step one where the developer codes in front of us. That would apparently work no questions about that. I took the one that are made in a fancy way, just like high production value commercial.</p><p>Something that goes<em> “what if I tell you,I built this , this , this app all using AI without writing a single line of code”</em></p><p>These are the steps mentioned in that video</p><p>- Write down my app idea in ChatGPT</p><p>- Ask it to make it more structural so that its easier for app developers to understand. ChatGPT gave me a good, structured text. I made a few corrections here and there, but otherwise ChatGPT did a good job</p><p>- Paste this in CursorAI command window and ask it to re-write it as a markdown. Am not very sure about this step because I would have asked ChatGPT itself to do it. May be because CursorAI used both Chat-GPT and Claude, it might be better?? I don’t know</p><p>- Now the final command. Tag the markdown file and ask Cursor AI to generate the necessary project folders, db schema and configuration files. Voila ! I got the entire project folder structure in roughly a minute.</p><p>- The next step mentioned in the video is to run the app. And it SHOULD RUN out of the box</p><h3><strong>So What happened?</strong></h3><p>Well… Things did not go as expected. Let me break it down to you</p><p><strong>Project completeness</strong></p><p>Cursor AI did generate the project files, but it missed a few important files. I picked flutter as the tech stack; the tool conveniently missed the main <em>pubspec.yml</em>. Understandable, maybe I missed to mention this in the prompt. It also missed the <em>gradle</em> build file. Perhaps, this should be included in the command as well?</p><p>I added those missing files myself, of course by asking Cursor AI to do it , not manually . Because this exercise is all about building an app without WRITING a line of code.</p><p><strong>Dependency problems</strong></p><p>The second problem was with the dependencies. Some turned out to be outdated and some were incompatbile. There were deprecated commands in the build file, and it installed a older version of gradle wrapper. Once again, I tried asking the AI to update these files. I gave it a few iterations and the dependencies stabilized after a while.</p><p><strong>Code linking</strong></p><p>The next thing was quite a shocker. Compilation errors (??? ). There were missing imports. The variable declarations were dangling. Try blocks had no catch blocks.</p><p>I remember building an automatic code generator in early 2000s. The tool reads SQL and converts it to entity beans. Don’t ask me why, I thought it’s an “innovative idea”. Jeez I was young and stupid. Ok, the point here is, even in that tool, I handled class imports fair and easy and its not something that can be missed on a broad day light. Again, kind of unexpected from an advanced AI agent. Compilation errors ? a big NO!!!</p><p><strong>Code generation inconsistency</strong></p><p>I added few new screens later, using the command palette. Somehow, the tool started messing up with folder structure. I got two new folders in a completely different structure and the newly added files are organized in a way different than the bootstrap code.</p><p><strong>Coding style</strong></p><p>I liked this part personally. One of the most common annoying problems with automatic code generating tools is that. The screens and the functionalities will be as you want and as you described but the code behind will completely be terrible, unmaintainable, uneditable and unmodifiable. Some tools inject extremely weird code which a normal human will never do.</p><p>I remember generating a webpage using an automated tool, and the CSS code was full of absolute and relative positioned elements. It might be pre-responsive screens era but absolute position. Really?</p><p>But here, the code was clean. The screen layout was perfect, the code was in the way how I would do. Proper rows, columns were used, and it was a breeze to modify the code. Well done!</p><p><strong>Fast forward</strong></p><p>I can already hear you yell,<em> “Enough of these stories, just tell me did it work”.</em></p><p>Hate to break it to you, It didn’t ☹</p><p>I could not run the app, even after multiple modifications . Am not going to run you through my error <em>stacktrace</em> , but there were problems.</p><h3><strong>Verdict (or opinion )</strong></h3><p>Hope my experiment made sense. Assuming that, it has answered few important questions</p><p><strong>Can AI-Powered tools help cut-down development time?</strong></p><p>Yes. By a big chunk. Go for it.</p><p><strong>Can I develop an app just like that?</strong></p><p>Nope. It is what it is. It can help but it’s not the 3.5 LPA developer to do everything by itself. AI assistant needs your assistance</p><p><strong>Do I need coding knowledge?</strong></p><p>Yes, and yes. For people who disagree here, and if you are a technical person, I will give you a homework assignment. Try developing an app in a technology you don’t know. For example, If you are an android developer, try building a web app using python. If you face 10 problems, a non-techy will face 100.</p><p><strong>The final million-dollar question. Will AI replace developers</strong></p><p>Yes. AI will replace core-java, core-python, basic HTML, CSS, jQuery, angular, spring boot, servlet developers. But it can’t replace a full stack product grade app developer. So basic developers out there, remove “<em>C C++ Java</em>” from your resume and step up.</p><p>AI is coming….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=439d4ae4c2a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GDPR — Encryption , Masking and Logging using Spring Boot AOP Framework]]></title>
            <link>https://har-d.medium.com/easy-implementation-of-gdpr-with-aspect-oriented-programming-27e96f47767d?source=rss-8e981fe2c5fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/27e96f47767d</guid>
            <category><![CDATA[aop]]></category>
            <category><![CDATA[encryption]]></category>
            <dc:creator><![CDATA[Har D]]></dc:creator>
            <pubDate>Wed, 12 Jul 2023 12:41:15 GMT</pubDate>
            <atom:updated>2023-07-18T05:22:51.106Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Summary</strong></p><p>GDPR compliance should be a default feature in every application that handles <strong>PII (Personally Identifiable Information)</strong>. Most organizations have an impression that GDPR is a luxury feature that needs special tools to implement. But, we can see that the frameworks and design patterns we already use in our everyday development can very well be used to implement the GDPR rules.</p><p><strong>Key Takeaways</strong></p><ul><li>GDPR compliance is the most under-looked phenomenon, the failure of which is causing legal implications such as heavy monetary penalties.</li><li>An application can be compliant to GDPR as early as in the development stage, making data privacy as a default and mandatory feature.</li><li>The software libraries we use in our day-to-day development already have functionalities to make an application GDPR compliant without having to use expensive tools.</li><li>A very simple implementation using Spring Boot and AOP (Aspect Oriented Programming), explained in this article, will make you realize that GDPR compliance is not rocket science.</li><li>Masking, Encryption, Logging are the core of GDPR compliance, and they must be applied in all the artifacts that involve data privacy, such as PII (Personally Identifiable Information).</li></ul><p>GDPR should be a default feature, added in every single application that handles user data, especially PII (Personally Identifiable Information). Most organizations consider GDPR as luxury and have an impression that it needs special tools and experts to implement it. Of course, knowledge of the entire GDPR specification is required, but once we are through the rules, we can see that the frameworks and design patterns we already use in our everyday development can very well be used to implement the GDPR rules. Going forward, all applications should be GDPR compliant.</p><p><strong>Features We Will Implement</strong></p><p>When we talk about GDPR, the three important things we want to implement are:</p><p><strong>Encryption</strong> — Scrambling the actual data to hide information which needs a special mechanism to unscramble it.</p><p><strong>Masking</strong> — Hiding part of the information with a dummy pattern to make sure the information is retrieved but the person who reads is not authorised to view it fully.</p><p><strong>Logging</strong> — Recording every action that involves <strong>PII.</strong></p><p>Even though these are three different features, the implementation can be simplified and concentrated by using simple programming patterns.</p><p><strong>Techniques We Will Use</strong></p><ul><li><strong>Spring Boot framework</strong> — For a standard web application</li><li><strong>Java custom annotation</strong> <strong>technique</strong> — To annotate methods that needs GDPR treatment</li><li><strong>Aspect Oriented Programming (AOP)</strong> — Interception-based processing</li><li><strong>Simple Encryption and Masking Class</strong> — A mock Java class that scrambles, unscrambles and masks the data.</li><li><strong>Jackson Serializer</strong> — To process Java objects.</li></ul><p>Good news. We don’t need any third-party libraries for this implementation.</p><p><strong>Overview</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/0*O4o-unzeUL7U2kuy" /></figure><p>Spring Boot Application</p><p>Let us assume a simple use case:</p><ul><li>An API that accepts a User Object and returns a response.</li><li>A service that saves the data to the database and returns saved data back to the Controller.</li></ul><p><strong>Note:</strong> We are not going to have a working database connection for this example, we will just assume that the service saves the data and returns the same to the user.</p><p><strong>Entity</strong></p><blockquote>public class User {</blockquote><blockquote>private String name;</blockquote><blockquote>public User(){}</blockquote><blockquote>public String getName() {<br> return name;<br> }</blockquote><blockquote>public void setName(String name) {<br> this.name = name;<br> }</blockquote><blockquote>@Override<br> public String toString() {<br> return “User{“ +<br> “name=’” + name + ‘\’’ +<br> ‘}’;<br> }<br>}</blockquote><p><strong>Service</strong></p><blockquote>@Service<br>public class UserService {</blockquote><blockquote>private Logger logger = LoggerFactory.<em>getLogger</em>( “UserService” );</blockquote><blockquote>public User create( User user ){<br> logger.info( “ Data inside create service “ + user );<br> return user;<br> }<br>}</blockquote><p><strong>Controller</strong></p><blockquote>@RestController<br>public class UserController {</blockquote><blockquote>private Logger logger = LoggerFactory.<em>getLogger</em>( “UserController” );</blockquote><blockquote>@Autowired UserService userService;</blockquote><blockquote>@PostMapping(“/plain”)<br> public User plain(@RequestBody User user){<br> logger.info( “ Data in the plain controller “+ user);<br> return userService.create(user);<br> }<br>}</blockquote><p><strong>Main Application (For the sake of completion)</strong></p><blockquote>@SpringBootApplication<br>public class Application {<br> public static void main(String[] args) {<br> SpringApplication.run( Application.class );<br> }<br>}</blockquote><p><strong>Custom Annotation</strong></p><p>The second step is the custom annotation. Let us use standard Java to create it.</p><blockquote>@Target( ElementType.<em>METHOD</em>)<br>@Retention( RetentionPolicy.<em>RUNTIME</em>)<br>public @interface GDPR { }</blockquote><p>Let us break down this custom annotation:</p><ul><li>The <strong>@interface</strong> (instead of just <strong>interface</strong>) — makes this class available to be used as <strong>@GDPR</strong> in other classes.</li><li><strong>@Target(ElementType.METHOD)</strong> — makes this annotation method specific (i.e., can be used only on methods not on classes or fields).</li><li><strong>@Retention(RetentionPolicy.RUNTIME)</strong> — instructs the compiler to process this during runtime. The annotation need not be processed during compile time, so we use the <strong>RUNTIME</strong> retention policy.</li></ul><p>Now this interface can be used as <strong>@GDPR</strong> in any desired method.</p><p><strong>AOP Implementation</strong></p><p>Spring Boot natively supports AOP. Using which, we will intercept any method that is annotated with the <strong>@GDPR </strong>annotation<strong>.</strong></p><p>Let us go ahead and create an interceptor class.</p><blockquote>@Aspect<br>@Component<br>public class GDPRInterceptor {</blockquote><blockquote>private Logger logger = LoggerFactory.<em>getLogger</em>( GDPRInterceptor.class );</blockquote><blockquote>@Around(“@annotation(GDPR)”)<br> public Object encrypt(ProceedingJoinPoint joinPoint ) throws Throwable {<br> logger.info( “Method intercepted “ );</blockquote><blockquote>}</blockquote><p><strong>@Component</strong> — This Class is a standard Spring component.</p><p><strong>@Aspect</strong> — This Class is a Spring AOP component and can intercept calls based on the pattern provided.</p><p><strong>@Around(“@annotation(GDPR)”)</strong> — This line has two parts:</p><ol><li>The <strong>@Around</strong> helps to trigger these interceptors both before execution (when the method is called) and after execution (after processing is complete and before returning the final value).</li><li>The parameter (<strong>“@annotation (GDPR)”</strong>) specifies which methods are intercepted. In our case, any method with the annotation <strong>@GDPR</strong>, is intercepted.</li></ol><p><strong>Controller with Annotation</strong></p><p>Let us add a new method to our controller with the <strong>@GDPR</strong> annotation. The modified controller should look like below:</p><blockquote>@RestController<br>public class UserController {</blockquote><blockquote>private Logger logger = LoggerFactory.<em>getLogger</em>( “UserController” );</blockquote><blockquote>@Autowired UserService userService;</blockquote><blockquote>@PostMapping(“/plain”)<br> public User plain(@RequestBody User user){<br> logger.info( “ Data in the plain controller “+ user);<br> return userService.create(user);<br> }</blockquote><blockquote>@PostMapping(“/encrypt”)<br> @GDPR<br> public User encrypt(@RequestBody User user){<br> logger.info( “ Data in the encryption controller “+ user);<br> return userService.create(user);<br> }</blockquote><blockquote>}</blockquote><p>Let us break down this controller:</p><p>The Controller/Web API has two methods with corresponding endpoints, <strong>/plain</strong> and <strong>/encrypt</strong>.</p><ul><li>Both APIs have the same return type and parameter type.</li><li>Both the methods are calling the same service methods with the same data</li><li>Only the encrypt method has the <strong>@GDPR</strong> annotation.</li></ul><p>This way, the GDPR implementation does not disturb the existing business logic.</p><p>If you run the application as such and call the <strong>/plain</strong> API, you should see log statements only from the <strong>UserController</strong> and <strong>UserService</strong> classes. But when you call the <strong>/encrypt</strong> API, you should see an additional log statement from the <strong>GDPRInterceptor</strong> class. It should be noted that the log statement from <strong>GDPRInterceptor</strong> is printed first, because the controller is tapped before it calls the service, which is very critical in this implementation.</p><p><strong>Encryption Service</strong></p><p>Let’s create an <strong>EncryptionService</strong> class. <strong>We are not going to implement an actual working encryption for now, instead, let us consider a simple mockup of an encryption</strong>.</p><blockquote>@Component<br>public class EncryptionService {</blockquote><blockquote>private Object encrypt( Object data ){<br> <br> if( data != null) {<br> data += “ { ENCRYPTED } “; <br> }<br> return data;<br> }</blockquote><blockquote>private Object decrypt( Object data ){<br> <br> String plainText = null;<br> if( data != null ) {<br> plainText = data.toString().replace(“ { ENCRYPTED } “, “”);<br> }<br> return plainText;<br> }<br>}</blockquote><p>We have two methods:</p><ul><li><strong>encrypt</strong> — Receives a single object, appends a string called {ENCRYPTED} and returns the same.</li><li><strong>decrypt</strong> — Receives a single object and removes the string {ENCRYPTED} from it.</li></ul><p>For Example, if the data is “<em>MySampleData</em>,” the encrypt method will return “<em>MySampleData { ENCRYPTED }</em>, “ and if you pass this output to the decrypt method, you will get back the original data.</p><p><strong>Customizing Object Mapper</strong></p><p>The <strong>encrypt</strong> and <strong>decrypt</strong> methods we created are good for processing primitives. But a typical application would only deal with Java objects. It would be tedious to create individual transformers for every class type that an application deals with. For that purpose, we are going to extend the <strong>ObjectMapper</strong> class provided by <strong>Jackson Library</strong>. We are going to alter the default object serialization method to include our encryption process.</p><p>First, we need to create two Custom Serializers, one for encryption and one for decryption.</p><p><strong>Encryption Serializer</strong></p><blockquote>public class EncryptionSerializer extends JsonSerializer&lt;Map&gt; {</blockquote><blockquote>private Logger logger = LoggerFactory.<em>getLogger</em>( EncryptionSerializer.class );</blockquote><blockquote>EncryptionService encryptionService = new EncryptionService();</blockquote><blockquote>public EncryptionSerializer() {<br> super();<br> }</blockquote><blockquote>@Override<br> public void serialize(Map t, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {</blockquote><blockquote>jsonGenerator.writeStartObject();</blockquote><blockquote>t.forEach((k,v)-&gt;{<br> try {<br> jsonGenerator.writeObjectField( k.toString(),encryptionService.encrypt( v ));<br> } catch (IOException e) {<br> e.printStackTrace();<br> }<br> });<br> jsonGenerator.writeEndObject();<br> }<br>}</blockquote><p><strong>Decryption Serializer</strong></p><blockquote>public class DecryptionSerializer extends JsonSerializer&lt;Map&gt; {</blockquote><blockquote>EncryptionService encryptionService = new EncryptionService();</blockquote><blockquote>public DecryptionSerializer() {<br> super();<br> }</blockquote><blockquote>@Override<br> public void serialize(Map t, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {</blockquote><blockquote>jsonGenerator.writeStartObject();<br> t.forEach((k,v)-&gt;{<br> try {<br> jsonGenerator.writeObjectField( k.toString(),encryptionService.decrypt( v ));<br> } catch (IOException e) {<br> e.printStackTrace();<br> }<br> });<br> jsonGenerator.writeEndObject();<br> }<br>}</blockquote><p>The custom serializers extend <strong>JSONSerializer</strong> and override the <strong>serialize</strong> method. We are also casting this function with the <strong>Map</strong> class, which will be explained later in this article.</p><p><strong>Configuring Object Mappers</strong></p><p>Let us build the custom object mappers that use these new serializers, thanks to Spring Boot configuration.</p><blockquote>@Configuration<br>public class ApplicatonConfiguration {</blockquote><blockquote>@Bean<br> @Primary<br> public ObjectMapper objectMapper(){<br> return new ObjectMapper();<br> }</blockquote><blockquote>@Bean(“encryptor”)<br> public ObjectMapper encryptionMapper(){</blockquote><blockquote>ObjectMapper mapper = new ObjectMapper();<br> SimpleModule module = new SimpleModule();<br> module.addSerializer( Map.class, new EncryptionSerializer());<br> mapper.registerModule( module );</blockquote><blockquote>return mapper;<br> }</blockquote><blockquote>@Bean(“decryptor”)<br> public ObjectMapper decryptionMapper(){</blockquote><blockquote>ObjectMapper mapper = new ObjectMapper();<br> SimpleModule module = new SimpleModule();<br> module.addSerializer( Map.class, new DecryptionSerializer());<br> mapper.registerModule( module );</blockquote><blockquote>return mapper;<br> }<br>}</blockquote><p>Here we have three types of ObjectMappers:</p><p><strong>@Primary</strong> — the default ObjectMapper used by Spring.</p><p><strong>@Bean(“encryptor”)</strong> — <strong>ObjectMapper</strong>, that will encrypt the Java Object (JSON).</p><p><strong>@Bean(“decryptor”)</strong> — <strong>ObjectMapper</strong>, that will decrypt the Java Object (JSON).</p><p><strong>Generalized the Jackson Mapper with java.util.Map</strong></p><p>A typical application will have many types of Java classes/entities. Since we are going to reconfigure the Jackson serializer provided by Spring itself, we will not be able to include a <strong>Generic &lt;?&gt;</strong> to our Serializer. It will also be tiresome to create a serializer for every class type. So we are going to generalize all Java class types as a Key Value object i.e., <strong>java.util.Map. </strong>This generalization will help us serialize and deserialize any object, without worrying about actual data type.</p><p><strong>Interceptor with Encryption</strong></p><p>Consider the following scenario:</p><ul><li>The controller receives plain text data from the user through an API call.</li><li>The controller calls the service method to save the user data.</li><li>The service saves the data in encrypted format and returns the data back to the controller.</li><li>The controller receives encrypted data from the service, but returns plain text back to the user as an API response.</li></ul><p>To satisfy the above scenario, we need the data to be encrypted from the controller to the service and decrypted from the service to the controller.</p><p>Let us add this transformation code to our interceptor.</p><blockquote>@Aspect<br>@Component<br>public class GDPRInterceptor {</blockquote><blockquote>private Logger logger = LoggerFactory.<em>getLogger</em>( GDPRInterceptor.class );</blockquote><blockquote>@Autowired ObjectMapper mapper;</blockquote><blockquote>@Autowired @Qualifier(“encryptor”) ObjectMapper encryptor;</blockquote><blockquote>@Autowired @Qualifier(“decryptor”) ObjectMapper decryptor;</blockquote><blockquote>@Around(“@annotation(GDPR)”)<br> public Object intercept(ProceedingJoinPoint joinPoint ) throws Throwable {<br> logger.info( “ Method execution begins” );</blockquote><blockquote>Object[] params = joinPoint.getArgs();<br> Class&lt;?&gt; aClass = null;<br> Map&lt;String,Object&gt; intermediateData = null;</blockquote><blockquote>for( int index = 0 ; index &lt; params.length ; index++ ){<br> aClass = params[index].getClass();<br> intermediateData = mapper.convertValue( params[index], new TypeReference&lt;Map&lt;String, Object&gt;&gt;() {}</blockquote><blockquote>);<br> params[index] = encryptor.convertValue(intermediateData, aClass);<br> }</blockquote><blockquote>Class returnType = ((MethodSignature) joinPoint.getSignature()).getReturnType();</blockquote><blockquote>Object response = joinPoint.proceed(params);</blockquote><blockquote>intermediateData = mapper.convertValue(response, new TypeReference&lt;Map&lt;String, Object&gt;&gt;() {});<br> response = decryptor.convertValue( intermediateData, returnType );<br> logger.info ( “ Method execution complete” );</blockquote><blockquote>return response;<br> }<br>}</blockquote><p>The updated <strong>GDPRInterceptor</strong> has the following changes:</p><ul><li>The reconfigured Object Mappers are included with the proper <strong>@Qualifier</strong>.</li><li>The method parameters are iterated, and every parameter is processed.</li><li>The Parameter value is flattened using the standard Object Mapper to a <strong>Map</strong> Object.</li><li>The Map Object is then encrypted using the <strong>encryptor </strong>variant of<strong> ObjectMapper</strong> and type casted to the actual parameter data type.</li><li>The Encrypted parameter is now forwarded to the Service.</li><li>The Service saves the encrypted data and returns the same.</li><li>The returned encrypted data is once again flattened to Map using the Standard Object Mapper.</li><li>The flattened Map object is now decrypted using the <strong>decryptor</strong> variant of <strong>ObjectMapper</strong> and type casted to the original return type.</li></ul><p><strong>Quick Testing</strong></p><p><strong>Plain Text API</strong></p><p><strong>Call</strong></p><blockquote>curl — location — request POST ‘localhost:8080/plain’ — header ‘Content-Type: application/json’ — data-raw ‘{“name”: “Developer”}’</blockquote><p><strong>Response</strong></p><blockquote>{“name”: “Developer”}</blockquote><p><strong>Log Statements</strong></p><blockquote>INFO 9884 — — [nio-8080-exec-4] UserController : Data in the plain controller User{name=’Developer’}<br>INFO 9884 — — [nio-8080-exec-4] UserService : Data inside create service User{name=’Developer’}</blockquote><p><strong>Encrypted Text API</strong></p><p><strong>Call</strong></p><blockquote>curl — location — request POST ‘localhost:8080/encrypt’ — header ‘Content-Type: application/json’ — data-raw ‘{“name”: “Developer”}’</blockquote><p><strong>Response</strong></p><blockquote>{“name”: “Developer”}</blockquote><p><strong>Log Statements</strong></p><blockquote>INFO 9068 — — [nio-8080-exec-2] GDPRInterceptor : Method execution begins<br>INFO 9068 — — [nio-8080-exec-2] UserController : Data in the encryption controller User{name=’Developer { ENCRYPTED } ‘}<br>INFO 9068 — — [nio-8080-exec-2] UserService : Data inside create service User{name=’Developer { ENCRYPTED } ‘}<br>INFO 9068 — — [nio-8080-exec-2] GDPRInterceptor : Method execution complete</blockquote><p>As you can see, the API response is the same (original data) for both APIs. However, for the encrypt API, the log statements from controller and service show encrypted data.</p><p>Both controller methods are doing the same task, but just the <strong>@GDPR</strong> implementation is doing the magic for us.</p><p><strong>Masking</strong></p><p>Masking sensitive data is an important aspect of GDPR compliance. Fortunately, it’s easy to include it in our current pattern.</p><p>Let us re-assume the scenario we discussed above.</p><p>The encryption stays the same, but when the API responds back to the user, the original data is masked. So, to satisfy this condition, we need to introduce a new method in <strong>EncryptionService</strong> for <strong>Masking</strong> and modify the decrypt method to call this new masking function.</p><blockquote>public Object mask( Object data ){<br> String maskedText = null;<br> String dataAsString = data.toString();<br> if( data != null )<br> maskedText = dataAsString.replace( dataAsString.substring( 1, 3 ), “XXX”);<br> return maskedText;<br>}</blockquote><blockquote>public Object decrypt( Object data ){</blockquote><blockquote>String plainText = null;<br> if( data != null ) {<br> plainText = data.toString().replace(“ { ENCRYPTED } “, “”);<br> }<br> return mask(plainText);<br>}</blockquote><p>Now if you call the <strong>/encrypt</strong> API, the response will be:</p><blockquote>{“name”: “DXXXeloper”}</blockquote><p><strong>Logging</strong></p><p>We already added logging to the interceptor. Any method that is annotated with <strong>@GDPR</strong> are sensitive methods. Whenever these methods are called, the interceptor will log it around the execution.</p><p><strong>Note</strong> — It is recommended not to log the actual data. Log files containing PII data are considered as a security risk.</p><p>Article originally published on <a href="https://www.infoq.com/articles/gdpr-with-spring-and-aop">InfoQ website</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27e96f47767d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microservice orchestration with Apache Camel]]></title>
            <link>https://har-d.medium.com/microservice-orchestration-with-apache-camel-15ae9d108ba?source=rss-8e981fe2c5fd------2</link>
            <guid isPermaLink="false">https://medium.com/p/15ae9d108ba</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[apache-camel]]></category>
            <dc:creator><![CDATA[Har D]]></dc:creator>
            <pubDate>Mon, 27 Feb 2023 06:26:54 GMT</pubDate>
            <atom:updated>2023-02-27T06:26:54.409Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction</strong></h3><p>World is moving towards microservice architecture, there is no doubt about that. Microservices help to break a huge application in to multiple smaller parts with each part designed to hold one single well defined responsibility. Microservices as such look very simple and easily manageable. The problem comes only when they work in large numbers.</p><h3><strong>Microservice interactions in real world applications</strong></h3><p>Unlike the past, we don’t need to invest lots of effort to follow design patterns. We have frameworks now. They take the most burden out of us. For example, just by using spring framework, our application already becomes compliant with some of the basic design principles and patterns.</p><p>As the one of the SOLID principles’ states, Microservices should hold a single responsibility. In a real-world application, though the microservices work as a single unit, they need to communicate with other microservices to complete an objective. The interaction between these microservices can be in multiple ways as illustrated below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*-gEVrvSNrBvzBRxiYtWn2A.png" /></figure><p>The exchange between these microservices can occur in any combination and can grow to any size in real-world complex applications. So, co-ordination of these microservices is necessary to maintain the clarity of the architecture, implement the design and maintain it for the future. Proper Co-ordination of these microservice communication is called <strong>Microservice Orchestration.</strong></p><p>In this article, we are going to do the following exercise.</p><ul><li>Create a small scenario.</li><li>Understand the issues arise due to lack of proper microservice orchestration.</li><li>Design and implement orchestration using straight forward approach.</li><li>Implement microservice orchestration using open source EIP framework and understand the advantage of the same.</li></ul><h3><strong>Scenario</strong></h3><p>Consider a simple order service, used in our everyday ecommerce websites. The actual product order service, we see in real-world application would be much complex, but the below example will give us a fair idea of a typical order system.</p><ul><li>A registered customer selects a product.</li><li>Orders the product.</li><li>Receives order confirmation.</li></ul><p>This use case is built using 3 microservices, namely</p><p><strong>User Service, </strong>manages User information</p><p><strong>Product Service, </strong>manages product information, stock, price, etc.</p><p><strong>Order Service,</strong> Creates an Order and assigns it to the customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*DlrSWXNtWy5SHZAB7fdWZA.png" /></figure><p>Microservices expose their resource through standard REST APIs. So, these microservices can communicate with both, end client as well as other microservices through REST call.</p><h3><strong>Approach 1: Direct REST interaction</strong></h3><p>The first straight forward approach, the order service can be designed is, by making a direct rest call between the microservices, with one of the microservices acting as a service endpoint. This end point will be called directly by the client (browser / mobile).</p><p>Illustrated in the diagram below…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*nBjl2C9WkC8gRs4fvOO_Wg.png" /></figure><p>The web client initiates a call to the Order Service directly. The Order service invokes User Service for user data. The user service fetches the User Information, prepares an object, and then calls the Product Service for Product information. The product detail is appended to the already prepared User Object and returned to the Order service. With this data, the Order Service creates a new order and responds back to the Client.</p><p>In this approach, there is a transitive REST call happening. Order Service to User Service to Product Service. Then the response is aggregated and finally sent back to the client. Apparently, this is poorly designed and have many points of failures.</p><h3><strong>Approach 2: Direct call with route optimization</strong></h3><p>Instead of making the request hoping on to multiple points, we can make one of the microservice as the source, send multiple requests and aggregate the result at one place.</p><p>Look at the below diagram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*1M5DpXc2rhlnL3p659umoA.png" /></figure><p>Here the Order Service calls both Product Service and User Service , processes the response and then returns it to the Client.</p><p>(<strong><em>Note:</em></strong><em> The diagram might be misleading. The calls are not parallel but just a representation. In a procedural programming, the calls will be sequential only.</em>)</p><p>This approach is better, because the transitive call is removed and Order Service acts as the common point where the outbound requests are made.</p><p>Everything appears fine right? No.</p><p>There is one serious issue in this pattern. The Order Service here, not just manages the order management, but also handles calls to other microservice. This in a way breaks the single responsibility principle. Order Service also has knowledge of the flow which tightly couples the execution.</p><h3><strong>Solution and its Problems</strong></h3><p>We need more problems…</p><p>Consider another flow on the same system, where the admin wants to list all the users from the database. This flow would require the API call to start from User Service. The direct consequence of such a change is, that our application now has <strong>multiple entry points</strong>.</p><p>It might look simple now because, <em>/order</em> would initiate from Order Service and<em> /user</em> from User Service. But this is not the case in a typical application where rest APIs are not as straight forward as we see here. So, using the URL context path to trace it back to the appropriate microservice is not a bright idea. And there is no guarantee that the Microservice name and the API context will always be same.</p><h3><strong>Guidelines for a Microservice orchestration</strong></h3><p>Let’s list down some checks which will help us to do better orchestration.</p><ul><li>Microservices should be decoupled and have no knowledge of the execution sequence.</li><li>Microservices should not act as a direct entry point.</li><li>Microservices communication should be centralized, and all the routing logic should be written and maintained at one place.</li><li>Microservices endpoints should be added, modified, or removed from an execution sequence without disrupting the flow.</li></ul><p>Now that we have the guidelines, lets us re-structure ours architecture.</p><h3><strong>Approach 3: Orchestration Service</strong></h3><p>Let’s us introduce a new component called <strong>Orchestration Service</strong>, that sits in between the end client and the microservices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*4Ishi2jnWkdKj1YcXouCug.png" /></figure><p>This orchestration service will have the following properties</p><ul><li>Completely decoupled from Core microservices.</li><li>Acts as a microservice gateway</li><li>Exposes the actual REST endpoints used by end client. The API contracts can be different from actual microservice APIs.</li></ul><p>This new orchestration service also enhances the microservices. They do not directly communicate with each other, means Order Service does not call Use Service at any point. The Orchestration service takes the complete responsibility of calling these microservices in any desired sequence based on the use case needed. This flexible pattern is much easier to understand, maintain and modify. This orchestration also forces the microservice to be fully decoupled. If the microservices are loosely bound, it is convenient to use them in any part of the flow, without creating too much noise.</p><h3><strong>From Architecture to Implementation</strong></h3><p>Let’s try to implement this…</p><p>If we can recollect the properties of Orchestration service, we can see, this can be a microservice as well and can be implemented using Spring boot itself. The Orchestration Service will have the APIs which are nothing, but the regular Spring Boot Rest Controller and the orchestration logics happen on the Service Layer.</p><p>Look at the code below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*-88T-siZvNM7P443ACmLIQ.png" /></figure><p>The execution logic is written inside a service method. Individual rest calls happen one after the other, but in one single place. The data is aggregated, processed and the response is sent back to the client.</p><p>So, we have performed a simple, elegant microservice orchestration, which confirms to both Microservice standards as well as Orchestration norms. But if you ask me, this is it? I would say no. We have not even tried to solve a real-world problem. Let us see how this pattern adapts to modifications.</p><h3><strong>Bigger Picture</strong></h3><p>Let us add a new entity called <strong>Delivery</strong>. This delivery contains the order information that includes the user address, product details, invoice etc; The delivery information can only be created by communicating with an external <strong>Delivery Service</strong>.</p><p>Its is easy if the delivery service is a REST based application. But lets us add more pain.</p><p>The external delivery system is based on <strong>queuing model</strong>, using Apache ActiveMQ. The delivery request is sent through a queue in an asynchronous fashion. Once the request is sent; the external delivery service processes the information and sends back the confirmation in another queue.</p><p>It’s not over yet. Let’s add one last piece to the puzzle.</p><p>On successful order placement and delivery booking, the client must be notified in real-time through <strong>Web Sockets</strong>.</p><p>Will our current orchestration withstand this pressure? Let’s see</p><h3><strong>More Problems and More solution</strong></h3><p>Let us go back to our code. To incorporate this new change, we need few new services</p><p>- <strong>ActiveMQ publisher</strong> service to push messages to the external system.</p><p>- <strong>ActiveMQ message consumer</strong>, that listens to the reply channel for delivery confirmation.</p><p>- <strong>WebSocket adapter</strong> to publish push notifications.</p><p>It must be noted that, these adapters are not always natively supported, so appropriate configuration classes must be added as well.</p><p>A full-scale application will comprise of assorted components like the one we discussed above. Now try to extrapolate from this core system. Redesign the same system with more microservice calls, more external systems. Though we hit the objective, it is now apparent that, this solution <strong>does not scale well</strong>. This is where we bring in open-source platforms which are specifically designed for such cases.</p><h3><strong>Apache Camel</strong></h3><p>It is an opensource integration platform based on EIP (Enterprise Integration Pattern). It is not a standalone software or a service. It is a plain java-based library (.jar). Spring boot natively supports Apache camel and can easily be included in build tools like Apache maven or Gradle.</p><p>Implementation is where this library gets interesting. Let’s have a quick look at the sample code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*zMUYoKGRxPhu_NrP8dVu-g.png" /></figure><p>Yes, it might look like a pseudo-code we see in textbooks, but it’s not. It’s java and it’s a working code (of course we need a basic java skeleton like imports, class, and package declarations). We can see how neatly the use case flow is pipelined, making it very easy to design an execution. We can rearrange the flow, insert a new component, remove a component and do much more. Our code will stay undisturbed.</p><p>Camel supports a vast variety of integrations such as ones we discussed in our problem statement. REST, Active MQ, Web Sockets and many other components. The complete list of integrations supported by camel can be found here</p><p><a href="https://camel.apache.org/components/3.18.x/">https://camel.apache.org/components/3.18.x/</a></p><h3><strong>Interesting integrations</strong></h3><p>Few sample integrations which will demonstrate the power of Apache Camel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*aobWjLzJTdDSiwiCmwtY8Q.png" /></figure><p>Concluding this article by re-writing the introduction. World is moving towards microservice architecture, there is no doubt about that. Let us make sure we implement it right to get the best out of it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15ae9d108ba" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>