<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aadarsh Kannan</title>
    <description>The latest articles on DEV Community by Aadarsh Kannan (@engineeredsoul).</description>
    <link>https://dev.to/engineeredsoul</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F619715%2F61051a57-c7ac-4c8b-ba7b-1231a6bf59cf.JPG</url>
      <title>DEV Community: Aadarsh Kannan</title>
      <link>https://dev.to/engineeredsoul</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/engineeredsoul"/>
    <language>en</language>
    <item>
      <title>Integrating TinyML, GenAI, and Twilio API for Smart Solutions</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Mon, 24 Jun 2024 06:58:40 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/integrating-tinyml-genai-and-twilio-api-for-smart-solutions-4o01</link>
      <guid>https://dev.to/engineeredsoul/integrating-tinyml-genai-and-twilio-api-for-smart-solutions-4o01</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/twilio"&gt;Twilio Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;The goal of this project is to demonstrate the integration of Generative AI (GenAI) in embedded systems and to highlight the ease of accessing AI capabilities via Twilio's API.&lt;/p&gt;

&lt;p&gt;I have integrated a continuous motion recognition system with generative AI that recognizes and tracks motion and uses Twilio's WhatsApp API to alert users and respond to their questions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F553w1xgal3fss10uxgfh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F553w1xgal3fss10uxgfh.png" alt="Project Skeleton" width="800" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Continuous Motion Recognition
&lt;/h3&gt;

&lt;p&gt;Unlike rule-based programming, which struggles with the variability in human gestures, machine learning easily adapts to these differences. &lt;/p&gt;

&lt;p&gt;The Continuous Motion Recognition project using &lt;a href="https://edgeimpulse.com/"&gt;Edge Impulse&lt;/a&gt; leverages advanced ML techniques to enable real-time, on-device motion detection and classification. Edge Impulse, a leading platform for embedded machine learning, provides a comprehensive toolset for collecting data, designing, and deploying custom models directly to edge devices. This project typically involves gathering motion data from sensors such as accelerometers and gyroscopes, then using Edge Impulse to preprocess the data, train models, and optimize them for efficient, low-power inference on microcontrollers or other edge hardware.&lt;/p&gt;

&lt;p&gt;You can follow the &lt;a href="https://docs.edgeimpulse.com/docs/tutorials/end-to-end-tutorials/continuous-motion-recognition"&gt;Continuous motion recognition | Edge Impulse Documentation&lt;/a&gt; tutorial to get started with it. You can view and clone the project &lt;a href="https://studio.edgeimpulse.com/public/432186/live"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, if you have gone through it successfully and deployed it with your firmware and when you run the inference, you will be able to see the real-time recognition of the motion.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgzsh84vv1obvmx3lkfa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbgzsh84vv1obvmx3lkfa.png" alt="Edge Impulse Inference" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Storing the result
&lt;/h3&gt;

&lt;p&gt;For this project, I used &lt;a href="https://xata.io/"&gt;Xata&lt;/a&gt; as the database. I have filtered out the result with the maximum value from each prediction and stored it in the &lt;code&gt;predictions&lt;/code&gt; table. If you are new to Xata, checkout &lt;a href="https://aadarshkannan.vercel.app/posts/Getting-Started-With-Xata/"&gt;Getting started with Xata&lt;/a&gt; guide.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0ay7ybf5nqiuba7t170.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0ay7ybf5nqiuba7t170.png" alt="Xata Table" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Twilio and AI
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Twilio's WhatsApp Messaging Service
&lt;/h4&gt;

&lt;p&gt;Twilio provides access to the WhatsApp Business Platform through its APIs. This allows developers to integrate WhatsApp messaging into their applications. We can leverage familiar Twilio APIs like Programmable Messaging to send and receive messages with text, media, and even certain pre-built templates.&lt;/p&gt;

&lt;p&gt;I have used Python-Flask for creating the server and responding to the incoming messages. You can check out the Twilio documentation on &lt;a href="https://www.twilio.com/docs/messaging/tutorials/how-to-receive-and-reply/python"&gt;Receive and Reply to Incoming Messages - Python&lt;/a&gt; for a better understanding of how it needs to be implemented.&lt;/p&gt;

&lt;h4&gt;
  
  
  Delivering the message
&lt;/h4&gt;

&lt;p&gt;By using the Twilio sandbox, we are able to send and receive messages, create automated responses, and integrate interactive messaging features within a controlled setting.&lt;/p&gt;

&lt;p&gt;When someone replies to one of our messages, we will receive a webhook request from Twilio. So, we need to configure the webhooks by connecting to our server/app. I ran my server using &lt;a href="https://replit.com/"&gt;Replit&lt;/a&gt;. Search for the Flask template and integrate the Twilio API.&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@dotaadarsh/EdgeAIxTwilioxXata?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fopyzl31rjxtului2539z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fopyzl31rjxtului2539z.png" alt="Replit Server" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Google Gemini AI
&lt;/h4&gt;

&lt;p&gt;I used Google's 1.5 Flash Model to generate responses based on predicted data. When a user replies on WhatsApp, the endpoint URL is configured to our server on Replit, which listens for these messages. We then retrieve all records from the database and pass them, along with the user's message, to the Gemini AI for generating a response. The generated response is then sent back to the user on WhatsApp.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cz934uq3pav68e6auay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7cz934uq3pav68e6auay.png" alt="Twilio Whatsapp Response" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focmwjk0neiu712lxe2q6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focmwjk0neiu712lxe2q6.png" alt="Twilio Whatsapp Response" width="800" height="542"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/dotAadarsh"&gt;
        dotAadarsh
      &lt;/a&gt; / &lt;a href="https://github.com/dotAadarsh/EdgeAIxTwilioxGenAI"&gt;
        EdgeAIxTwilioxGenAI
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;EdgeAIxTwilioxGenAI&lt;/h1&gt;

&lt;/div&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/dotAadarsh/EdgeAIxTwilioxGenAI"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.twilio.com/docs"&gt;Twilio Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.edgeimpulse.com/docs"&gt;Edge Impulse Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://xata.io/docs"&gt;Xata Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/api-overview"&gt;Gemini API Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;The primary objective of this project is to demonstrate the use of GenAI in EdgeAI/ML devices. By integrating Twilio's AI, users can now easily analyze ML-predicted data simply by asking questions through WhatsApp. While this project may not directly solve specific problems, it showcases the potential of applying GenAI to predicted data on a large scale.&lt;/p&gt;

&lt;p&gt;Feedback is welcome :)&lt;br&gt;
Thank you for reading and have a great day!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>twiliochallenge</category>
      <category>ai</category>
      <category>twilio</category>
    </item>
    <item>
      <title>Namaste Your Way to Wellness: AI-Powered Yoga Recommendations</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Fri, 21 Jun 2024 15:52:37 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/namaste-your-way-to-wellness-ai-powered-yoga-recommendations-2n3p</link>
      <guid>https://dev.to/engineeredsoul/namaste-your-way-to-wellness-ai-powered-yoga-recommendations-2n3p</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/twilio"&gt;Twilio Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Today is International Yoga Day! Whether you're a seasoned yogi or just dipping your toes into the world of yoga, it's the perfect day to embrace the benefits of this ancient practice. And there's no better way to celebrate than with YogaConnect, your new personalized yoga companion.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://yogaconnect.streamlit.app/"&gt;YogaConnect&lt;/a&gt; is designed to make your yoga journey enjoyable and tailored to your needs. With personalized routines, and helpful wellness tips, YogaConnect ensures you stay motivated and on track. Here’s how YogaConnect can help you make the most out of your yoga practice:&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features of YogaConnect
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Personalized Yoga Recommendations&lt;/strong&gt;&lt;br&gt;
YogaConnect uses AI to analyze your experience level, goals, and any physical limitations to provide personalized yoga poses. Whether you're a beginner, intermediate, or advanced practitioner, YogaConnect tailors routines that fit your unique needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interactive User Interface&lt;/strong&gt;&lt;br&gt;
Built on Streamlit, YogaConnect offers a clean and interactive interface. Easily input your details, view recommendations, and access video tutorials seamlessly, making your yoga journey smooth and enjoyable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Email Follow-Ups&lt;/strong&gt;&lt;br&gt;
To keep you motivated, YogaConnect sends detailed follow-up emails containing your personalized yoga routines and additional wellness tips. Leveraging &lt;a href="https://sendgrid.com/en-us"&gt;Twilio's SendGrid&lt;/a&gt;, these emails are delivered consistently and reliably to keep you engaged and informed.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;How YogaConnect Works&lt;/strong&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1: Tell Us About Yourself
&lt;/h3&gt;

&lt;p&gt;Upon visiting YogaConnect, you’ll be prompted to fill in your details:&lt;br&gt;
Yoga Experience Level: Choose from Beginner, Intermediate, or Advanced.&lt;br&gt;
Yoga Goals: Select your goals such as Flexibility, Strength, or Relaxation.&lt;br&gt;
Physical Limitations: Optionally, you can specify any physical limitations you might have.&lt;br&gt;
Email Address: Provide your email address to receive follow-up emails.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2: Get AI-Powered Recommendations
&lt;/h3&gt;

&lt;p&gt;Once you submit your details, YogaConnect uses Gemini AI engine to generate a list of recommended yoga poses tailored to your profile. This ensures that the yoga routine fits your specific needs and goals.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Watch Video Tutorials
&lt;/h3&gt;

&lt;p&gt;For each recommended pose, YogaConnect fetches a relevant instructional video from YouTube, ensuring you have a clear visual guide to follow. This makes it easier to practice each pose correctly and safely.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Receive Email Delivery
&lt;/h3&gt;

&lt;p&gt;After generating your personalized yoga routine, YogaConnect sends an email to the provided address with all the details. This email includes:&lt;/p&gt;

&lt;p&gt;The name and Sanskrit name of each pose.&lt;br&gt;
The benefits of each pose.&lt;br&gt;
The best time to perform each pose.&lt;br&gt;
Suggestions and tips for each pose.&lt;br&gt;
Links to video tutorials.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;



&lt;p&gt;Check out the &lt;a href="https://yogaconnect.streamlit.app/"&gt;YogaConnect app&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssfhqf00gdoo94whx88p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fssfhqf00gdoo94whx88p.png" alt="YogaConnect Home" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmxw1i7sylutnbzj8ijat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmxw1i7sylutnbzj8ijat.png" alt="YogaConnect Recommendation" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ldiguhh5neagbg0615a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ldiguhh5neagbg0615a.png" alt="YogaConnect Email" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Twilio and AI
&lt;/h2&gt;


&lt;h3&gt;
  
  
  Twilio's SendGrid and Dynamic Templates
&lt;/h3&gt;

&lt;p&gt;Twilio's SendGrid is a cloud-based service that provides a reliable and scalable platform for sending transactional and marketing emails. It is widely used for sending notifications, newsletters, and other automated email communications. SendGrid offers robust features such as analytics, template management, and email deliverability tools.&lt;/p&gt;

&lt;p&gt;Dynamic templates in SendGrid allow you to create email templates with placeholders that can be filled with dynamic data when the email is sent. This feature is particularly useful for sending personalized emails where the content can change based on the recipient's data.&lt;/p&gt;

&lt;p&gt;Here’s how dynamic templates are typically used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a Dynamic Template: In the SendGrid dashboard, create a new email template and define placeholders for the dynamic content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define Template Variables: Use placeholders in the template body, such as &lt;code&gt;{{name}}&lt;/code&gt; or &lt;code&gt;{{yoga_pose}}&lt;/code&gt;, which will be replaced with actual data when the email is sent.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw54w4s1wtvbn2lu7mleq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw54w4s1wtvbn2lu7mleq.png" alt="Sendgrid Dynamic Template" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send Email with Dynamic Data: When sending the email via the SendGrid API, pass the dynamic data in the request to populate the placeholders.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example of Sending Dynamic Emails&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In YogaConnect, we use a dynamic template to send personalized yoga routines. Here’s the code that handles this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def send_dynamic_email(to_emails, email_content):
    FROM_EMAIL = 'FROM_EMAIL'
    TEMPLATE_ID = 'SENDGRID_TEMPLATE_ID'

    message = Mail(
        from_email=FROM_EMAIL,
        to_emails=[to_emails]
    )
    message.dynamic_template_data = {
        'content': email_content
    }
    message.template_id = TEMPLATE_ID

    try:
        sg = SendGridAPIClient(SENDGRID_API_KEY)
        response = sg.send(message)
        print("Dynamic Messages Sent!")
        return "Dynamic Messages Sent!"

    except Exception as e:
        print(f"Error: {e}")
    return "Error sending email"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;TEMPLATE_ID&lt;/strong&gt;: The ID of the dynamic template created in the SendGrid dashboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;dynamic_template_data&lt;/strong&gt;: A dictionary containing the data to replace placeholders in the template.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SendGridAPIClient&lt;/strong&gt;: Used to send the email via the SendGrid API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Google Gemini AI
&lt;/h3&gt;

&lt;p&gt;In YogaConnect, &lt;a href="https://deepmind.google/technologies/gemini/"&gt;Google Gemini AI&lt;/a&gt; is used to generate personalized yoga recommendations based on user input. The model is configured to ensure relevant and accurate responses tailored to each user's needs.&lt;/p&gt;

&lt;p&gt;Using Google AI Studio, I created a Structured Prompt that returns the required parameters in JSON format.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtly9pkr12b3xc87phb6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvtly9pkr12b3xc87phb6.png" alt="Google AI Studio" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's how I configure and use Google Gemini AI in YogaConnect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import google.generativeai as genai

genai.configure(api_key=GEMINI_API_KEY)

generation_config = {
  "temperature": 1,
  "top_p": 0.95,
  "top_k": 64,
  "max_output_tokens": 8192,
  "response_mime_type": "application/json",
}

model = genai.GenerativeModel(
  model_name="gemini-1.5-flash",
  generation_config=generation_config,
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;GEMINI_API_KEY&lt;/strong&gt;: API key for accessing Google Gemini AI services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;generation_config&lt;/strong&gt;: Configuration settings for the model to control the output's creativity and coherence.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;get_ai_recommended_poses&lt;/code&gt; function uses the configured Gemini model to generate yoga pose recommendations based on user input.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Prize Categories
&lt;/h2&gt;

&lt;p&gt;YogaConnect fits the "Impactful Innovators" category by promoting physical and mental well-being through personalized yoga recommendations. By leveraging AI, the app offers tailored yoga practices that cater to individual needs, helping users achieve specific wellness goals such as flexibility, strength, and stress reduction&lt;/p&gt;

&lt;h2&gt;
  
  
  Links/References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://yogaconnect.streamlit.app/"&gt;YogaConnect App&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/dotAadarsh/YogaConnect"&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.twilio.com/docs/sendgrid"&gt;Twilio | SendGrid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/aistudio"&gt;Google AI Studi | Gemini API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.streamlit.io/develop/api-reference"&gt;Streamlit API Reference&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;I will keep on updating the project before the deadline.&lt;br&gt;
Banner credit: &lt;a href="https://storyset.com/people"&gt;People illustrations by Storyset&lt;/a&gt;&lt;br&gt;
Thanks for the read and I appreciate your feedbacks!&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>twiliochallenge</category>
      <category>ai</category>
      <category>twilio</category>
    </item>
    <item>
      <title>Poemly</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Mon, 15 Apr 2024 07:06:21 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/poemly-bgd</link>
      <guid>https://dev.to/engineeredsoul/poemly-bgd</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/devteam/join-us-for-the-cloudflare-ai-challenge-3000-in-prizes-5f99"&gt;Cloudflare AI Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;Welcome to Poemly! Our app harnesses the power of AI to craft beautiful poems tailored to your input. Whether you're seeking inspiration, exploring emotions, or simply curious about the art of poetry, Poemly is here to transform your words into heartfelt verses. With just a few prompts from you, our Cloudflare's Worker AI model delves into the depths of language and creativity to compose unique and evocative poems. &lt;/p&gt;

&lt;p&gt;Experience the magic of poetry like never before with Poemly – your personal muse in the digital age.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://poemly.pages.dev/" rel="noopener noreferrer"&gt;
      poemly.pages.dev
    &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxtj7nr9gpfhc8sc3boq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffxtj7nr9gpfhc8sc3boq.png" alt="Poemly" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--A9-wwsHG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/SanjayAlagappan"&gt;
        SanjayAlagappan
      &lt;/a&gt; / &lt;a href="https://github.com/SanjayAlagappan/poemly"&gt;
        poemly
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      AI based POEM generator
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Poemly&lt;/h2&gt;

&lt;/div&gt;
&lt;p&gt;Our app harnesses the power of AI to craft beautiful poems tailored to your input. Whether you're seeking inspiration, exploring emotions, or simply curious about the art of poetry, Poemly is here to transform your words into heartfelt verses.&lt;/p&gt;
&lt;p&gt;Built on top on &lt;a href="https://developers.cloudflare.com/workers-ai/models/" rel="nofollow"&gt;Cloudflare's AI Models&lt;/a&gt; and hosted on &lt;a href="https://developers.cloudflare.com/pages" rel="nofollow"&gt;Cloudflare Pages&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We have deployed two workers separately. One is for text generation and other one is for image generation.&lt;/p&gt;
&lt;p&gt;To run the project, just clone it and run the server (like: python -m http.server) and thats it. Visit the page, enter your prompts and see the result.&lt;/p&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/SanjayAlagappan/poemly"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;My team and I embarked on the journey of creating a poem generator, and we began by brainstorming ideas to lay the foundation. After much discussion, we outlined the essential parameters required from the user to ensure the effective generation of poems. These parameters include the prompt or theme, the desired length of the poem, the tone of the poem, and the preferred style or form of poetry.&lt;/p&gt;

&lt;p&gt;Then we transitioned to the design phase using Figma. Here, we crafted drafts to visualize the user interface and experience. These drafts serve as blueprints for our project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fesy08uk1kq16bb471ooh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fesy08uk1kq16bb471ooh.png" alt="Poemly Generate Draft Design 1" width="800" height="568"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y5ccd4a1uzpxsxwd5bf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y5ccd4a1uzpxsxwd5bf.png" alt="Poemly Generate Draft Design 2" width="800" height="924"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After experimenting with various AI models available in &lt;a href="https://playground.ai.cloudflare.com/"&gt;Cloudflare's AI model playground&lt;/a&gt;, we settled on a specific prompt that effectively captures the essence of what we aim to achieve: generating personalized poems based on user input.&lt;/p&gt;

&lt;p&gt;To achieve this, we've deployed two &lt;a href="https://developers.cloudflare.com/workers-ai/"&gt;worker AI&lt;/a&gt; models on the backend. One is dedicated to generating text, crafting poetic verses tailored to the given prompt and user inputs. The other focuses on generating images, complementing the poetic experience with visual elements.&lt;/p&gt;

&lt;p&gt;This is the code for the Text-Generation worker AI. We have used &lt;code&gt;@cf/meta/llama-2-7b-chat-fp16&lt;/code&gt; model for it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/index.ts&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;src_default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bodyObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tone&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;bodyObject&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Prompt:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tone&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;system&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You are an assistant helps in generating poems based on the user input. Create a title for the same at the beginning and then the poem.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;tone&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nx"&gt;style&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@cf/meta/llama-2-7b-chat-fp16&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="c1"&gt;// Create a new Response object&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;corsHeaders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access-Control-Allow-Origin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Allow requests from all origins&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access-Control-Allow-Methods&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET, POST, OPTIONS&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Allow GET, POST, and OPTIONS requests&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access-Control-Allow-Headers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="c1"&gt;// Allow the Content-Type header&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;corsHeaders&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;src_default&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="c1"&gt;//# sourceMappingURL=index.js.map&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Multiple Models&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As mentioned, We have used another model: &lt;code&gt;@cf/stabilityai/stable-diffusion-xl-base-1.0&lt;/code&gt; for the image generation. Here is the code for the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/index.ts&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;src_default&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Parse the request body&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bodyObject&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;bodyObject&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Define the inputs for the AI model&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;inputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;prompt&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="c1"&gt;// Run the AI model to generate the image&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;AI&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@cf/stabilityai/stable-diffusion-xl-base-1.0&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;inputs&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;// Create a new Response object&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;corsHeaders&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access-Control-Allow-Origin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Allow requests from all origins&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access-Control-Allow-Methods&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET, POST, OPTIONS&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Allow GET, POST, and OPTIONS requests&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Access-Control-Allow-Headers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="c1"&gt;// Allow the Content-Type header&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="c1"&gt;// Return the response with CORS headers&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;corsHeaders&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;image/png&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;src_default&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We encountered various issues during the development process, particularly with CORS (Cross-Origin Resource Sharing) errors. To address this, we experimented with different methods and configurations. To troubleshoot and test our solutions, we utilized Postman. We got the solution from the Cloudflare Discord Community. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm7gkymxxcf3o7ra0d7qm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm7gkymxxcf3o7ra0d7qm.png" alt="Worker AI Metrics" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxiuezgx8kx8vvrrpbnc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuxiuezgx8kx8vvrrpbnc.png" alt="Cloudflare Discord Community" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cloudflare has been a fascinating new territory for all of us, and this challenge provided a fantastic opportunity to dive into its services and learn extensively. Exploring the Cloudflare ecosystem has been both educational and enjoyable.&lt;/p&gt;

&lt;p&gt;As for Poemly, our journey doesn't end here. There's still more to come. We have planned to create an explore page, where users can see all the generated poems. Unfortunately, due to time constraints, we haven't been able to implement it yet. It's an essential feature that we believe will enrich the Poemly experience and foster a vibrant community of poetry enthusiasts. So, stay tuned!&lt;/p&gt;

&lt;p&gt;Thanks for the read!&lt;/p&gt;

&lt;p&gt;Team members - &lt;a class="mentioned-user" href="https://dev.to/sanjayalagappan"&gt;@sanjayalagappan&lt;/a&gt; &lt;a class="mentioned-user" href="https://dev.to/sibims"&gt;@sibims&lt;/a&gt; &lt;a class="mentioned-user" href="https://dev.to/mohandotdev"&gt;@mohandotdev&lt;/a&gt; &lt;a class="mentioned-user" href="https://dev.to/santoholic"&gt;@santoholic&lt;/a&gt; &lt;/p&gt;

</description>
      <category>cloudflarechallenge</category>
      <category>devchallenge</category>
      <category>ai</category>
    </item>
    <item>
      <title>Optimizing Database Queries - Navigating One-to-Many Relationships with Xata's New Approach</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Sat, 30 Sep 2023 16:05:43 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/optimizing-database-queries-navigating-one-to-many-relationships-with-xatas-new-approach-1eg3</link>
      <guid>https://dev.to/engineeredsoul/optimizing-database-queries-navigating-one-to-many-relationships-with-xatas-new-approach-1eg3</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the realm of database management and API development, one of the most common challenges developers face is optimizing the retrieval of data from one-to-many relationships while avoiding the notorious N+1 problem. 🦋 &lt;a href="https://xata.io/" rel="noopener noreferrer"&gt;Xata&lt;/a&gt;, a cutting-edge database solution, has introduced a new approach to address this issue, making it more efficient and developer-friendly. In this article, we'll delve into Xata's innovative syntax for navigating one-to-many relationships, providing real-world examples to illustrate its advantages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the N+1 Problem
&lt;/h2&gt;

&lt;p&gt;The N+1 problem is a common performance issue that arises when retrieving data from one-to-many relationships in a database. It occurs when you retrieve a collection of primary objects along with their associated objects. For each primary object, an additional query is executed to fetch its associated objects. This can result in a cascade of database queries, leading to significant performance bottlenecks.&lt;/p&gt;

&lt;p&gt;To visualize the N+1 problem, imagine a scenario where you have two related database tables: &lt;code&gt;Authors&lt;/code&gt; and &lt;code&gt;Books&lt;/code&gt;. Each author can have multiple books, and you want to retrieve a list of authors along with their books.&lt;/p&gt;

&lt;p&gt;Here's what the database schema might look like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authors Table:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AuthorID&lt;/th&gt;
&lt;th&gt;AuthorName&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;John Doe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Jane Smith&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;David Johnson&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Books Table:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;BookID&lt;/th&gt;
&lt;th&gt;AuthorID&lt;/th&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;The Great Novel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Mystery Unveiled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Adventure Awaits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Coding Mastery&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now, let's say you want to retrieve a list of authors along with their books using a naive approach that leads to the N+1 problem.&lt;/p&gt;

&lt;p&gt;Naive Query:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieve all authors.&lt;/li&gt;
&lt;li&gt;For each author, retrieve their books.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this scenario, you would end up with multiple queries, specifically N+1 queries, where N is the number of authors. Here's what the sequence of queries would look like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query 1:&lt;/strong&gt; Retrieve all authors&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query 2:&lt;/strong&gt; Retrieve books for AuthorID 1&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query 3:&lt;/strong&gt; Retrieve books for AuthorID 2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Query 4:&lt;/strong&gt; Retrieve books for AuthorID 3&lt;/p&gt;

&lt;p&gt;As you can see, for each author, you execute an additional query to retrieve their books. This is the essence of the N+1 problem: you end up with N+1 queries when you could have ideally retrieved the data in a single query.&lt;/p&gt;

&lt;h2&gt;
  
  
  Xata's Solution: Navigating One-to-Many Relationships
&lt;/h2&gt;

&lt;p&gt;Xata recognized the need for a more efficient approach to navigating one-to-many relationships. To address this challenge, they introduced a new syntax that simplifies the process, eliminates unnecessary round trips, and optimizes performance. Let's explore this approach with the above-mentioned example in the Xata Database. I want you to work on this hands-on and not just learn by seeing the code snippet.&lt;/p&gt;

&lt;p&gt;If you are new to Xata, then I recommend you read the &lt;a href="https://www.aadarshkannan.tech/posts/Getting-Started-With-Xata/" rel="noopener noreferrer"&gt;getting started guide&lt;/a&gt; to understand better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Database
&lt;/h3&gt;

&lt;p&gt;Once you have an account, you can create a new database in your workspace. Provide the name of your database and select a region for it. Then click "Create" and the database is created.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Tables
&lt;/h3&gt;

&lt;p&gt;We need two tables, one is for author and the other for books. So, create a table with the columns &lt;code&gt;name&lt;/code&gt; in the &lt;code&gt;authors&lt;/code&gt; table and &lt;code&gt;title&lt;/code&gt; and &lt;code&gt;author&lt;/code&gt; in the &lt;code&gt;books&lt;/code&gt; table. We don't need to unique author ID since Xata creates a unique ID every time we insert a new value into the table. While defining the &lt;code&gt;author&lt;/code&gt; column in the &lt;code&gt;books&lt;/code&gt; table use the &lt;code&gt;link to table&lt;/code&gt; column type and link it to the &lt;code&gt;authors&lt;/code&gt; table. Once you create you will be able to see the referenced values in the &lt;code&gt;books&lt;/code&gt; table. The below schema will you understand better. Add the authors and book titles like the one above and you can modify it as you wish. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F4iay983e0arldkhppmbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F4iay983e0arldkhppmbf.png" alt="database schema"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Playground
&lt;/h3&gt;

&lt;p&gt;Once you are done with the values. We can now use Xata's playground to understand our problem. Traditionally, you'd fetch authors and then make separate queries for each author's books. Result? N+1 queries, where N is the number of authors. Yikes! Performance bottlenecks and database round trips galore. 😬&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fare86mhy11yfneospyi8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fare86mhy11yfneospyi8.png" alt="xata-n+1-problem-example-1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the new column expressions feature, you can do that in a single request. Just use the &amp;lt;- prefix to indicate the reverse link, and specify the columns you want from the related table. You’ll get a nested JSON document with all the data you need.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;records&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;xata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;authors&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;select&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;-books.author&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;])&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAll&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this query, we specify the columns we want to retrieve, including a column expression that navigates in reverse along the "books" link defined in the "Authors" table. This reverse navigation establishes a one-to-many relationship between authors and books. We also specify which fields from the "Books" table should be included in the query result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F69l3ju5olpmcrfyv0v67.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F69l3ju5olpmcrfyv0v67.png" alt="N+1 Example visualization in Xata Playground"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Xata's Approach
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Elimination of N+1 Problem&lt;/strong&gt;: By using Xata's syntax, we can fetch all the data we need with a single request, avoiding any unnecessary round trips and repetitive code. This approach mitigates the N+1 problem, resulting in significantly improved performance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency&lt;/strong&gt;: Xata's syntax simplifies the process of retrieving related data, making it more developer-friendly. It reduces the complexity of code and ensures that you get exactly the data you want in an efficient manner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Advanced Configuration&lt;/strong&gt;: Xata's approach allows for advanced configuration, such as sorting options and pagination, enabling developers to tailor their queries to specific requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PostgreSQL Implementation&lt;/strong&gt;: Xata has implemented this approach efficiently in PostgreSQL, leveraging subqueries and the &lt;code&gt;json_agg()&lt;/code&gt; function to simplify complex queries, improve query performance, and promote code reusability.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Xata's approach to solving the N+1 problem with its intuitive syntax simplifies the process of &lt;a href="https://xata.io/blog/navigating-many-to-one" rel="noopener noreferrer"&gt;navigating one-to-many relationships&lt;/a&gt;, providing an efficient and developer-friendly solution. By optimizing data retrieval and eliminating unnecessary database round trips, Xata enhances the performance and productivity of applications that rely on complex data relationships. Developers can now focus on building powerful applications without worrying about inefficient queries.&lt;/p&gt;

&lt;p&gt;Thanks for the read!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>serverless</category>
      <category>database</category>
    </item>
    <item>
      <title>CSV Made Easy - Xata's User-Friendly Data Import and Export</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Sat, 30 Sep 2023 15:40:10 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/csv-made-easy-xatas-user-friendly-data-import-and-export-1ho8</link>
      <guid>https://dev.to/engineeredsoul/csv-made-easy-xatas-user-friendly-data-import-and-export-1ho8</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the ever-evolving landscape of data management, Xata is committed to providing a seamless experience for users when it comes to importing and exporting data. Whether you love or hate it, CSV (Comma-Separated Values) remains the world's most popular data format. Recognizing the importance of this format, Xata has taken a significant step forward to enhance your data handling experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Vl_VYbl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/dpqhj9ds4ik10rucl7wl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Vl_VYbl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/dpqhj9ds4ik10rucl7wl.jpg" alt="csv_is_inevitable_meme" width="320" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But how exactly has Xata achieved this feat? In this blog post, we'll explore the new CSV import and export functionality introduced by Xata, showcasing its user-friendly approach using an example. We'll dive into the details of this exciting update, highlighting how it simplifies the process of bringing your own data into Xata. Before exploring this feature, if you are new to Xata, I prefer you to check out Getting tarted with xata post. &lt;/p&gt;

&lt;h2&gt;
  
  
  CSV Challenges
&lt;/h2&gt;

&lt;p&gt;CSV files come in many flavors, with variations in separators and the presence or absence of headers. Handling large files with millions of rows and gigabytes of data is also a common challenge. Additionally, ensuring correct data types during import and providing user-friendly error handling are crucial aspects of a seamless CSV import process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Xata's Solution
&lt;/h2&gt;

&lt;p&gt;Xata has listened to its user community and developed a more user-friendly approach to data importing and exporting via its intuitive user interface (UI). Let's take a closer look at the key features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Support for CSV Variations:&lt;/strong&gt; Xata understands that CSV files can vary significantly. The new UI accommodates different separators and handles scenarios with or without headers gracefully.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficient Handling of Large Files:&lt;/strong&gt; For those dealing with massive datasets, Xata ensures that rows are streamed and processed in batches, without worrying about memory leaks in the browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accurate Data Typing:&lt;/strong&gt; Importing with the correct data types is crucial. Xata's solution intelligently recognizes data types, even if they change within a column throughout the file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User-Friendly Error Handling:&lt;/strong&gt; Nobody wants to encounter vague errors when importing millions of rows. Xata's UI reports errors in a way that's easy to understand, enabling users to quickly address issues.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Hands on
&lt;/h2&gt;

&lt;p&gt;Let's illustrate the power of Xata's CSV import and export features with an &lt;a href="https://dev.tofile_url"&gt;example CSV file&lt;/a&gt;. The CSV file that I am gonna use contains the details of the episodes from Mr. Robot web series. With the new Xata UI, importing this data becomes a breeze.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CSV Import:&lt;/strong&gt; Simply upload your Mr. Robot CSV file or your file through the user-friendly interface. Xata will automatically recognize the data structure, including any variations in separators or headers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RolVZywy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/u0jjm46a191s4wegjiyf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RolVZywy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/u0jjm46a191s4wegjiyf.png" alt="xata-db-ui" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Data Transformation:&lt;/strong&gt; Xata will intelligently identify data types, so even if the file transitions from numeric values to text, it's not a problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vi1Yn4GZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/v0meu923po0gcqwz5ern.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vi1Yn4GZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/v0meu923po0gcqwz5ern.png" alt="xata-csv-import-details" width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Error Handling:&lt;/strong&gt; If there are any issues during import, Xata's UI will provide clear and actionable error messages, ensuring a smooth data ingestion process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d-IAJMqE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/xevlewajzovokducqfnw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d-IAJMqE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/xevlewajzovokducqfnw.png" alt="xata-csv-import-error" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Export Feature:&lt;/strong&gt; Once your data is in Xata, you can effortlessly download it as a CSV file for further analysis or sharing, completing the data lifecycle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fdqAUhAC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/xis7u9wh4e7krc28hvwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fdqAUhAC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/xis7u9wh4e7krc28hvwm.png" alt="xata-csv-export" width="800" height="404"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Xata's commitment to enhancing your data management experience shines through its new CSV import and export capabilities. By simplifying the process and addressing common CSV challenges, Xata empowers users to bring their own data seamlessly into their Xata databases.&lt;/p&gt;

&lt;p&gt;If you're ready to take your data management to the next level, explore the revamped CSV import and export features in Xata. It's time to embrace the future of data management with confidence! Here are some of the resources to get started and learn more about xata:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://xata.io/docs/examples/intro"&gt;Xata examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://xata.io/blog"&gt;Xata Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for the read!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>database</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Getting started with Xata</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Sat, 30 Sep 2023 15:31:00 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/getting-started-with-xata-2o64</link>
      <guid>https://dev.to/engineeredsoul/getting-started-with-xata-2o64</guid>
      <description>&lt;p&gt;&lt;a href="https://xata.io/" rel="noopener noreferrer"&gt;Xata&lt;/a&gt; is a cloud database service that makes it easy to build modern applications with rich data types, full-text search, AI capabilities, and serverless scalability. In this article, I will show you how to get started with Xata and perform an ACID transaction example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Xata
&lt;/h2&gt;

&lt;p&gt;To get started with Xata, you need to sign up for a free account on their &lt;a href="https://xata.io/" rel="noopener noreferrer"&gt;website&lt;/a&gt;. You will get access to a generous free tier that lets you create and manage up to 10 databases with 10 GB of storage each and 750k total records measured across all tables and 15 GB Data size on disk.&lt;/p&gt;

&lt;p&gt;Once you have an account, you can create a new database in your workspace. Provide the name of your database and select a region for it. Then click "Create" and the database is created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F74un1by5zdq231ih8kpj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F74un1by5zdq231ih8kpj.png" alt="Xata-Create-DB"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating your database, you will see the dashboard where you can view and edit your database schema, data, and settings. You can also use the Data API or the TypeScript SDK to interact with your database programmatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the interface
&lt;/h2&gt;

&lt;p&gt;Once you create your database, you will be able to see various options present in the UI. On the left side pane, we have various feature. Let me quickly walk you through it.&lt;/p&gt;

&lt;p&gt;The first option you see is the &lt;strong&gt;branch&lt;/strong&gt;. Here you can create multiple branches. When you create a new branch, the schema is copied. When you create a development branch from a production branch, you have the option to duplicate and cleanse specific data segments or initiate the branch with test data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage and limits&lt;/strong&gt; helps in understanding your database usages and limit it supports. Xata offer pricing choices that are both transparent and adaptable, designed to suit the distinct requirements of every user.&lt;/p&gt;

&lt;p&gt;A database &lt;strong&gt;schema&lt;/strong&gt; is the blueprint or structure that defines how data is organized and stored within a database system. It outlines the tables, fields, relationships, constraints, and indexes that dictate how data is stored, accessed, and maintained. Think of it as the architectural plan that guides the creation and management of a database, ensuring data integrity and efficient retrieval. A well-designed database schema is essential for optimizing data storage, retrieval, and management in various applications and systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fg46vxy24r9tkd06zjo9a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fg46vxy24r9tkd06zjo9a.png" alt="xata-schema-example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Playground&lt;/strong&gt;, as the name, we can play around with our database. The primary objective was to enable users to experiment and test SDK's without the need for any installations. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F9t5sznvnkju355gm0chy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F9t5sznvnkju355gm0chy.png" alt="xata-playground-example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Search engine&lt;/strong&gt; enables us to search for any specific term within our database. With the multiple options we can get the desired results faster. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F9d744gj3ngy9w5n5pes9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F9d744gj3ngy9w5n5pes9.png" alt="xata-search-engine-example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In a database, &lt;strong&gt;tables&lt;/strong&gt; serve as organized containers for storing data. They are fundamental components of the relational database model and consist of rows and columns.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fbcwehzotxawl6byt22lq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fbcwehzotxawl6byt22lq.png" alt="xata-table-example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use Xata's transactions endpoint to execute multiple operations in one go
&lt;/h2&gt;

&lt;p&gt;One of the features that Xata offers is the transactions endpoint, which allows you to execute multiple operations together as a single unit. Let's see why transactions are important, how to use Xata's transactions endpoint, and perform an example of a transaction in action.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why transactions are important
&lt;/h2&gt;

&lt;p&gt;Reliability is important when it comes to your data. You want to know that when you ask for something to be stored, that it'll be stored or that you'll receive an error explaining why not. No half-written records, no returning "OK" but not writing it, no writing it and then removing it again.&lt;/p&gt;

&lt;p&gt;As you add new features to your application, you'll see some patterns emerge. You want to create a user and a workspace at the same time. Or you'll want to remove a user from the waitlist when they sign-up. Your users will also hope that when they make a payment to your product, that their credits show up.&lt;/p&gt;

&lt;p&gt;Transactions are in the business of making these promises. A transaction lets you - the developer - run multiple requests as one. These requests are all guaranteed to succeed, or all guaranteed to fail. The database guarantees that a user and workspace will be created, that the user is removed from the waitlist, and it absolutely guarantees that your users' credits will show up in their account upon payment.&lt;/p&gt;

&lt;p&gt;Transactions come with a lot of knobs and dials. Transactions give control over how operations are executed, as well as what is and is not allowed to happen in a database while the transactions is executing.&lt;/p&gt;

&lt;p&gt;Let's begin with the initial Setup. We will code the example in Python. To use the &lt;a href="https://xata.io/docs/sdk/python/overview" rel="noopener noreferrer"&gt;Python SDK&lt;/a&gt;, we need to install it using pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;xata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now let's import the xata module and configure it with &lt;a href="https://xata-py.readthedocs.io/en/latest/api.html#xata.XataClient" rel="noopener noreferrer"&gt;&lt;code&gt;Xata Client&lt;/code&gt;&lt;/a&gt;. Grab your personal API Key in the accounnt settings and database url in your particular DB settings in which you want to perfrom the transaction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;xata.client&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;XataClient&lt;/span&gt;

&lt;span class="n"&gt;xata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;XataClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api_key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="n"&gt;db_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;db_url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;branch_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;main&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to use Xata's transactions endpoint
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://xata.io/docs/sdk/transaction" rel="noopener noreferrer"&gt;Xata transactions&lt;/a&gt; API can be thought of as a way to wrap our existing insert, update, and delete operations into a single operation. The options for each operation are almost identical to their non-transactional counterparts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Request
&lt;/h3&gt;

&lt;p&gt;To use the transactions endpoint, you need to have an Xata client instance with your API key, database URL, and branch name. Then, you can call the &lt;code&gt;records().transaction()&lt;/code&gt; method with an object that contains an array of operations. Each operation is an object with a key that specifies the type of operation (insert, update, delete, or get) and a value that contains the parameters for that operation.&lt;/p&gt;

&lt;p&gt;For example, let's create a table named songs with the columns: name, artist, and genre. Here we will try to perform transactions related to songs. Xata makes it easier for us to create the DB through UI intuitively. So go ahead and add columns as you like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F0yqbmmubxdthkr5y6w9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2F0yqbmmubxdthkr5y6w9e.png" alt="xata-create-table"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of a transaction request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;xata.client&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;XataClient&lt;/span&gt;

&lt;span class="n"&gt;xata&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;XataClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;api_key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="n"&gt;db_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;db_url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;branch_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;main&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;xata&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;records&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;transaction&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;operations&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;insert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;songs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;record&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Lucid Dreams&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;artist&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Juice Wrld&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;genre&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Emo rap&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}}},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;insert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;songs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;record&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;music-0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Granade&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;artist&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bruno Mars&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;genre&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pop&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;createOnly&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;update&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;songs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;music-0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fields&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Grenade&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ifVersion&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;update&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;songs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;music-1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fields&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Closer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;artist&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The Chainsmokers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;genre&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Future bass&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;upsert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;get&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;songs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;music-0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;columns&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]}},&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;delete&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;table&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;songs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;music-0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This request performs six operations in one transaction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Insert a record into the songs table with the name: Lucid Dreams, artist: Juice Wrld, and genre: Emo rap.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Insert a record into the songs table with the id: music-0, name: Granade (misspelled), artist: Bruno Mars, and genre: Pop. The createOnly option ensures that this operation will fail if there is already a record with the same id.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update the record with the id: music-0 in the songs table by changing its name from Granade to Grenade (correct spelling). The ifVersion option ensures that this operation will fail if the record has been modified by another transaction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Update the record with the id music-1 in the songs table by setting its name to Closer, artist to The Chainsmokers, and genre to Future bass. The upsert option ensures that this operation will insert the record if it does not exist.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get the record with the id music-0 from the songs table and return its id and name columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delete the record with the id music-0 from the songs table.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Response
&lt;/h3&gt;

&lt;p&gt;If successful, you can be certain that all operations have succeeded. You will receive a response like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{'results': [{'id': 'rec_ck82ovnkhed8birq1e2g', 'operation': 'insert', 'rows': 1}, {'id': 'music-0', 'operation': 'insert', 'rows': 1}, {'columns': {}, 'id': 'music-0', 'operation': 'update', 'rows': 1}, {'columns': {}, 'id': 'music-1', 'operation': 'update', 'rows': 1}, {'columns': {'id': 'music-0', 'name': 'Grenade'}, 'operation': 'get'}, {'operation': 'delete', 'rows': 1}]}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The response contains an array of data that corresponds to each operation in the request. For insert and update operations, the response contains the full record that was inserted or updated. For get operations, the response contains the requested columns of the record. For delete operations, the response contains null Or, in case of error, you know that all operations have been rolled back for you.&lt;/p&gt;

&lt;p&gt;Once you perform the above transaction, you will be able to see the values in the UI just like the below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fukjb27yzdy0b7dxyq4pm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcommunity.codenewbie.org%2Fremoteimages%2Fuploads%2Farticles%2Fukjb27yzdy0b7dxyq4pm.png" alt="Xata-music-table-view"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, I have introduced Xata, a platform that lets you build and iterate on your product faster with a simple and powerful API to access your data. I have focused on one of the features that Xata offers: the transactions endpoint, which allows you to execute multiple operations together as a single unit.&lt;/p&gt;

&lt;p&gt;I hope that you have found this article useful and informative. If you want to learn more about Xata and its other features, you can visit their website: &lt;a href="https://xata.io/" rel="noopener noreferrer"&gt;Xata.io&lt;/a&gt; and join their amazing community on &lt;a href="https://xata.io/discord" rel="noopener noreferrer"&gt;discord&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks for the read!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>database</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Demystifying Serverless Databases</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Sat, 30 Sep 2023 15:22:37 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/demystifying-serverless-databases-4c0l</link>
      <guid>https://dev.to/engineeredsoul/demystifying-serverless-databases-4c0l</guid>
      <description>&lt;p&gt;Serverless architecture has been a buzzword in the world of web development for some time now, and one of its most powerful and versatile components is the serverless database. But what exactly is a serverless database, and how can it benefit web developers? In this guide, we’ll peel back the layers of mystery surrounding serverless databases and provide you with a clear understanding of what they are and how to leverage them effectively in your web development project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Basics
&lt;/h2&gt;

&lt;p&gt;Before diving into the intricacies of serverless databases, let’s start with a fundamental question: What makes a database “serverless“?&lt;/p&gt;

&lt;p&gt;In a traditional database setup, you’re responsible for provisioning and managing the underlying servers, ensuring scalability, and handling maintenance tasks. However, with serverless databases, all of this heavy lifting is abstracted away. You no longer need to worry about server provisioning, maintenance, or even scaling, as the cloud provider takes care of these tasks for you.&lt;/p&gt;

&lt;p&gt;Imagine you’re building an e-commerce website. With a traditional database, you’d need to manage the servers to ensure that your website can handle a surge in traffic during a holiday sale. But with a serverless database, the cloud provider automatically scales your database to meet demand, ensuring your site stays responsive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OJWAk6er--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/p3rbwoywtdlxn46icrrn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OJWAk6er--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/p3rbwoywtdlxn46icrrn.png" alt="Serverless Meme" width="400" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Benefits of Serverless Database
&lt;/h2&gt;

&lt;p&gt;Now that you have a basic understanding of what serverless databases are, let’s explore the benefits that make them an attractive option for web developers:&lt;/p&gt;

&lt;h3&gt;
  
  
  Cost-Efficiency
&lt;/h3&gt;

&lt;p&gt;Serverless databases follow a pay-as-you-go pricing model. You only pay for the resources you actually use, making it cost-effective, especially for smaller projects or startups. There’s no need to invest in expensive server infrastructure upfront.&lt;/p&gt;

&lt;p&gt;For example, if you’re launching a new web app, you can start with a serverless database and incur minimal costs while your user base grows. As your app gains traction, the database automatically scales to accommodate increased traffic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scalability and Performance
&lt;/h3&gt;

&lt;p&gt;Serverless databases are designed for seamless scalability. They can automatically handle traffic spikes and increased workloads without any intervention from you. This ensures your web application maintains its performance, regardless of how many users you have.&lt;/p&gt;

&lt;p&gt;If your social networking site goes viral overnight, a serverless database ensures that your platform can handle the influx of new users and their data without any hiccups.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reduced Administrative Burden
&lt;/h3&gt;

&lt;p&gt;Forget about server maintenance, patching, and backups. Serverless databases are fully managed by cloud providers, allowing you to focus solely on your application’s code and functionality. This reduces the administrative overhead and frees up valuable time for development.&lt;/p&gt;

&lt;p&gt;Instead of spending hours on database maintenance tasks, your development team can focus on enhancing user experience, adding new features, and improving the overall performance of your web app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Global Availability
&lt;/h3&gt;

&lt;p&gt;Most serverless database offerings are available in multiple regions worldwide. This means your data can be replicated across various data centers, ensuring low-latency access for users around the globe.&lt;/p&gt;

&lt;p&gt;If you have an e-commerce site, a serverless database can replicate product catalog data to data centers in different regions. This ensures that customers from different parts of the world experience fast page loading times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use cases for Serverless Databases
&lt;/h2&gt;

&lt;p&gt;Serverless databases are versatile and can be applied to various web development scenarios. Here are a few use cases to consider:&lt;/p&gt;

&lt;h3&gt;
  
  
  Content Management Systems (CMS)
&lt;/h3&gt;

&lt;p&gt;Serverless databases are well-suited for storing and managing content in CMS platforms. They enable easy content updates and real-time collaboration among content creators.&lt;/p&gt;

&lt;h3&gt;
  
  
  User Profiles and Authentication
&lt;/h3&gt;

&lt;p&gt;When building web applications that require user authentication and profiles, serverless databases can efficiently store user data, ensuring a seamless user experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-time applications
&lt;/h3&gt;

&lt;p&gt;Serverless databases are great for real-time applications like chat apps and collaborative tools, where data needs to be updated and synchronized instantly across multiple clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing the Right Serverless Database
&lt;/h2&gt;

&lt;p&gt;Now that you’re convinced of the benefits of serverless databases and have a grasp of their applications, you might wonder which one to choose. Popular options include Amazon DynamoDB, Google Cloud Firestore, and Firebase Realtime Database, each with its own strengths and pricing model. Your choice will depend on your project's specific requirements.&lt;/p&gt;

&lt;p&gt;If you are looking for a serverless database for your next project, try out &lt;a href="https://xata.io/"&gt;Xata&lt;/a&gt; &lt;strong&gt;- a&lt;/strong&gt; &lt;strong&gt;Serverless database platform powered by Postgres&lt;/strong&gt;. Just focus on your application code and let Xato handle the rest.&lt;/p&gt;

&lt;p&gt;In conclusion, serverless databases are a valuable addition to any web developer’s toolkit. They simplify database management, reduce costs, and offer exceptional scalability. By understanding the basics and benefits of serverless databases, you’re well-equipped to make informed decisions and harness their power to build robust and efficient web applications. So, go ahead and demystify serverless databases, and unlock their potential in your next web development project.&lt;/p&gt;

&lt;p&gt;Thanks for the read. Have a great day! - &lt;a href="https://twitter.com/dotAadarsh"&gt;Aadarsh&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>database</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Devlines: Nvidia, Apple, WhatsApp...</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Tue, 30 May 2023 18:08:14 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/devlines-nvidia-apple-whatsapp-46de</link>
      <guid>https://dev.to/engineeredsoul/devlines-nvidia-apple-whatsapp-46de</guid>
      <description>&lt;p&gt;Welcome to today's edition of "Today in X". Today I have dedicated this article to some headlines / Devlines.&lt;/p&gt;




&lt;h3&gt;
  
  
  Nvidia becomes the first chipmaker valued at over $1 trillion
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/vpioNfKK8OFGHuUDMz/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/vpioNfKK8OFGHuUDMz/giphy.gif" alt="Nvidia" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On May 30, Nvidia Corp became the first chipmaker to reach a market capitalization of over $1 trillion. Prior to regular trading hours on Tuesday, the company's share prices rose 3.8%, resulting in a total value of $1.03 trillion. Nvidia surprised investors by reporting over $2 billion in profits and $7 billion in revenue for the quarter, both of which exceeded Wall Street predictions. AI was the highlight of these earnings, as Nvidia is primarily a gaming and AI chip company.&lt;/p&gt;

&lt;h3&gt;
  
  
  WhatsApp for iPhone gets companion mode
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/m9domrWiWDsJdABTNo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/m9domrWiWDsJdABTNo/giphy.gif" alt="WhatsApp" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WhatsApp, the cross-platform messaging service owned by Meta, has recently launched a new feature that allows users to link one account to as many as four Android smartphones using companion mode. This feature is now being made available to Apple iPhone users.&lt;/p&gt;

&lt;h3&gt;
  
  
  "We have closed the digital divide. Everyone is a programmer. Now, you just have to say something to the computer." - Nvidia chief
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/ZVik7pBtu9dNS/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/ZVik7pBtu9dNS/giphy.gif" alt="Coding" width="480" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to Jensen Huang, the CEO of Nvidia Corp, the "digital divide" is over because artificial intelligence has made it possible for anyone to program a computer simply by speaking to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Brave is launching the Brave Search API today
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExNDk2M2VjODdhMWVjMzgxMzBlNThlZDQ0OWY2YWIwMjNjM2ZkZjllZCZlcD12MV9pbnRlcm5hbF9naWZzX2dpZklkJmN0PXM/uUZv7llNbXlnjNFfVs/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExNDk2M2VjODdhMWVjMzgxMzBlNThlZDQ0OWY2YWIwMjNjM2ZkZjllZCZlcD12MV9pbnRlcm5hbF9naWZzX2dpZklkJmN0PXM/uUZv7llNbXlnjNFfVs/giphy.gif" alt="Brave" width="500" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Brave is launching the &lt;a href="https://brave.com/search-api-launch/"&gt;Brave Search API&lt;/a&gt; today, which will enable developers to integrate top-notch search outcomes from billions of web pages into their products. Brave's Search API will provide alternatives and autonomy from Big Tech for individuals constructing search and AI applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  StableStudio, an open-source design suite for generative AI, has been released by Stability AI
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://stability.ai/blog/stablestudio-open-source-community-driven-future-dreamstudio-release"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JVInO2vB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://images.squarespace-cdn.com/content/v1/6213c340453c3f502425776e/b6c5ac47-234a-4721-8fa1-7e30264a3263/Untitled%2B%25284%2529.png%3Fformat%3D1500w%2520align%3D%2522left%2522" alt="Stability AI Releases StableStudio, the Open Source Future of DreamStudio" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stability.ai/"&gt;Stability AI&lt;/a&gt;, a startup known for its Stable Diffusion text-to-image model, has recently made news with the launch of its latest project, &lt;a href="https://github.com/Stability-AI/StableStudio"&gt;StableStudio&lt;/a&gt;. This new release is an open-source version of their DreamStudio AI design software, and the move is aimed at encouraging collaborative development and speeding up progress in the generative AI and art field.&lt;/p&gt;




&lt;p&gt;That's all for today's edition on X. Subscribe to the &lt;a href="https://todayinx.hashnode.dev/newsletter"&gt;newsletter&lt;/a&gt;, and don't miss out. Thanks for reading and see you in the next edition. &lt;/p&gt;

&lt;p&gt;- &lt;a href="https://twitter.com/dotAadarsh"&gt;Aadarsh K&lt;/a&gt;&lt;/p&gt;

</description>
      <category>news</category>
    </item>
    <item>
      <title>MongoDB, Generative AI, HuggingCast ++</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Sun, 28 May 2023 18:14:54 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/mongodb-generative-ai-huggingcast--526b</link>
      <guid>https://dev.to/engineeredsoul/mongodb-generative-ai-huggingcast--526b</guid>
      <description>&lt;p&gt;Welcome to today's edition of "Today in X". In this, I thought of sharing some videos. So les go!&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;MongoDB for VS Code&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This informative video tutorial will teach you how to enhance your MongoDB experience in the VS Code editor. Discover the extensive features of the MongoDB for VS Code extension, including database navigation, schema overview, Playgrounds for scripting, and intelligent autocompletion. Additionally, explore the built-in MongoDB Shell, exporting queries.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MLWlWrRAb4w"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;A quick introduction to Generative AI&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In recent times, there has been a sudden surge in the use of the term "Generative AI". This can be observed from the significant increase in online searches related to it in the past year. The popularity of generative models like DALL-E 2, Imagen, and ChatGPT could be a contributing factor. However, the meaning of the term "Generative AI" is not clear. Check out this video!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rBsLIRAA4Eg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;HuggingCast v2 - StarCoder, Transformer Agents, AI news, and demos&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Check out HuggingCast, the new live show that covers the latest developments and practical demos. In the latest episode, the developers talked about Transformers, StarCoder, Transformers Agents, and more!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/t5GxDwkJlWI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  MLOps
&lt;/h2&gt;

&lt;p&gt;It's revolutionizing the way we deploy and manage machine learning models, bringing seamless collaboration between data scientists and operations teams. With MLOps, we can scale, monitor, and continuously improve ML workflows for maximum efficiency and impact. Watch this video to get a quick understanding of MLOps by an IBM Developer.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/OejCJL2EC3k"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Generative AI Spreading Fake News
&lt;/h2&gt;

&lt;p&gt;Although AI tools can be entertaining, they have the potential to intensify false information when their filters are compromised. This is already happening, and we will explore the consequences of this and ways to combat it.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/zyhielIGpn4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I guess these videos are enough for today's edition of X. If you have any interesting videos do share them in the comments. See you in the next edition of "Today in X". Thanks for the read and don't forget to subscribe to the &lt;a href="https://todayinx.hashnode.dev/newsletter"&gt;newsletter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>resources</category>
    </item>
    <item>
      <title>Dev Podcasts to listen to...</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Sun, 28 May 2023 18:06:54 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/dev-podcasts-to-listen-to-4n64</link>
      <guid>https://dev.to/engineeredsoul/dev-podcasts-to-listen-to-4n64</guid>
      <description>&lt;p&gt;Welcome to "Today in X".&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Experience is not what happens to you; it is what you do with what happens to you.” —&lt;em&gt;Aldous Huxley&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/uB86ZyWQsnFSGYe2sA/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/uB86ZyWQsnFSGYe2sA/giphy.gif" alt="Developer" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  CodeNewbie
&lt;/h3&gt;

&lt;p&gt;Stories and interviews from people on their coding journey.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/2T2OwucPOy2uDG1CUsjIMB" width="100%" height="232px"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;
&lt;h3&gt;
  
  
  Tic-Tac-Toe the hard way
&lt;/h3&gt;

&lt;p&gt;A writer and a software engineer from Google's People + AI Research team explore the human choices that shape machine learning systems by building competing tic-tac-toe agents.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/48DkeLV0D6w1yJqklrOxoi" width="100%" height="232px"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;
&lt;h3&gt;
  
  
  DevDiscuss
&lt;/h3&gt;

&lt;p&gt;This is the first original podcast from DEV, a global community of software developers of all backgrounds and experience levels. The show covers burning topics that impact the daily lives of programmers and beyond, hosted by Forem Co-Founder, Ben Halpern, as well as a rotating cast of Forem developers.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/4Jae2mPUqx0XnGychucsE4" width="100%" height="232px"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;
&lt;h3&gt;
  
  
  The Stack Overflow Podcast
&lt;/h3&gt;

&lt;p&gt;For more than a dozen years, the Stack Overflow Podcast has been exploring what it means to be a developer and how the art and practice of software programming are changing our world. From Rails to React, from Java to Node.js, we host important conversations and fascinating guests that will help you understand how technology is made and where it’s headed. Hosted by Ben Popper, Cassidy Williams, and Ceora Ford, the Stack Overflow Podcast is your home for all things code.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/0e5eoM6w7eW9Wu7wMA04Tr" width="100%" height="232px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Python Podcast
&lt;/h3&gt;

&lt;p&gt;A weekly Python podcast hosted by Christopher Bailey with interviews, coding tips, and conversation with guests from the Python community. The show covers a wide range of topics including Python programming best practices, career tips, and related software development topics. Join every Friday morning to hear what's new in the world of Python programming and become a more effective Pythonista.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/41Av6Rq81LfOT3Volz7W9D" width="100%" height="232px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Breaking Changes
&lt;/h3&gt;

&lt;p&gt;Breaking Changes is a weekly talk show where Postman Chief Evangelist Kin Lane hosts stellar guests from all across the API universe to discuss, debate, and solve the latest topics around APIs and API-first.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/5ig80ZlBLiC2iXxql0s1q2" width="100%" height="232px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Talks at Google
&lt;/h3&gt;

&lt;p&gt;The Talks at Google podcast - where great minds meet. Talks at Google brings the world’s most influential thinkers, creators, makers, and doers all to one place. Every episode is taken from a video that can be seen at &lt;a href="http://YouTube.com/TalksAtGoogle"&gt;YouTube.com/TalksAtGoogle&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://open.spotify.com/embed/show/2nIvarXvvZcp1cePx69x9N" width="100%" height="232px"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;Subscribe to the &lt;a href="https://todayinx.hashnode.dev/newsletter"&gt;newsletter&lt;/a&gt; to receive the daily edition and don't miss out. That's all for today and thanks for the read. Do share if you have any suggestions and podcasts to listen to in the comment section. Have a great day!&lt;/p&gt;

</description>
      <category>podcast</category>
    </item>
    <item>
      <title>ML, MongoDB, Search Engine...</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Thu, 25 May 2023 19:11:41 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/ml-mongodb-search-engine-2bih</link>
      <guid>https://dev.to/engineeredsoul/ml-mongodb-search-engine-2bih</guid>
      <description>&lt;p&gt;Welcome to "Today in X". In today's edition, read AI-generated summaries, and discover new products, and free learning resources.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Never give up on something that you can't go a day without thinking about." - Winston Churchill&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/h99SOT2cABIUE/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/h99SOT2cABIUE/giphy.gif" alt="Never give up!" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  SynopsAI 🤖
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.kdnuggets.com/2023/05/ai-eating-data-science.html"&gt;&lt;strong&gt;AI is Eating Data Science&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data science as a transition&lt;/strong&gt;: The article argues that data science is a short-lived discipline that emerged from the era of big data and will soon merge with the AI career path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI systems as the focus&lt;/strong&gt;: The article claims that the key question is no longer just what insights can be derived from data, but what AI systems can be run with data. It gives examples of large-scale and complex AI systems that use data in innovative ways.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data science as a milestone&lt;/strong&gt;: The article concludes that data science will be viewed as a major milestone along the road to an AI-centric future, but not as an entity of its own. It urges us to keep an eye out for the consumption of data science by AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.analyticsvidhya.com/blog/2023/05/why-chatgpt-and-bard-cant-replace-search-engines/"&gt;&lt;strong&gt;Chatbots vs Search Engines&lt;/strong&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Chatbots like ChatGPT and Bard can answer any question but sometimes generate false or inaccurate responses.&lt;/p&gt;

&lt;p&gt;Search engines like Google provide links to sources that can be verified by users.&lt;/p&gt;

&lt;p&gt;Chatbots will not replace search engines but will become another component of them, used to summarize (like this) and paraphrase results from top search results.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  Summarized by Bing's AI
&lt;/h4&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Events 📢
&lt;/h2&gt;

&lt;h3&gt;
  
  
  PostgreSQL 101
&lt;/h3&gt;

&lt;p&gt;Comparing SQL Server and PostgreSQL - 10 key differences (APAC Edition) - In this webinar, you will find out the things that often trip up SQL Server users when they first start exploring PostgreSQL. You will discover the top ten differences b/w SQL Server and PostgreSQL, the solutions to common issues in PostgreSQL, and a better context for using the skills you already have in PostgreSQL. It's happening on May 30, 2023 - 1:00 pm - 2:00 pm AEST. &lt;a href="https://www.red-gate.com/hub/events/postgresql-101-comparing-sql-server-and-postgresql-10-key-differences-apac-edition"&gt;Register Now&lt;/a&gt;!&lt;/p&gt;

&lt;h3&gt;
  
  
  Machine Learning Day
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.wearedevelopers.com/event/machine-learning-day-may-2023"&gt;Join&lt;/a&gt; the We Are Developers Machine Learning Day for exciting insights and best practices in the captivating field of ML. Become an ML Pro with topics like AI, deep learning, computer vision, and cloud productivity. Get ready for an enriching experience! It is happening virtually on May 31, 2023.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discover 🚀
&lt;/h2&gt;

&lt;h3&gt;
  
  
  AI-powered pull requests: OpenAI + Chrome Extension
&lt;/h3&gt;

&lt;p&gt;OpenSauced removes the pain of finding projects to contribute to. We are now working with companies to share the secret sauce to building engineering teams through open source. Check out this extension at &lt;a href="http://OpenSauced.ai"&gt;OpenSauced.ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--plZf9oky--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/tto0mp4c2p4h1dea7txr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--plZf9oky--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://community.codenewbie.org/remoteimages/uploads/articles/tto0mp4c2p4h1dea7txr.png" alt="OpenSauced AI extension" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources 📚
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Microsoft Research Podcast
&lt;/h3&gt;

&lt;p&gt;Listen to the "&lt;a href="https://www.microsoft.com/en-us/research/podcast/ai-frontiers-models-and-systems-with-ece-kamar/"&gt;&lt;strong&gt;AI Frontiers: Models and Systems with Ece Kamar&lt;/strong&gt;&lt;/a&gt;" episode, where AI scientist and engineer Ashley Llorens hosts conversations with collaborators and colleagues about the new AI models like GPT-4, their future, and applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  MongoDB University
&lt;/h3&gt;

&lt;p&gt;Enhance your career prospects by diving into MongoDB, one of the leading NoSQL databases. Take advantage of free MongoDB courses that offer hands-on labs and quizzes to sharpen your skills. Gain valuable experience and earn MongoDB certification, opening doors to exciting opportunities in the world of data management. Start your journey today and pave the way for a successful career in MongoDB. &lt;a href="https://learn.mongodb.com/"&gt;Start learning&lt;/a&gt;!&lt;/p&gt;




&lt;p&gt;&lt;a href="https://i.giphy.com/media/xJMM9toDfnehfNxTSG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/xJMM9toDfnehfNxTSG/giphy.gif" alt="Have a great day!" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Subscribe to the newsletter to receive the daily edition and don't miss out. That's all for today and thanks for the read. Feedbacks are welcome :) Until next time, keep exploring, keep learning, and keep pushing the boundaries of what's possible. See you soon in the next edition of "Today in X"! Signing off - &lt;a href="https://twitter.com/DotAadarsh"&gt;dotAadarsh&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>learning</category>
      <category>resources</category>
    </item>
    <item>
      <title>Microsoft, Robots, UX...</title>
      <dc:creator>Aadarsh Kannan</dc:creator>
      <pubDate>Wed, 24 May 2023 11:25:02 +0000</pubDate>
      <link>https://dev.to/engineeredsoul/microsoft-robots-ux-44al</link>
      <guid>https://dev.to/engineeredsoul/microsoft-robots-ux-44al</guid>
      <description>&lt;p&gt;Welcome to "&lt;strong&gt;Today in X"&lt;/strong&gt;, your go-to source for the latest updates, insights, and resources across a diverse range of subjects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UCvOhv6_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/FwVj5HVXgAgk4_B%3Fformat%3Djpg%26name%3D900x900" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UCvOhv6_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/FwVj5HVXgAgk4_B%3Fformat%3Djpg%26name%3D900x900" alt="Image" width="800" height="676"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image Credit: &lt;a href="https://twitter.com/whataweekhuh"&gt;Whataweekhuh&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Happy Wednesday, everyone! 🎉 It's the middle of the week, and we're making great strides towards our goals. Stay focused, embrace the challenges, and keep pushing forward. Remember, every small step counts. Let's conquer this Wednesday with determination and enthusiasm. You've got this! 💪✨&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  SynopsAI 🤖
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;With Windows Copilot, Microsoft integrates AI at the core of Windows 11, revolutionizing the user experience&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It helps users find information and perform tasks on their devices. It can also serve as a virtual assistant that can summarize documents, edit photos, and more. This tool will be available for preview in June. Microsoft hopes that Windows Copilot will help its users become more productive and creative. They also want to make sure that the AI interactions are secure and private.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/FCfwc-NNo30"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  AI, India, and Water 💧
&lt;/h4&gt;

&lt;p&gt;In India, two organizations are harnessing the power of AI to tackle the challenges posed by water scarcity and flooding. With Google's support, One Group wants to help women learn how to build better cities that can handle climate change. The other group wants to help farmers know when and how to water their plants better. All this technology can help protect the environment and make life better for people in India. - via &lt;a href="https://indiaai.gov.in/news/two-indian-organisations-using-artificial-intelligence-to-address-threats-of-water-scarcity-and-flooding-in-india"&gt;IndiaAI&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Robot as a coworker 🤖
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://www.sanctuary.ai/"&gt;Sanctuary AI&lt;/a&gt;, a tech startup, has introduced a versatile robot capable of carrying out a wide range of workplace tasks, whether in collaboration with humans or autonomously, thus reducing the reliance on human labor. - via &lt;a href="https://www.freethink.com/robots-ai/general-purpose-robot"&gt;Futurism&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/k2GhgO7SnZQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Events 📢
&lt;/h3&gt;

&lt;h4&gt;
  
  
  PrivateGPT &amp;amp; GPT4All Hackathon
&lt;/h4&gt;

&lt;p&gt;Join the lablabai's exhilarating adventure of fun and creation with LLMs (Large Language Models)! Discover the model in a nutshell and dive into 24 hours of non-stop enjoyment and building. Choose to work solo or collaborate with a team during the Hack, knowing that you'll have the unwavering support of the community and experienced Mentors. Get ready to unleash your creativity and launch your ideas to new heights. The possibilities are limitless, and the journey awaits! 💻🚀. &lt;a href="https://lablab.ai/event/privategpt-and-gpt4all-hackathon"&gt;Join now&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DyGvJflB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lablab.ai/_next/image%3Furl%3Dhttps%253A%252F%252Fstorage.googleapis.com%252Flablab-static-eu%252Fimages%25252Fevents%25252Fclht315oz0000356m98sq0uy7%25252Fclht315oz0000356m98sq0uy7_pb13myo_imageLink.jpg%26w%3D3840%26q%3D75%2520align%3D%2522left%2522" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DyGvJflB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://lablab.ai/_next/image%3Furl%3Dhttps%253A%252F%252Fstorage.googleapis.com%252Flablab-static-eu%252Fimages%25252Fevents%25252Fclht315oz0000356m98sq0uy7%25252Fclht315oz0000356m98sq0uy7_pb13myo_imageLink.jpg%26w%3D3840%26q%3D75%2520align%3D%2522left%2522" alt="PrivateGPT &amp;amp; GPT4All Hackathon event thumbnail" width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Open Source Hour: Non-code Contributions | Twitter Space
&lt;/h4&gt;

&lt;p&gt;Join today's Twitter Space devoted to non-code contributions with Bekah Hawrot Weigel, Ramón Huidobro, and borderlessdev at 11 am ET / 8:30 pm IST. Set your reminder &lt;a href="https://twitter.com/i/spaces/1ynJOawQBezKR?s=20"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--au39z8ot--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/FwwOjcsWIAwgUYe%3Fformat%3Djpg%26name%3D4096x4096" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--au39z8ot--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://pbs.twimg.com/media/FwwOjcsWIAwgUYe%3Fformat%3Djpg%26name%3D4096x4096" alt="Social Card with headshots of the speakers and the title. Open Source Hour: Non-Code Contributions" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Getting Started with Cellular IoT 📳
&lt;/h4&gt;

&lt;p&gt;Are you new to wireless IoT? Curious about what prepaid cellular can add to your IoT solutions? If yes, then join the &lt;a href="https://blues.io/"&gt;Blues&lt;/a&gt; webinar on 8th June 2023. Register &lt;a href="https://us02web.zoom.us/webinar/register/2416476209499/WN_WAf_TqxSRiGk_hUIsTSBNA#/registration"&gt;here&lt;/a&gt; for the webinar.&lt;/p&gt;

&lt;h3&gt;
  
  
  Discover 🚀
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Realtime Colors
&lt;/h4&gt;

&lt;p&gt;🎨 Ready to bring your website to life with the perfect color palette? Look no further! Realtime Colors: Visualize Your Colors! 🌈 With a handy Toolbar, you can now see your color choices come to life on a real website. Say goodbye to guesswork and hello to a stunning design. Try it now and make your website truly eye-catching!&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.realtimecolors.com/?colors=000000-ffffff-4685ff-737373-ffb084" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--omgaIBsB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.realtimecolors.com/preview.png" height="418" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.realtimecolors.com/?colors=000000-ffffff-4685ff-737373-ffb084" rel="noopener noreferrer" class="c-link"&gt;
          Realtime Colors
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Visualize your color palettes on a real website.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--5peQlOM6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://www.realtimecolors.com/favicon.png" width="79" height="79"&gt;
        realtimecolors.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h4&gt;
  
  
  UX Writing Assistant by Frontitude
&lt;/h4&gt;

&lt;p&gt;Enhance your product copy effortlessly using the AI-powered UX Writing Assistant. This innovative tool offers instant suggestions for crafting and fine-tuning your copy, drawing inspiration from UX writing best practices and industry-leading products. Elevate user experience, save valuable writing time, and seamlessly integrate within Figma, all in a matter of seconds. Experience the power of AI-driven UX writing and take your product to new heights.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://write.frontitude.com" rel="noopener noreferrer"&gt;
      write.frontitude.com
    &lt;/a&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Resources 📚
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Microsoft Learn&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Ready to level up your skills and unleash the full potential of Microsoft products? Dive into the step-by-step learning paths and modules for a guided learning experience like never before. From mastering productivity tools to unlocking innovative solutions, your journey starts now. Don't wait, &lt;a href="https://learn.microsoft.com/en-us/training/browse/"&gt;start exploring today&lt;/a&gt;!&lt;/p&gt;

&lt;h4&gt;
  
  
  AWS Skill Builder ☁️
&lt;/h4&gt;

&lt;p&gt;Unlock the power of the cloud with AWS Skill Builder! Elevate your career and gain in-demand cloud skills with AWS's comprehensive learning center. From beginner to advanced, AWS got you covered with expert-led resources and hands-on training. &lt;a href="https://explore.skillbuilder.aws/learn/signin"&gt;Start building&lt;/a&gt; your cloud expertise today!&lt;/p&gt;




&lt;p&gt;That's all for today and thanks for the read. Feedbacks are welcome :) Until next time, keep exploring, keep learning, and keep pushing the boundaries of what's possible. See you soon in the next edition of "Today in X"! signing off - &lt;a href="https://twitter.com/DotAadarsh"&gt;dotAadarsh&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>resources</category>
      <category>events</category>
      <category>ai</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
