<?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 Sujit Udhane on Medium]]></title>
        <description><![CDATA[Stories by Sujit Udhane on Medium]]></description>
        <link>https://medium.com/@sujit-udhane?source=rss-2428e86219a2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UNpEUYRBuos7ONvtqdlI8w.png</url>
            <title>Stories by Sujit Udhane on Medium</title>
            <link>https://medium.com/@sujit-udhane?source=rss-2428e86219a2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:11:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sujit-udhane/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[GPT on application data source using LangChain and private LLM.]]></title>
            <link>https://sujit-udhane.medium.com/gpt-on-application-data-source-using-langchain-and-private-llm-ffdc9f672822?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffdc9f672822</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[sqldatabasechain]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 18:30:53 GMT</pubDate>
            <atom:updated>2023-10-02T18:30:53.357Z</atom:updated>
            <content:encoded><![CDATA[<h3>GenAI high level solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*qUBCYX3OXf7vaD28aFGmiw.jpeg" /><figcaption>GenAI high level diagram — Applying private LLM to query a database.</figcaption></figure><h3>Tech Stack</h3><blockquote><strong>Private LLM: </strong>Llama-2–7b-chat</blockquote><blockquote><strong>Vector database:</strong> Chroma [Optional]</blockquote><blockquote><strong>Langchain library:</strong> SqlDatabaseChain</blockquote><blockquote><strong>SQL Toolkit:</strong> SQLAlchemy</blockquote><blockquote><strong>Webapp:</strong> Streamlit</blockquote><blockquote><strong>Application database:</strong> SQLite [But, can be any RDBMS]</blockquote><h3>Potential Use Cases</h3><blockquote>1. <strong>Business analytics and business insights:</strong> The ability to gain knowledge as a product or business owner. A query is often written by the engineering team.<br>2. <strong>IT Support:</strong> As a system support engineer (L3/L2 support), intermediary steps that explain how the SQL query was created in the GPT answer assist in obtaining the actual database query (In the majority of the cases, 100% accurate). The speed of root cause identification and issue resolution will increase.<br>3. <strong>Observability</strong>: In the capacity as a system support engineer (L3/L2 support), support person can query application logs typically stored in data sources like ElasticSearch.<br>4. <strong>Q&amp;A:</strong> An application user can naturally ask questions to acquire further insights, and GPT against a database can help extract the most knowledge from the system.<br>5. <strong>A new method of system communication:</strong> As a product manager, you can develop new channels of communication with the system to facilitate user tasks.</blockquote><h3>Reference code</h3><pre>from langchain.llms import LlamaCpp<br>from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler<br>import streamlit as st<br>from langchain.callbacks.base import BaseCallbackHandler<br>from langchain.utilities import SQLDatabase<br>from langchain.experimental.sql import SQLDatabaseChain<br>from langchain.callbacks.manager import CallbackManager<br>from langchain.embeddings import HuggingFaceEmbeddings<br>from langchain.vectorstores import Chroma<br>from langchain.schema import Document<br>from langchain.memory.vectorstore import VectorStoreRetrieverMemory<br><br>QUERY_TEMPLATE = &quot;&quot;&quot;Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.<br>Use the following format:<br><br>Question: &quot;Question here&quot;<br>SQLQuery: &quot;SQL Query to run&quot;<br>SQLResult: &quot;Result of the SQLQuery&quot;<br>Answer: &quot;Final answer here&quot;<br><br>Only use the following tables:<br><br>{table_info}.<br><br>Some examples of SQL queries that corrsespond to questions are:<br><br>{few_shot_examples}<br><br>Question: {input}&quot;&quot;&quot;<br><br>prompt_to_query_dict = {<br>              &#39;List all artists.&#39;: &#39;SELECT * FROM artists;&#39;,<br>              &quot;Find all albums for the artist &#39;AC/DC&#39;.&quot;: &quot;SELECT * FROM albums WHERE ArtistId = (SELECT ArtistId FROM artists WHERE Name = &#39;AC/DC&#39;);&quot;,<br>              &quot;List all tracks in the &#39;Rock&#39; genre.&quot;: &quot;SELECT * FROM tracks WHERE GenreId = (SELECT GenreId FROM genres WHERE Name = &#39;Rock&#39;);&quot;,<br>              &#39;Find the total duration of all tracks.&#39;: &#39;SELECT SUM(Milliseconds) FROM tracks;&#39;,<br>              &#39;List all customers from Canada.&#39;: &quot;SELECT * FROM customers WHERE Country = &#39;Canada&#39;;&quot;,<br>              &#39;How many tracks are there in the album with ID 5?&#39;: &#39;SELECT COUNT(*) FROM tracks WHERE AlbumId = 5;&#39;,<br>              &#39;Find the total number of invoices.&#39;: &#39;SELECT COUNT(*) FROM invoices;&#39;,<br>              &#39;List all tracks that are longer than 5 minutes.&#39;: &#39;SELECT * FROM tracks WHERE Milliseconds &gt; 300000;&#39;,<br>              &#39;Who are the top 5 customers by total purchase?&#39;: &#39;SELECT CustomerId, SUM(Total) AS TotalPurchase FROM invoices GROUP BY CustomerId ORDER BY TotalPurchase DESC LIMIT 5;&#39;,<br>              &#39;Which albums are from the year 2000?&#39;: &quot;SELECT * FROM albums WHERE strftime(&#39;%Y&#39;, ReleaseDate) = &#39;2000&#39;;&quot;,<br>              &#39;How many employees are there&#39;: &#39;SELECT COUNT(*) FROM &quot;employee&quot;&#39;<br>       }<br><br>def settings():<br><br> callbacks = [StreamingStdOutCallbackHandler()]<br><br>    DOMAIN_DOCS = [Document(page_content=question, metadata={&#39;sql_query&#39;: few_shots[question]}) for question in few_shots.keys()]<br> model_name = &quot;sentence-transformers/all-MiniLM-L6-v2&quot;<br>    model_kwargs = {&#39;device&#39;: &#39;cpu&#39;}<br>    encode_kwargs = {&#39;normalize_embeddings&#39;: False}<br> embeddings=HuggingFaceEmbeddings(<br>       model_name=model_name,<br>       model_kwargs=model_kwargs,<br>       encode_kwargs=encode_kwargs<br>    )<br> <br> chromaVectorStore = Chroma(<br>  collection_name = &quot;app_datasource_store&quot;,<br>  embedding_function = embeddings,<br>  persistent_directory = &quot;./chroma_db_app_datasource&quot;<br> )<br> <br> chromaVectorStore.from_documents(DOMAIN_DOCS, embedding=embeddings)<br> datasource_retriever = chromaVectorStore.as_retriever(search_type=&quot;mmr&quot;)<br> applicationDataSourceDocsMemory = VectorStoreRetrieverMemory(retriever=datasource_retriever)<br> <br> # Callbacks support token-wise streaming<br> callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])<br> <br> n_gpu_layers = 1<br> n_batch = 512<br> <br> # LLM (Place your model into models directory).<br> llm = LlamaCpp(<br>  model_path=&quot;./models/llama-2-7b-chat.Q8_0.gguf&quot;,<br>  n_gpu_layers=n_gpu_layers,<br>  n_batch=n_batch,<br>  n_ctx=4000,<br>  f16_kv=True,<br>  callback_manager=callback_manager, <br>  verbose=True, # Verbose is required to pass to the callback manager<br> )<br> <br>    db = SQLDatabase.from_uri(&quot;sqlite:///./Chinook.db&quot;)<br>    <br>    #Create an SqlDatabaseChain to interpret the input prompt using Domain Docs and LLM.<br>    chain = SQLDatabaseChain.from_llm(llm, db, verbose=False, use_query_checker=True, top_k=8, <br>     return_intermediate_steps=True, memory=applicationDataSourceDocsMemory)<br><br>    return chain<br><br>class StreamHandler(BaseCallbackHandler):<br>    def __init__(self, container, initial_text=&quot;&quot;):<br>        self.container = container<br>        self.text = initial_text<br><br>    def on_llm_new_token(self, token: str, **kwargs) -&gt; None:<br>        self.text += token<br>        self.container.info(self.text)<br><br>class PrintRetrievalHandler(BaseCallbackHandler):<br>    def __init__(self, container):<br>        self.container = container.expander(&quot;Context Retrieval&quot;)<br><br>    def on_retriever_start(self, query: str, **kwargs):<br>        self.container.write(f&quot;**Question:** {query}&quot;)<br><br>    def on_retriever_end(self, documents, **kwargs):<br>        # self.container.write(documents)<br>        for idx, doc in enumerate(documents):<br>            source = doc.metadata[&quot;source&quot;]<br>            self.container.write(f&quot;**Results from {source}**&quot;)<br>            self.container.text(doc.page_content)<br><br>    st.header(&quot;`Interacting with database`&quot;)<br><br>    # Make SQLDatabaseChain<br>    if &#39;chain&#39; not in st.session_state:<br>        st.session_state[&#39;chain&#39;] = settings()<br>    chain = st.session_state.chain<br><br>    # User input <br>    question = st.text_input(&quot;`Ask a question:`&quot;)<br>    <br>    if question:<br>    <br>        # Generate answer (w/ citations)<br>        updated_question = QUERY_TEMPLATE.format(question=question)<br>        qa_chain = chain(updated_question)<br>        # Print Intermediate Steps<br>        qa_chain[&quot;intermediate_steps&quot;]<br>        # Write answer <br>        retrieval_streamer_cb = PrintRetrievalHandler(st.container())<br>        answer = st.empty()<br>        answer.info(&#39;`Answer:`\n\n&#39; + qa_chain[&quot;result&quot;])</pre><h3>Possible Improvements</h3><blockquote>1. You can investigate other RDBMS databases, such as PostgreSQL.<br>2. Memory can be an optional parameter when constructing a SQLDatabaseChain that uses a vector database to convey domain-specific knowledge. According to observations, this can occasionally lead to erroneous query construction and cause SQL syntax errors.<br>3. Other open source and commercial-friendly LLMs, such as a StarCoder, can produce better results than generic LLMs like Llama-2.</blockquote><h3>Challenges and possible remedies</h3><blockquote>1. <strong>Database access:</strong> Any application’s data source is a crucial component of the overall system. It needs to be effectively supervised and controlled in order to be kept in good health. A restricted user with read-only access and the ability to only access a group of tables must be developed for such a solution.<br>2. <strong>Sensitive information leakage: </strong>Response data should be sanitised with a technique like masking before producing the final response.<br>3. <strong>User management:</strong> The user should be able to get information specific to them based on their user persona. You could implement a role-based access control system.<br>4. <strong>Customer sensitive information:</strong> Solution must safeguard sensitive consumer data. This can be accomplished by adding the default filter condition to the resulting SQL. PromptTemplate’s technique can assist in achieving this.</blockquote><p>Please remember to clap. Please spread the word if you enjoyed the post.</p><p>Additionally, you can connect with me on LinkedIn at https://www.linkedin.com/in/sujit-udhane/</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffdc9f672822" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Naturally interact with your APIs using Local LLM.]]></title>
            <link>https://sujit-udhane.medium.com/naturally-interact-with-your-apis-using-local-llm-30c903141d32?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/30c903141d32</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sun, 10 Sep 2023 06:54:33 GMT</pubDate>
            <atom:updated>2023-09-10T06:54:33.888Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>LLM: Interacting with APIs. High level solution diagram</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*FfATw93RpKBHbuf6NrlQxw.jpeg" /></figure><p><strong>Tools and frameworks required to achieve the goal</strong></p><ul><li>LangChain Library — APIChain</li><li>OpenAPI Docs — textual documentation</li><li>Locally running LLM</li><li>Streamlit — Web application</li></ul><p><strong>Sample code</strong></p><pre>from langchain.chains import APIChain<br>from langchain.llms import GPT4All<br>from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler<br>import streamlit as st<br>from langchain.callbacks.base import BaseCallbackHandler</pre><pre>API_DOCS = &quot;&quot;&quot;API documentation:<br>Endpoint: https://api.themoviedb.org/3<br>GET /search/movie<br><br>This API is for searching movies.<br><br>Query parameters table:<br>language | string | Pass a ISO 639-1 value to display translated data for the fields that support it. minLength: 2, pattern: ([a-z]{2})-([A-Z]{2}), default: en-US | optional<br>query | string | Pass a text query to search. This value should be URI encoded. minLength: 1 | required<br>page | integer | Specify which page to query. minimum: 1, maximum: 1000, default: 1 | optional<br>include_adult | boolean | Choose whether to include adult (pornography) content in the results. default | optional<br>region | string | Specify a ISO 3166-1 code to filter release dates. Must be uppercase. pattern: ^[A-Z]{2}$ | optional<br>year | integer  | optional<br>primary_release_year | integer | optional<br><br>Response schema (JSON object):<br>page | integer | optional<br>total_results | integer | optional<br>total_pages | integer | optional<br>results | array[object] (Movie List Result Object)<br><br>Each object in the &quot;results&quot; key has the following schema:<br>poster_path | string or null | optional<br>adult | boolean | optional<br>overview | string | optional<br>release_date | string | optional<br>genre_ids | array[integer] | optional<br>id | integer | optional<br>original_title | string | optional<br>original_language | string | optional<br>title | string | optional<br>backdrop_path | string or null | optional<br>popularity | number | optional<br>vote_count | integer | optional<br>video | boolean | optional<br>vote_average | number | optional&quot;&quot;&quot;</pre><pre>def settings():<br><br> callbacks = [StreamingStdOutCallbackHandler()]<br><br>    # LLM (Place your model into models directory).<br>    llm = GPT4All(model=&quot;models/WizardLM-7B-uncensored.ggmlv3.q8_0.bin&quot;, max_tokens=800, backend=&#39;gptj&#39; ,callbacks=callbacks,verbose=false)<br><br>    access_token = &quot;YOUR_API_ACCESS_TOKEN&quot; #Retrieve the access token for your APIs dynamically.<br>    headers = {&quot;Authorization&quot; : f&quot;Bearer {access_token}&quot; }<br>    <br>    #Create an APIChain to interpret the input prompt using API DOCS and LLM.<br>    chain = APIChain.from_llm_and_api_docs(llm, API_DOCS, headers=headers, verbose=True)<br><br>    return chain<br><br>class StreamHandler(BaseCallbackHandler):<br>    def __init__(self, container, initial_text=&quot;&quot;):<br>        self.container = container<br>        self.text = initial_text<br><br>    def on_llm_new_token(self, token: str, **kwargs) -&gt; None:<br>        self.text += token<br>        self.container.info(self.text)<br><br><br>class PrintRetrievalHandler(BaseCallbackHandler):<br>    def __init__(self, container):<br>        self.container = container.expander(&quot;Context Retrieval&quot;)<br><br>    def on_retriever_start(self, query: str, **kwargs):<br>        self.container.write(f&quot;**Question:** {query}&quot;)<br><br>    def on_retriever_end(self, documents, **kwargs):<br>        # self.container.write(documents)<br>        for idx, doc in enumerate(documents):<br>            source = doc.metadata[&quot;source&quot;]<br>            self.container.write(f&quot;**Results from {source}**&quot;)<br>            self.container.text(doc.page_content)<br><br><br>    st.header(&quot;`Interacting with APIs`&quot;)<br><br>    # Make APIChain <br>    if &#39;chain&#39; not in st.session_state:<br>        st.session_state[&#39;chain&#39;] = settings()<br>    chain = st.session_state.chain<br><br>    # User input <br>    question = st.text_input(&quot;`Ask a question:`&quot;)<br>    <br>    if question:<br>    <br>        # Generate answer (Make an API call with input from prompt used to <br>        # create request payload or request params or query params or <br>        # path params<br><br>        qa_chain = chain.run(question)<br>    <br>        # Write answer and sources<br>        retrieval_streamer_cb = PrintRetrievalHandler(st.container())<br>        answer = st.empty()<br>        answer.info(&#39;`Answer:`\n\n&#39; + qa_chain)</pre><p>Another reference example for an API docs using path params</p><pre>PATH_PARAM_API_DOCS = &quot;&quot;&quot;API documentation:<br>Endpoint: https://api.themoviedb.org/3<br>GET /movie/{movie_id}<br>Get the top level movie details of a movie by ID.<br>Path parameters table:<br>Parameter Format Required Default Description<br>movie_id integer Yes Movie ID<br>Response schema (JSON object):<br>poster_path | string or null | optional<br>adult | boolean | optional<br>overview | string | optional<br>release_date | string | optional<br>genre_ids | array[integer] | optional<br>id | integer | optional<br>original_title | string | optional<br>original_language | string | optional<br>title | string | optional<br>backdrop_path | string or null | optional<br>popularity | number | optional<br>vote_count | integer | optional<br>video | boolean | optional<br>vote_average | number | optional&quot;&quot;&quot;</pre><p><strong>ToDo</strong></p><p>I was looking for a program or library that could convert the json or yaml format of the Open API specification into markdown-style text documentation. but haven’t yet found success.</p><p><strong>References</strong></p><p><a href="https://python.langchain.com/docs/use_cases/apis">Interacting with APIs | 🦜️🔗 Langchain</a></p><p>If you like reading it, please clap and share.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30c903141d32" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enable AI-powered search on your public websites.]]></title>
            <link>https://sujit-udhane.medium.com/enable-ai-powered-search-on-your-public-websites-f0c89dd0a32e?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0c89dd0a32e</guid>
            <category><![CDATA[ai-search-engine]]></category>
            <category><![CDATA[ai-powered-search]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[search]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Mon, 28 Aug 2023 18:20:28 GMT</pubDate>
            <atom:updated>2023-08-28T18:20:28.027Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*bbnwYZXr2DHgGaWGG8ovAA.jpeg" /></figure><h3><strong>Three steps to complete the task</strong></h3><h4>Step#1 : Google custom search API configuration</h4><p>Please read the section titled “Setting Up a CSE” from the url — <a href="https://thepythoncode.com/article/use-google-custom-search-engine-api-in-python">https://thepythoncode.com/article/use-google-custom-search-engine-api-in-python</a></p><p>Following this process will provide you Google API Key and Google CSE ID.</p><blockquote>The <strong>GoogleSearchAPIWrapper </strong>library from the Python package L<strong>angChain </strong>will use these two values.</blockquote><p>To learn more, visit the website <a href="https://python.langchain.com/docs/integrations/tools/google_search">https://python.langchain.com/docs/integrations/tools/google_search</a>.</p><h4>Step#2 : Running private LLM (such as ) and vector store (Chroma DB)</h4><p>Sample python code as below</p><pre>def settings():<br><br>    # Vectorstore<br>    import faiss<br>    from langchain.vectorstores import Chroma<br>    from langchain.embeddings import HuggingFaceEmbeddings<br>    from langchain.chat_models.openai import ChatOpenAI<br>    from langchain.utilities import GoogleSearchAPIWrapper <br>    <br>    model_name = &quot;sentence-transformers/all-MiniLM-L6-v2&quot;<br>    model_kwargs = {&#39;device&#39;: &#39;cpu&#39;}<br>    encode_kwargs = {&#39;normalize_embeddings&#39;: False}<br>        <br>    # Vectorstore<br>    vectorstore = Chroma(<br>     embedding_function=HuggingFaceEmbeddings(<br>       model_name=model_name,<br>       model_kwargs=model_kwargs,<br>       encode_kwargs=encode_kwargs<br>       ), persist_directory=&quot;./chroma_db_oai&quot;<br>    )<br>    <br>    # LLM<br>    llm = ChatOpenAI(temperature=0, streaming=True)<br>    <br>    # Search<br>    search = GoogleSearchAPIWrapper()<br>    <br>    # Initialize <br>    web_retriever = WebResearchRetriever.from_llm(<br>        vectorstore=vectorstore,<br>        llm=llm, <br>        search=search, <br>        num_search_results=3<br>    )<br>    <br>    return web_retriever, llm</pre><p>To learn more, visit the website — <a href="https://python.langchain.com/docs/modules/data_connection/retrievers/web_research">https://python.langchain.com/docs/modules/data_connection/retrievers/web_research</a></p><h4>Step#3 : Running a Streamlit-based webapp to take a search query as an input and return the response</h4><p><strong>Benefits of the solution :</strong></p><ul><li>LLM and Knowledgebase will operate in your managed infrastructure, preventing data loss.</li><li>The Google custom search API handles data scraping.</li><li>In addition to lexical searching (keyword matching), users have the ability to use semantic searching (a search with meaning).</li><li>Increased observability is due to your choice of open source frameworks.</li></ul><p><strong>Limitations of the solution :</strong></p><ul><li>Google’s custom search API has a daily cap for free usage; any hits beyond the cap will be charged.</li><li>Google’s custom search API doesn’t work with intranet websites like Confluence and GitHub.</li></ul><p><strong>References :</strong></p><ol><li><a href="https://blog.langchain.dev/automating-web-research/">https://blog.langchain.dev/automating-web-research/</a></li><li><a href="https://github.com/langchain-ai/web-explorer.git">https://github.com/langchain-ai/web-explorer.git</a></li></ol><p>If you enjoyed the article, please share and clap for it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0c89dd0a32e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a private ChatGPT on an enterprise knowledge base.]]></title>
            <link>https://sujit-udhane.medium.com/build-a-private-chatgpt-on-an-enterprise-knowledge-base-2c37c6ab9d31?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c37c6ab9d31</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[privategpt]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sun, 11 Jun 2023 03:35:04 GMT</pubDate>
            <atom:updated>2023-06-11T03:35:04.565Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>1.Business scenario :</strong> Information is dispersed over various locations at the enterprise level, including corporate wikis, public websites, OneDrive, a personal email account, SharePoint, and a few more. Finding the appropriate information in a format that is easy for people to grasp is difficult due to the complexity at the business level, different contributors, and multiple versions of the document. This becomes a difficult undertaking, especially for those who are new to the company or for end users who need to get the pertinent information fast in order to go forward. Users either take longer to find the necessary information or take the appropriate action in this situation or give up.</p><p><strong>2.Solution :</strong> A centralised knowledge store that gathers both structured and unstructured material and makes it accessible to end users in the form of questions and answers.</p><p><strong>3.High level view of Solution:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*RTFWpscOO0Uk7RBGXlKk8A.png" /><figcaption>High level diagram — Private GPT for Enterprise Knowledge Base</figcaption></figure><p><strong>4.Prerequisites to try out the solution:</strong> Previous knowledge of a programming language. No matter if you have prior expertise in the AI/ML space.</p><p><strong>5.GitHub URL of the solution</strong> — <a href="https://github.com/imartinez/privateGPT">https://github.com/imartinez/privateGPT</a></p><p><strong>6.Follow the steps mentioned in the ReadMe file</strong> (those are very well documented).</p><p>Step-1 : Bring all material into blob or file storage. Whenever you want to bring in new documents, this step needs to be performed. A data pipeline-type solution will be a nice idea to make this happen.</p><p>Step-2 : Data ingestion is used to load data into an AI-native embedded database.</p><p>If you follow the ReadMe file from the cloned Git repo, then there’s a step where you need to execute on the command line: python ingest.py.</p><p>Step-3 : Run the Python application to accept question prompts on the CLI.</p><p>If you follow the ReadMe file from the cloned Git repo, then there’s a step where you need to execute on the command line: python privateGPT.py.</p><p><strong>You can now begin testing your own GPT against your company’s knowledge base there.</strong></p><p>Step-4 (Optional):</p><p>The CLI approach will limit how many users may access your solution, making it unsuitable as a living strategy. Therefore, you must create a web application for your chat program in order to make it accessible over the internet.</p><p>This GitHub URL will enable you to do that — <a href="https://github.com/SamurAIGPT/privateGPT">https://github.com/SamurAIGPT/privateGPT</a>.</p><p>Finally, the outside world may mine your corporate knowledge store for valuable information.</p><p><strong>7.It’s beneficial to be familiar with a few key GPT keywords.</strong></p><blockquote><strong>Pre-trained Models:</strong> Pre-trained models, such as GPT or BERT, are trained on vast amounts of data to learn patterns and relationships within the data. These models capture general knowledge and can be fine-tuned for specific tasks. They excel at tasks like natural language processing, image recognition, or recommendation systems.</blockquote><blockquote><strong>AI-Native Embedded Database:</strong> An AI-native embedded database is specifically designed to optimize data storage, retrieval, and processing for AI applications. It offers features such as efficient indexing, real-time data processing, scalability, and integration with AI frameworks.</blockquote><blockquote><strong>LangChain</strong> is a framework for developing applications powered by language models.</blockquote><blockquote><strong>SentenceTransformers</strong> is a Python framework for state-of-the-art sentence, text and image embeddings.This framework may be used to construct sentence and text embeddings for more than 100 different languages. Then, to identify sentences with a shared meaning, these embeddings can be compared, for instance, using cosine-similarity. For semantic textual similarity searches, semantic search, or paraphrase mining, this is helpful.</blockquote><p><strong>8. Advantages of the Solution</strong></p><blockquote><strong>Prevent data loss</strong>. The network of the organisation will continue to house all sensitive data.</blockquote><blockquote>Choices available with <strong>trained models are many</strong>. The emphasis can change from creating or training the models to resolving business issues.</blockquote><blockquote>The <strong>privateGPT </strong>framework is well-liked and has more than 29k stars on GitHub.</blockquote><blockquote><strong>Various models are simple to configure.</strong> I conducted the experiment using GPT4All, an open-source substitute for ChatGPT from OpenAI.</blockquote><p><strong>9.References</strong></p><p><a href="https://medium.com/@imicknl/how-to-create-a-private-chatgpt-with-your-own-data-15754e6378a1">https://medium.com/@imicknl/how-to-create-a-private-chatgpt-with-your-own-data-15754e6378a1</a></p><p>In the following article, I’ll discuss some other well-liked frameworks for creating Chat GPT-style applications.</p><p>I hope the article was helpful to you. If so, give a round of applause.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c37c6ab9d31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stateful application — State management in Kubernetes in real-time.]]></title>
            <link>https://sujit-udhane.medium.com/stateful-application-state-management-in-kubernetes-in-real-time-27d2862efff4?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/27d2862efff4</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[k8s]]></category>
            <category><![CDATA[headless-service]]></category>
            <category><![CDATA[kubernetes-stateful]]></category>
            <category><![CDATA[stateful-microservices]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sat, 06 Nov 2021 10:43:11 GMT</pubDate>
            <atom:updated>2021-11-06T10:43:11.385Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stateful application — State management in Kubernetes in real-time.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*2odW_A9R7F3R7JSyW7Vd-Q.jpeg" /></figure><p><strong>Scenario: </strong>Ideally, in the modern era, applications (services/microservices) should be stateless. But, there are few scenarios that arise which force the applications to become stateful. Typical example is, you do have a tiny data set (going through less updates), you would like to hold onto a memory (like embedded cache) and you want to avoid a separate cache server to manage complexity of your infrastructure.</p><p><strong>Challenge: </strong>In the Kubernetes world, if you keep on changing the number of pods (stateful application pods), managing the state data/information across different pods in real-time.</p><p><strong>Solution: </strong>Creating a headless service.</p><blockquote>A headless service is a service with a service IP but instead of load-balancing it will return the IPs of the associated Pods. This allows us to interact directly with the Pods instead of a proxy. It’s as simple as specifying <strong>None </strong>for .spec.clusterIP and can be utilized with or without selectors — you’ll see an example with selectors in a moment.</blockquote><p>Below are Kubernetes artifacts</p><ol><li>Application deployment descriptor file</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mAOnl7EdqRb7DjM9DgLMjw.png" /></figure><p>2. Application service descriptor file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jeb_3ktJmXnSmZwwCEJbUg.png" /></figure><p>3. Headless service descriptor file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IxLGEtYZyweblJuR9YOOQ.png" /></figure><p><strong>Usage: </strong>Generally embedded cache solutions like Infinispan, Hazelcast, Redis can be managed through this way.</p><p>If you found the article useful, please clap.</p><p><strong>References:<br>1. </strong><a href="https://dev.to/kaoskater08/building-a-headless-service-in-kubernetes-3bk8">https://dev.to/kaoskater08/building-a-headless-service-in-kubernetes-3bk8</a><br><strong>2. </strong><a href="https://kubernetes.io/docs/tutorials/stateful-application/cassandra/">https://kubernetes.io/docs/tutorials/stateful-application/cassandra/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27d2862efff4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Source code branching strategy and DevSecOps Pipeline at different stages of CI/CD]]></title>
            <link>https://medium.com/codex/source-code-branching-strategy-and-devsecops-pipeline-at-different-stages-of-ci-cd-6e14f2cdf9c9?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e14f2cdf9c9</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[build-pipeline]]></category>
            <category><![CDATA[branching-strategy]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sun, 08 Aug 2021 19:39:27 GMT</pubDate>
            <atom:updated>2021-08-17T08:51:55.126Z</atom:updated>
            <content:encoded><![CDATA[<h4>Source code branch naming conventions</h4><p><strong>Master branch </strong>— All production grade/released source code maintained in the branch. Tags marked for production releases.</p><p><strong>Dev branch </strong>— Development branch, having source code available for QA testing. Tags marked for business user verification/testing.</p><p><strong>Feature branch — </strong>Feature branch used by developer(s) for developing features or fixing non-blocker bugs. After successful verification on the Dev environment, the branch should be merged with the Dev branch and this branch should get deleted.</p><p><strong>Release branch — </strong>Tagged development branch, which can be used for business verification. After successful verification, if any fixes, should be merged with the Master and Dev branch.</p><p><strong>Hot-fix branch — </strong>Should be forked from tagged master branch, which can be used for fixing critical blocker issues/bugs. After successful verification of fix(es), the branch should be merged with the Master and Dev branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ZNp-_E2F93Ob4a3bvli5A.jpeg" /><figcaption>Step-1 Pipeline for developer, to verify their feature(s) or fix(es)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F-QuLqo7-NJwiJzQfDm_Eg.jpeg" /><figcaption>Step-2 Pipeline for QA, to run automation suit(s) to fix the current stage of potential release candidate.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbO00coEupyEhLUJBacVCw.jpeg" /><figcaption>Step-3 Pipeline for business users, to verify to be released candidate.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IDSmavkSIkpiZ74o7N30gQ.jpeg" /><figcaption>Bigger picture of scm branches and pipelines.</figcaption></figure><p>Small intro about the steps/stages mentioned in pipeline</p><p><strong>1. Code Scanner</strong></p><p>Static analysis tools, also known as code scanners, rapidly look at code and find common errors that lead to security bugs. The tools identify the common problem patterns, alert developers to them and provide suggestions on how to fix the problems. These tools will not take care of underlying design flaws, but they often help developers avoid many security bugs in code long before that code is turned over to testers or is put into production.</p><p>Tools</p><p>Java — SonarQube</p><p>JavaScript — SonarQube, LogRocket</p><p>NodeJS — DeepScan, LogRocket</p><h4>2. Linter/Formatter</h4><p>Linters and formatters are useful tools that allow you to check, detect errors, and modify your source code, helping you to follow coding patterns with your development team. You can achieve a source code that is legible, readable, less polluted, and easier to maintain by incorporating a linter tool into your project.</p><p>Tools</p><p>Java — PMD, CheckStyle</p><p>JavaScript — ESLint, JSLint, JSHint</p><p>NodeJS — ESLint</p><h4>3. SAST</h4><p>SAST is a type of <strong>white-box security test</strong>.</p><p>Uncover Common Weakness Enumerations (CWEs) in source code, including custom code, components, and libraries and open source code and components.</p><p>Identify both security and quality flaws in code and provide remediation advice.</p><p>Help ensure compliance to a wide variety of embedded quality, reliability, and security standards by identifying specific vulnerabilities listed in these standards.</p><p>Tools</p><p>i) <a href="https://www.synopsys.com/glossary/what-is-sast.html">https://www.synopsys.com/glossary/what-is-sast.html</a></p><p>ii) <a href="https://docs.gitlab.com/ee/user/application_security/sast/">https://docs.gitlab.com/ee/user/application_security/sast/</a></p><h4>4. Unit testing &amp; test coverage (Code coverage)</h4><p>Code coverage is a measure that describes the degree of which the source code of the program has been tested.</p><p>Code coverage provides information about whether, and optionally how often certain parts of an application have been executed. It’s commonly used to determine how thoroughly a test suite exercises a particular codebase.</p><p>Tools</p><p>Java — JUnit, Spring Unit. JoCoCo &amp; Cobertura for code coverage</p><p>JavaScript — Jest, Jasmine</p><p>NodeJS — Mocha, Chai</p><h4>5. License Scanning</h4><p>A typical software project often reuses hundreds of third-party packages. License and origin information is not always easy to find and not normalized.</p><p>Tools</p><p>i) <a href="https://snyk.io/product/open-source-license-compliance/">https://snyk.io/product/open-source-license-compliance/</a></p><p>ii) <a href="https://github.com/fossology/fossology">https://github.com/fossology/fossology</a></p><p>iii) <a href="https://github.com/nexB/scancode-toolkit">https://github.com/nexB/scancode-toolkit</a></p><h4>6. Automation Testing</h4><p>As the name suggests. Automation testing takes software testing activities and executes them via an automation toolset or framework. In simple words, it is a type of testing in which a tool executes a set of tasks in a defined pattern automatically.</p><p>It takes the pressure off manual testers, and allows them to focus on higher-value tasks — exploratory tests, reviewing test results, etc. Essentially, a machine takes over and implements mundane, repetitive, time-confusing tasks such as regression tests. Automation testing is essential to achieving greater test coverage within shorter timelines, as well as greater accuracy of results</p><p><strong>What tests should be automated?</strong></p><p>Before creating an test automation strategy, let’s have a look at which tests are most feasible for automation:</p><ul><li>Regression Testing: Regression suites are ever-increasing, and require the same variables to be filled numerous times to ensure that new features do not tamper with older functions. This can easily be automated.</li><li>Testing of complex functionalities: Automate all tests requiring complex calculations, something prone to human error.</li><li>Smoke testing: Run automated suites to verify the quality of major functionalities. This saves time by offering a quick analysis of whether a build requires more in-depth testing.</li><li>Data-driven testing: Automate tests to validate functionalities that must be tested repeatedly with numerous data sets.</li><li>Performance testing: Automate tests that monitor software performance under different circumstances. Doing this manually would be extremely painstaking and time-consuming.</li><li>Functional testing: Every time a developer submits a PR, functional testing needs to be executed quickly and provide immediate feedback. This is impossible to achieve without automation, especially as organizations scale up.</li></ul><p>Tools</p><p>i)<a href="https://www.selenium.dev/">https://www.selenium.dev/</a></p><p>ii)<a href="https://cucumber.io/">https://cucumber.io/</a></p><p>iii)<a href="https://rest-assured.io/">https://rest-assured.io/</a></p><h4>7. Performance Testing</h4><p>While load testing is essential in the production environment, integrating it with CI/CD pipeline can drastically reduce the time and efforts required for performance testing. It is essential to script all possible transactions scripted in the most realistic way and test them for different load scenarios.</p><p>Your build may pass all the functional tests, but what about performance? If you ship code without performing Load testing, it might have an adverse effect and bog down your website when high traffic is coming. Deploying a build with CI/CD pipeline is only the half work done in terms of overall performance — Your build also should be able to meet all performance criteria that you have been maintaining since its release. If you are doing it after it is deployed, you miss the most important part: your user experience.</p><p>Understanding how your application will behave in the production requires you to perform load testing to get an overall idea about your application’s performance under stress. It is the key to any successful application.</p><p>Tools</p><p>i)<a href="https://jmeter.apache.org/">https://jmeter.apache.org/</a></p><h4>8. DAST</h4><p>DAST, sometimes called a web application vulnerability scanner, is a type of <strong>black-box security test</strong>. It looks for security vulnerabilities by simulating external attacks on an application while the application is running. It attempts to penetrate an application from the outside by checking its exposed interfaces for vulnerabilities and flaws.</p><p>The dynamic part of DAST’s name comes from the test being performed in a dynamic environment. Unlike SAST, which scans an application’s code line by line when the application is at rest, DAST testing is executed while the application is running. This is not to say that testing is performed while the application is in production. While DAST can be used in production, testing usually is carried out in a QA environment.</p><p>DAST is extremely good at finding externally visible issues and vulnerabilities. This includes a number of security risks from OWASP’s top ten, such as cross-site scripting, injection errors like SQL injection or command injection, path traversal, and insecure server configuration.</p><p>One of DAST’s advantages is its ability to identify runtime problems, which is something SAST can’t do in its static state. DAST is excellent at finding server configuration and authentication problems, as well as flaws that are only visible when a known user logs in.</p><p>Tools</p><p>i)<a href="https://www.synopsys.com/glossary/what-is-dast.html">https://www.synopsys.com/glossary/what-is-dast.html</a></p><p>ii)<a href="https://www.acunetix.com/product/acunetix360/">https://www.acunetix.com/product/acunetix360/</a></p><h4>9. Smoke Testing</h4><ul><li>All the show stoppers in the build will get identified by performing smoke testing.</li><li>Smoke testing is done after the build is released to QA or Business Users. With the help of smoke testing, most of the defects are identified at initial stages of software development.</li><li>With smoke testing, we simplify the detection and correction of major defects.</li><li>By smoke testing, the QA team can find defects to the application functionality that may have surfaced by the new code.</li><li>Smoke testing finds the major severity defects.</li></ul><p>This can be sub-set of testcases used in Automation.</p><h4>10. IAST</h4><p>Interactive application security testing solutions help organizations identify and manage security risks associated with vulnerabilities discovered in running web applications using dynamic testing (often referred to as runtime testing) techniques. IAST works through software instrumentation, or the use of instruments to monitor an application as it runs and gather information about what it does and how it performs. IAST solutions instrument applications by deploying agents and sensors in running applications and continuously analyzing all application interactions initiated by manual tests, automated tests, or a combination of both to identify vulnerabilities in real time.</p><p>Tools</p><p>i) <a href="https://www.synopsys.com/glossary/what-is-iast.html">https://www.synopsys.com/glossary/what-is-iast.html</a></p><p>ii)<a href="https://www.acunetix.com/product/acunetix360/">https://www.acunetix.com/product/acunetix360/</a></p><p>If you find the article useful, please clap. Thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e14f2cdf9c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codex/source-code-branching-strategy-and-devsecops-pipeline-at-different-stages-of-ci-cd-6e14f2cdf9c9">Source code branching strategy and DevSecOps Pipeline at different stages of CI/CD</a> was originally published in <a href="https://medium.com/codex">CodeX</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cheatsheet — Cloud Agnostic Tools]]></title>
            <link>https://sujit-udhane.medium.com/cheatsheet-cloud-agnostic-tools-21ec17ac6c23?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/21ec17ac6c23</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[cloud-agnostic]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[gcp]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sat, 06 Mar 2021 17:07:06 GMT</pubDate>
            <atom:updated>2021-03-06T17:07:06.970Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cheatsheet — Cloud Agnostic Tools</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*kvDEeSxoWk14P28_qch-BA.gif" /><figcaption>Infra Stack for Cloud Agnostic Solution</figcaption></figure><p>Choice for PaaS against IaaS mainly depends on -</p><ul><li>Capability DevSecOps of the team to address concerns like Availability/Reliability/Scalability/Observability/Security/etc.</li><li>Cost (Infra + PaaS offering) vs Cost (Infra)+DevSecOps professionals pay</li><li>Overall size of the Infrastructure.</li></ul><p>Sharing cheatsheet with you for cloud agnostic platform/solution.</p><h3><strong>SERVER/MIDDLEWARE/CONTAINERS</strong></h3><p><strong>Cloud- </strong>OpenShift AWS Azure GCP</p><p><strong>Infrastructure as a Code- </strong>Terraform</p><p><strong>Infrastructure Configuration- </strong>Ansible</p><p><strong>Web Servers- </strong>Nginx Apache</p><p><strong>Container- </strong>Docker</p><p><strong>Container Management-</strong> Kubernetes</p><p><strong>Service Discovery-</strong> Eureka Kong Istio Consul</p><p><strong>API Gateway</strong>, Kong Zuul Spring Cloud</p><p><strong>Secrete Management Key Vault- </strong>Vault Keycloak</p><p><strong>Message Queue-</strong> Kafka ActiveMQ RabbitMQ</p><p><strong>API Manager-</strong> WSO2</p><h3><strong>DATABASES</strong></h3><p><strong>Relational Database-</strong> PostgreSQL MySQL</p><p><strong>NoSQL — DocumetDB-</strong> MongoDB OrientDB</p><p><strong>NoSQL — Key/Value DB-</strong> Redis Couche Ignite</p><p><strong>NoSQL — Columnar DB-</strong> Cassandra HBase</p><p><strong>NoSQL — GraphDB-</strong> Neo4J OrientDB</p><p><strong>Search Database- </strong>ElasticSearch MongoDB Solr</p><p><strong>Time Series Database-</strong> InfluxDB</p><h3><strong>MONITORING/OBSERVABILITY</strong></h3><p><strong>Logs Collector-</strong> Logstash FluentD</p><p><strong>Logs Aggregator- </strong>ElasticSearch</p><p><strong>Logs Viewer + Log Query-</strong> GrayLogs Kibana</p><p><strong>System Metrics Monitoring-</strong> Grafana Prometheus Mesos</p><p><strong>System Housekeeping Jobs + Batch Scheduler-</strong> AirFlow</p><p><strong>Microservices Monitoring-</strong> PM2</p><p><strong>Client side logs Monitoring-</strong> Sentry</p><p>If you like the article, please clap for it. Also, share the article with your friends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21ec17ac6c23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distributed Microservices Transaction — Orchestrator & Choreographer Saga]]></title>
            <link>https://sujit-udhane.medium.com/distributed-microservices-transaction-orchestrator-choreographer-saga-b2230b1dd116?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2230b1dd116</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[saga]]></category>
            <category><![CDATA[microservices-pattern]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sun, 21 Feb 2021 09:01:58 GMT</pubDate>
            <atom:updated>2021-02-21T09:01:58.134Z</atom:updated>
            <content:encoded><![CDATA[<h3>Distributed Microservices Transaction — Orchestrator &amp; Choreographer Saga</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*y44O3jLgDdf33UwmwenRCQ.gif" /></figure><p><strong>Problem Statement :- Transaction management in online reservation system.</strong></p><p><strong>What is Saga?</strong><br>- Saga is long story with multiple events. Here, a saga is a sequence of local transactions.</p><p><strong>Design Patterns:-</strong> Orchestrator Saga, Choreographer Saga<br><strong>Domains:-</strong> Reservation Details, Inventory Details, Payment Details <br><strong>Commands:-</strong> Inventory Blocked, Reservation Captured, Customer Validated, Payment Processed.<br><strong>Orchestrator Saga Class:-</strong> Reservation Saga<br><strong>Services:-</strong> Reservation, Inventory, Customer, Payment</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*UAN56QL35sRi8TbjNtlNpA.jpeg" /><figcaption>Choreographer Saga</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/1*Z0Q-NMSoElBg9yvbmVeM_Q.jpeg" /><figcaption>Orchestrator Saga</figcaption></figure><p>If you like the article, please clap for it. Also, share the article with your friends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2230b1dd116" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High Level Design — Native cloud & Microservices based application]]></title>
            <link>https://sujit-udhane.medium.com/high-level-design-native-cloud-microservices-based-application-9ac3e8893b6e?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ac3e8893b6e</guid>
            <category><![CDATA[microservice-architecture]]></category>
            <category><![CDATA[native-cloud-stories]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[high-level-design]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sun, 14 Feb 2021 07:47:53 GMT</pubDate>
            <atom:updated>2021-02-14T07:47:53.468Z</atom:updated>
            <content:encoded><![CDATA[<h3>High Level Design — Native cloud &amp; Microservices based application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*-9Om7fkHdxVoFhBom5zn8A.jpeg" /></figure><p><strong>1.Microservices architecture</strong><br>- Async communication between Microservices through Message Queue (Design Pattern — Event Sourcing).<br>- Sync communication between Microservices through API Gateway.<br>- Separate Write DB per domain/business functionality.</p><p><strong>2.SaaS Design </strong><br>- Separate DB for each tenant.</p><p><strong>3.Improved read performance of system</strong><br>- Design Pattern — Materialized View.</p><p><strong>4.Security </strong><br>-Web Firewall (WAF)<br>-DDoS attack prevention<br>-Encryption at rest (DB Layer)<br>-Virtual Private Network<br>-NAT Rules<br>-KeyVault (for securing secretes/credentials)</p><p><strong>5.Cloud PaaS Offerings </strong><br>-Message Queue<br>-API Gateway <br>-Kubernetes Cluster<br>-Database cluster<br>-Load Balancer<br>-CDN<br>-Cache<br>-Search database cluster<br>-Unified Logs Aggregator</p><p><strong>6.Middleware</strong><br>-Security checks like Token Validation/Access Control<br>-Target Resolvers<br>-Unique Http Request Id for Request Traceability<br>-Rate Limiting<br>-HTTP Traffic Analysis</p><p>If you like the article, please clap for it. Also, share the article with your friends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ac3e8893b6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[APICurio — API is everything. API is cure.]]></title>
            <link>https://sujit-udhane.medium.com/apicurio-api-is-everything-api-is-cure-a11e4fcc9a83?source=rss-2428e86219a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a11e4fcc9a83</guid>
            <category><![CDATA[api-design]]></category>
            <category><![CDATA[api-management]]></category>
            <category><![CDATA[api-schema-design]]></category>
            <category><![CDATA[api-cure]]></category>
            <category><![CDATA[api-studio]]></category>
            <dc:creator><![CDATA[Sujit Udhane]]></dc:creator>
            <pubDate>Sun, 07 Feb 2021 11:35:03 GMT</pubDate>
            <atom:updated>2021-02-07T11:35:03.074Z</atom:updated>
            <content:encoded><![CDATA[<h3>APICurio — API is everything. API is cure.</h3><p>1.Apicurio Studio — Key Features</p><ul><li>Web Based</li></ul><p>Design your OpenAPI APIs in a web (browser based) application — no installation necessary.</p><ul><li>Code-optional Design</li></ul><p>Don’t know the OpenAPI specification inside and out? Now you don’t have to!</p><ul><li>Open Source</li></ul><p>The Apicurio Studio is fully open source, hosted on GitHub and actively maintained.</p><p>2.Apicurio Registry — Key Features</p><ul><li>Storage/management of several types of artifacts</li></ul><p>The registry supports adding, removing, and updating the following types of artifacts: <strong>OpenAPI</strong>, <strong>AsyncAPI</strong>, <strong>GraphQL</strong>, <strong>Apache Avro</strong>, <strong>Google protocol buffers</strong>, <strong>JSON Schema</strong>, <strong>Kafka Connect schema</strong>, <strong>WSDL</strong>, <strong>XML Schema (XSD)</strong></p><ul><li>Configurable content rules</li></ul><p>Content evolution (adding and updating artifact content) can be controlled by enabling content rules, including <strong>Validity</strong> and <strong>Compatibility</strong>.</p><ul><li>Multiple storage options</li></ul><p>The registry can be configured to store data in various back-end storage systems depending on use-case, including Kafka, PostgreSQL, and Infinispan (embedded).</p><h3>3.Apicurio Library -</h3><p>The Apicurio Data Models library is a Java and Typescript compatible library that provides reading, writing, analysis, modification, and validation of OpenAPI and AsyncAPI documents. Use this library if you need to support either OpenAPI or AsyncAPI specifications in your own projects.</p><h3>Key Features</h3><p>Parsing into a formal model</p><p>OpenAPI and AsyncAPI content (typically JSON or YAML content) can be parsed into a formal, structured (tree-like) data model, much like XML or other structured content.</p><p>Visitor + Traverser patterns</p><p>Full support for the Visitor design pattern, for both a single <em>Node</em> in the model and also a traversal (up or down) of the full (or partial) document.</p><p>Validation of the model</p><p>Validate all, or only part, of the data model against all of the rules defined in the OpenAPI/AsyncAPI specifications.</p><p>Supports both Java and Typescript</p><p>Use this library in your Java, node.js, or browser based applications! It works the same no matter how you use it.</p><p>Convert OpenAPI 2.0 to OpenAPI 3.0</p><p>Includes a built-in transformer for easily converting older “Swagger” documents into the newer OpenAPI 3 format.</p><p>Robust $ref support</p><p>Provide your own $ref resolver so that the library can properly analyze/validate documents with external references. Also included is a built-in “dereferencer” which can transform a document with external references into one without any (by internalizing all of the refs)!</p><p>Library source code-</p><p><a href="https://github.com/Apicurio/apicurio-data-models">https://github.com/Apicurio/apicurio-data-models</a></p><p><a href="https://www.npmjs.com/package/apicurio-data-models">https://www.npmjs.com/package/apicurio-data-models</a></p><p>4. How to use Apicurio — Step by Step guide</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9y7Oyis0FGoknGDdmfAhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HkSrxFdG3t5ULg2UhNvpqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xJ_3vBPxsp8EGugU6PO_mA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QWqVGbhaX-vQFrf-bMPBHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-DSbriZxchplZQZ1So_LA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RX-3DlNnift9LZbFjoZTJg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9CGkjlUbw5_ZT42-2Q8alg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9MMdbeAmEn2cP-mdV1tQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mt9EwZfEGC4iRAKaRTWS7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92TUU6l22oOYR79sBtYbqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YR3sgeQip12_mVEeu0OZFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEh4uHOhzzfQqzYfRenJPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*41tNVNI9IO-zjW04ioTXGQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-OpCEEuGEDJhJ61XXwcLaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZE7_x1tZYd0uOKTwHom_-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sM5BHhZ9wEY9eyzRahqKHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCUmumeBlTfyvhqDvSx35A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mcu-OPNYZ7XAFaXblUAJhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n7hidgWeGWzrBSbJRgS98Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZyqOynYe49ioOHeLq95cIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7wb7NubOMcq19tRwNJicA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVr15JHAox6ukMt9nby-zw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jWKFlulwomuc3IqJi8mswQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hYpQWEAWF2W3MsUx-BKS1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-MdE4b80QmnjmwR_BGboQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eK7eRyA7xrlEL2Ef1YY6BA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M25imvC0gJS65vZA55B8Nw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iJM2lVZk187Cwjna47to9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e2Lo1svs2heZ2mTPD1f7wg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDNA11IjwngxbTx76ezlHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwlYIWPbrXsz7VQv5aSdcQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8f9AiZ0sXACE65tjYyeHDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vZSa3EbOYdGOlJVP-7ZYBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7WAREwOTuKT57ezW7TAsRA.png" /></figure><p>If you like the article, please clap for it. Also, share the article with your friends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a11e4fcc9a83" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>