News Aggregator


Building an Interactive Chatbot With Streamlit, LangChain, and Bedrock

Aggregated on: 2024-10-16 14:51:31

In the ever-evolving landscape of AI, chatbots have become indispensable tools for enhancing user engagement and streamlining information delivery. This article will walk you through the process of building an interactive chatbot using Streamlit for the front end, LangChain for orchestrating interactions, and Anthropic’s Claude Model powered by Amazon Bedrock as the Large Language Model (LLM) backend. We'll dive into the code snippets for both the backend and front end and explain the key components that make this chatbot work. Core Components Streamlit frontend: Streamlit's intuitive interface allows us to create a low-code user-friendly chat interface with minimal effort. We'll explore how the code sets up the chat window, handles user input, and displays the chatbot's responses. LangChain orchestration: LangChain empowers us to manage the conversation flow and memory, ensuring the chatbot maintains context and provides relevant responses. We'll discuss how LangChain's ConversationSummaryBufferMemory and ConversationChain are integrated. Bedrock/Claude LLM backend: The true magic lies in the LLM backend. We'll look at how to leverage Amazon Bedrock’s claude foundation model to generate intelligent and contextually aware responses.  Chatbot Architecture Conceptual Walkthrough of the Architecture User interaction: The user initiates the conversation by typing a message into the chat interface created by Streamlit. This message can be a question, a request, or any other form of input the user wishes to provide. Input capture and processing: Streamlit's chat input component captures the user's message and passes it on to the LangChain framework for further processing. Contextualization with LangChain memory: LangChain plays a crucial role in maintaining the context of the conversation. It combines the user's latest input with the relevant conversation history stored in its memory. This ensures that the chatbot has the necessary information to generate a meaningful and contextually appropriate response. Leveraging the LLM: The combined context is then sent to the Bedrock/Claude LLM. This powerful language model uses its vast knowledge and understanding of language to analyze the context and generate a response that addresses the user's input in an informative way. Response retrieval: LangChain receives the generated response from the LLM and prepares it for presentation to the user. Response display: Finally, Streamlit takes the chatbot's response and displays it in the chat window, making it appear as if the chatbot is engaging in a natural conversation with the user. This creates an intuitive and user-friendly experience, encouraging further interaction. Code Snippets Frontend (Streamlit) Python   import streamlit import chatbot_backend from langchain.chains import ConversationChain from langchain.memory import ConversationSummaryBufferMemory import boto3 from langchain_aws import ChatBedrock import pandas as pd # 2 Set Title for Chatbot - streamlit.title("Hi, This is your Chatbott")   # 3 LangChain memory to the session cache - Session State - if 'memory' not in streamlit.session_state:     streamlit.session_state.memory = demo.demo_memory()   # 4 Add the UI chat history to the session cache - Session State if 'chat_history' not in streamlit.session_state:       streamlit.session_state.chat_history = []   # 5 Re-render the chat history for message in streamlit.session_state.chat_history:     with streamlit.chat_message(message["role"]):         streamlit.markdown(message["text"]) # 6 Enter the details for chatbot input box input_text = streamlit.chat_input("Powered by Bedrock")   if input_text:     with streamlit.chat_message("user"):         streamlit.markdown(input_text)     streamlit.session_state.chat_history.append({"role": "user", "text": input_text})     chat_response = demo.demo_conversation(input_text=input_text,                                            memory=streamlit.session_state.memory)       with streamlit.chat_message("assistant"):         streamlit.markdown(chat_response)     streamlit.session_state.chat_history.append({"role": "assistant", "text": chat_response})

View more...

Event-Driven vs Event-Sourced: A Common Misunderstanding

Aggregated on: 2024-10-16 13:51:31

In today’s world of software development, systems containing some sort of event constructs are increasing in popularity. While this is primarily driven by message-based communication mechanisms, events are also used in different scopes and contexts. The frequent use of the term “event” leads to confusion, which is often observed in discussions about various software architectures among people who are new to these concepts. The terms “event-driven” and “event-sourced” are often used interchangeably, while in reality, the two are very different concepts. In this article, we are going to explore the key characteristics of each, explain how they differ, and how they complement each other. We will focus on clarifying the key differences, not a deep dive into each concept. Before we dive in, let’s clarify the definition of an “event” in both event-driven and event-sourced systems. An event is an immutable record describing something that has happened in the past. Therefore, the data that an event contains cannot be changed. Immutability and description of the past are fundamental characteristics of events.

View more...

Mastering Date-Time APIs: Challenges With Java's Calendar and JDK Date/Time APIs

Aggregated on: 2024-10-15 23:36:30

In this article, we'll address four problems covering different date-time topics. These problems are mainly focused on the Calendar API and on the JDK Date/Time API.  Disclaimer: This article is an abstract from my recent book Java Coding Problems, Second Edition.

View more...

Acting Like We Care About Security

Aggregated on: 2024-10-15 22:36:30

This will be my last entry on the topic for a while. For context, I introduced the idea that folks don’t care about security, they care about outcomes in this post; and then I began exploring ways we, as IT practitioners, can shift the focus to the results and therefore contextualize the actions needed as something other than “security for the sake of security.” In this post, I’m continuing with that line of discussion. What can we DO to make our environments more secure, and how can we get our colleagues to understand and want to do it? Focus on Actual Risks and Realistic Outcomes (or: Don’t let “perfect” be the enemy of “good”)

View more...

How to Simplify Complex Conditions With Python's Match Statement

Aggregated on: 2024-10-15 21:36:30

Pattern matching is a programming technique that involves comparing a value against a pattern and extracting information from the value if it matches the pattern. Instead of writing lengthy code, conditional checks, pattern matching enables a concise and readable way to identify the value matching the pattern. While pattern matching is rooted in functional programming, it can be used both functional and non-functional styles. Benefits of pattern matching include:

View more...

AI Strategies for Enhanced Language Model Performance

Aggregated on: 2024-10-15 20:36:30

Artificial Intelligence (AI) and language models are transforming various fields, including natural language processing, automated customer support, and data analysis. A critical challenge that these models face is the ability to perform compositional reasoning — an essential skill for understanding and combining different pieces of information to solve complex problems. This article explores the concept of compositionality, the challenges associated with it, and advanced strategies to improve language models' ability to reason compositionally. Understanding Compositionality in AI Compositionality refers to the ability of AI models to combine simple concepts to form complex ideas or solutions. For instance, answering a question like "Who was the U.S. President when the Eiffel Tower was completed?" requires understanding separate facts and combining them to arrive at the answer. While language models have made significant progress in understanding individual facts, they often struggle with tasks that require them to combine these facts in a coherent manner.

View more...

Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL

Aggregated on: 2024-10-15 19:36:30

Managing data access in Domain-Driven Design (DDD) applications can be challenging, especially when working with different database types, like relational and NoSQL. This article explores how leveraging tools like JNoSQL and Jakarta Data helps simplify data access, making it easier to implement domain-focused repositories, integrate ubiquitous language, and naturally align business semantics with your code. Understanding DDD vs. DAO Before diving into the practical implementation details, it's essential to clarify the distinction between Domain-Driven Design (DDD) and the Data Access Object (DAO) pattern. Understanding this difference will help recognize the value of domain-focused repositories in DDD applications.

View more...

Data at Rest Encryption: Protecting Stored Data

Aggregated on: 2024-10-15 18:36:30

Securing sensitive information is more critical than ever. One of the key defenses in data protection is data at rest encryption, a method that safeguards information stored on devices such as hard drives, databases, and servers. Unlike data in transit, which is actively moving through networks, data at rest is idle, yet just as vulnerable to breaches. From personal devices to enterprise storage systems, encryption ensures that even if unauthorized access occurs, the data remains unreadable without the appropriate decryption keys.  An alarming 53% of companies left more than 1,000 sensitive files and folders unencrypted, accessible to all employees. This article explores the various methods of encrypting data at rest, helping you understand the strengths and limitations of each approach to better protect your stored information.

View more...

Oracle CloudWorld 2024: Key Takeaways for Developers, Engineers and Architects

Aggregated on: 2024-10-15 16:51:30

Oracle CloudWorld 2024 showcased a range of innovations and strategic shifts that will significantly impact the work of developers, engineers, and architects across industries. From AI integrations to multi-cloud strategies, Oracle is positioning itself as a key enabler of digital transformation. Here are the most important takeaways for technical professionals: 1. AI Integration Across the Stack Artificial intelligence was undoubtedly the star of CloudWorld 2024, with Oracle emphasizing its integration throughout its product suite. For developers and engineers, this means having access to powerful AI capabilities without building them from scratch.

View more...

Vector Search: The Hottest Topic in Information Retrieval

Aggregated on: 2024-10-15 15:51:30

My name is Bohdan Snisar. With 13 years in the software industry, I’ve transitioned from a software engineer to a software architect, gaining a deep understanding of the software development lifecycle and honing my problem-solving skills. My expertise spans Java, Go, Big Data pipelines, vector-based search, machine learning, relational databases, and distributed systems, with significant contributions at companies like Revolut and Wix. At Revolut, I played a pivotal role in developing infrastructure for Bloomberg integration, creating a transparent and traceable interface for trading terminals that became a vital data source. This experience highlighted the growing need for advanced data handling and retrieval techniques, leading me to explore the potential of vector search.

View more...

VACUUM In Postgres Demystified

Aggregated on: 2024-10-15 14:51:30

Let’s see what is VACUUM in PostgreSQL, how it’s useful, and how to improve your database performance. Storage Basics Before diving into vacuuming, it's important to first understand the fundamentals of data storage in PostgreSQL. While we’ll explain how data is represented internally, we won’t cover every aspect of storage, such as shared memory or buffer pools.

View more...

Transforming Customer Feedback With Automation of Summaries and Labels Using TAG and RAG

Aggregated on: 2024-10-15 13:51:30

In today’s data-driven landscape, businesses encounter a vast influx of customer feedback through reviews, surveys, and social media interactions. While this information can yield invaluable insights, it also presents a significant challenge: how to distill meaningful data from an overwhelming amount of information. Advanced analytics techniques are revolutionizing our approach to understanding customer sentiment. Among the most innovative are Table-Augmented Generation (TAG) and Retrieval-Augmented Generation (RAG), which enable businesses to derive complex insights from thousands of reviews simultaneously using natural language processing (NLP). This article delves into the workings of TAG and RAG, their implications for data labeling and Text-to-SQL generation, and their practical applications in real-world scenarios. By providing concrete examples, we illustrate how these technologies can enhance data analysis and facilitate informed decision-making, catering to both seasoned data scientists and newcomers to the field.

View more...

Writing Great Code: The Five Principles of Clean Code

Aggregated on: 2024-10-14 23:51:30

One of the finest ways to make the code easy to read, maintain, and improve can be done by writing clean code. Clean code helps to reduce errors, improves the code quality of the project, and makes other developers and future teams understand and work with the code. The well-organized code reduces mistakes and maintenance a lot easier. 1. Use Meaningful Names Clean code should have meaningful names that describe the purpose of variables, functions, and classes. The name itself should convey what the code does. So, anyone who is reading it can understand its purpose without referring to any additional documentation.

View more...

The Battle of Data: Statistics vs Machine Learning

Aggregated on: 2024-10-14 22:51:30

The goal of the paper is to investigate the fields of statistics and machine learning and look at the differences, similarities, usage, and ways of analyzing data in these two branches. Both branches of science allow interpreting data, however, they are based on different pillars: statistics on mathematics and the other on computer science – the focus of machine learning. Introduction Artificial intelligence together with machine learning is presently the technologically advanced means of extracting useful information from the raw data that is changing every day around us. On the contrary, statistics — a very old field of research of over 3 centuries — has always been regarded as a core discipline for the interpretation of the collected data and decision-making. Even though both of them share one goal of studying data, how the goal is achieved and where the focus is varies in statistics and machine learning.

View more...

Amazon Redshift Workload Management (WLM): A Step-by-Step Guide

Aggregated on: 2024-10-14 21:51:30

As a database administrator or data engineer working with Amazon Redshift, it's crucial to manage resources effectively to handle different workloads. Amazon Redshift's Workload Management (WLM) feature lets you define how queries are prioritized and how resources like CPU and memory are allocated. This guide will walk you through setting up WLM step by step, making it easy for newbies to get started. What Is Workload Management (WLM)? WLM allows Amazon Redshift to handle multiple concurrent queries by allocating resources to query queues. You can create custom queues, allocate memory, and set concurrency limits for specific workloads, ensuring that critical queries run efficiently even under heavy loads.

View more...

Hello, K.AI: How I Trained a Chatbot of Myself Without Coding

Aggregated on: 2024-10-14 20:51:30

Generative AI (GenAI) enables many new use cases for enterprises and private citizens. While I work on real-time enterprise-scale AI/ML deployments with data streaming, big data analytics, and cloud-native software applications in my daily business life, I also wanted to train a conversational chatbot for myself. This blog post introduces my journey without coding to train K.AI, a personal chatbot that can be used to learn in a conversational pace format about data streaming and the most successful use cases in this area. Yes, this is also based on my expertise, domain knowledge, and opinion, which is available as public internet data, like my hundreds of blog articles, LinkedIn shares, and YouTube videos. Hi, K.AI: Let's Chat The evolution of Generative AI (GenAI) around OpenAI's chatbot ChatGPT and many similar large language models (LLM), open source tools like LangChain and SaaS solutions for building a conversational AI led me to the idea of building a chatbot trained with all the content I created over the past years.

View more...

Decoding DORA: EU's Unified Approach to ICT Risk Governance

Aggregated on: 2024-10-14 19:51:29

As financial services become increasingly digitized, the need for robust operational resilience has grown more critical. The Digital Operational Resilience Act (DORA), set to take effect on January 17, 2025, aims to establish a unified framework for Information and Communication Technology (ICT) risk management across the European Union's financial sector. This new regulation will significantly impact how banks, insurers, and other financial entities approach their digital risks. DORA represents an important step in regulatory evolution, designed to address the growing complexities of the digital financial landscape. But what does this mean for financial institutions? And how can organizations prepare for this shift in regulatory expectations?

View more...

How to Set up OAuth JWT Flow and mTLS in the Salesforce Connector for a MuleSoft App

Aggregated on: 2024-10-14 18:51:29

In the first part of this series, we set up a Mule app and a Salesforce Connected app for the OAuth JWT bearer token flow. In this second part, we’ll go through the required steps to set up mutual TLS between the Mule app and the Salesforce Connected App we created in that first post. Create a New Profile in Salesforce for mTLS If the Profile you used in Part 1 of this guide (linked earlier) is the definitive one that you’ll use for this Mule app, skip this step. Go to Setup > Profiles. Click on New Profile.

View more...

Serverless Computing and GraphQL: Modern App Development

Aggregated on: 2024-10-14 17:51:29

In this article, I will guide you through the process of creating a serverless GraphQL API using TypeScript, AWS Lambda, and Apollo Server.  Serverless Computing Serverless computing is a cloud-computing execution model where cloud providers automatically manage the infrastructure for running applications. In this model, developers write code, and the cloud provider takes care of running, scaling, and maintaining the servers, meaning developers don't need to worry about server management, infrastructure provisioning, or scaling. The term "serverless" doesn't mean that there are no servers involved, but rather that the server management tasks are abstracted away from developers. AWS Lambda is a serverless compute service provided by Amazon Web Services (AWS) that allows you to run code without provisioning or managing servers

View more...

CI/CD Pipelines in the Cloud: How Cloud Hosting Is Accelerating Software Delivery

Aggregated on: 2024-10-14 16:51:29

In the fast-evolving world of software engineering, one of the most transformative innovations is the combination of Continuous Integration (CI) and Continuous Deployment (CD) pipelines with cloud hosting. This powerful integration has revolutionized the way developers deploy, test, and update software, allowing for faster delivery, improved scalability, and enhanced collaboration. By utilizing cloud hosting platforms, software engineering teams can now automate processes that once took weeks, turning them into streamlined workflows. Let’s explore how CI/CD pipelines in the cloud are accelerating software delivery, with insights backed by research and industry trends. The Power of CI/CD in Software Engineering Continuous Integration and Continuous Deployment (CI/CD) are critical for modern software development, driving automation from code integration to deployment. In traditional settings, deployment often required manual effort, introducing the risk of human error, delays, and inconsistencies. CI/CD pipelines automate these processes, enabling developers to integrate code changes more frequently and deploy updates to production environments seamlessly.

View more...

What We Learned About Secrets Security at AppSec Village at DEF CON 32

Aggregated on: 2024-10-14 15:51:29

If you grew up in the US, chances are you have a memory of going to summer camp. Even if you didn't attend one yourself, the camp experience of going away from home, learning all sorts of arts and crafts, meeting new best friends, and going on memorable adventures is baked into pop culture and media. Every August, the largest hacker summer camp on earth takes place in the heat of Las Vegas. This year marked the thirty-second iteration of DEF CON. DEF CON can be hard to explain without experiencing it. Yes, there are speaking tracks, official workshops, and multiple capture-the-flags (CTFs), but there is so much more. No other conference contains so many sub-conferences and community-led events. Even attendees who have been going for years say they still don't think they have experienced everything on offer.  

View more...

Unleashing the Power of Gemini With LlamaIndex

Aggregated on: 2024-10-14 14:51:29

Large language models (LLMs) like Google's Gemini are revolutionizing how we interact with information, but harnessing their power for your own applications can seem daunting. That's where LlamaIndex comes in, providing a simple yet powerful framework to leverage LLMs like Gemini. This tutorial will guide you through a practical example, using the Python code snippet as a starting point, to demonstrate how to seamlessly integrate Gemini's LLM and embedding capabilities into your projects using LlamaIndex.

View more...

Mutable vs. Immutable: Infrastructure Models in the Cloud Era

Aggregated on: 2024-10-14 13:51:29

In the world of infrastructure management, two fundamental approaches govern how resources are deployed and maintained: mutable and immutable infrastructure. These approaches influence how updates are made, how infrastructure evolves, and how consistency is ensured across different environments. Mutable infrastructure refers to systems that can be changed or updated after they’ve been initially deployed. This means that configuration changes, software updates, or patches can be applied directly to existing infrastructure resources without replacing them entirely.  For instance, a server can be updated by installing new software, tweaking its settings, or increasing its resources. While the server itself stays the same, its configuration evolves over time.

View more...

Chain of Thought Prompting for LLMs

Aggregated on: 2024-10-11 22:06:28

The advent of ChatGPT and Large Language Models has already affected education. With mixed results and a spectrum of ethical acceptability, students can use chat-tuned LLMs to plan, as a starting point for research, to edit and suggest stylistic or grammatical improvements, or even as a ghostwriter to write assignments. The well-known non-profit Khan Academy offers its own personalized tutor, Khanmigo, developed in partnership with OpenAI to guide learners using an inductive approach. But despite impressive capabilities in many domains, even the largest and most advanced LLMs exhibit surprising failures, especially in math. If LLMs are prone to glaring mistakes befitting learning students themselves, how can they be expected to act as a trustworthy teaching tool by Khan Academy?

View more...

An Overview of TCPCopy for Beginners

Aggregated on: 2024-10-11 20:06:28

With the rapid development of Internet technology, server-side architectures have become increasingly complex. It is now difficult to rely solely on the personal experience of developers or testers to cover all possible business scenarios. Therefore, real online traffic is crucial for server-side testing. TCPCopy [1] is an open-source traffic replay tool that has been widely adopted by large enterprises. While many use TCPCopy for testing in their projects, they may not fully understand its underlying principles. This article provides a brief introduction to how TCPCopy works, with the hope of assisting readers. Architecture The architecture of TCPCopy has undergone several upgrades, and this article introduces the latest 1.0 version. As shown in the diagram below, TCPCopy consists of two components: tcpcopy and intercept. tcpcopy runs on the online server, capturing live TCP request packets, modifying the TCP/IP header information, and sending them to the test server, effectively "tricking" the test server. intercept runs on an auxiliary server, handling tasks such as relaying response information back to tcpcopy.

View more...

Test-Driven Generation: Adopting TDD Again, This Time With Gen AI

Aggregated on: 2024-10-11 17:06:27

You know, over the past few years, software development has gone through some pretty exciting changes. New tools and methodologies have popped up, all aiming to make our lives easier, streamline processes, and boost code quality. One of the big players in this space has been Test-Driven Development (TDD). If you're not familiar, TDD is where developers write test cases for functionality before they actually write the code. It's a neat idea, but let's be real — TDD can be tough to get the hang of! From my own experiences, I gotta admit: TDD is hard! It demands time, practice, and a whole lot of discipline to master. But here's the thing — the rise of Generative AI is opening up some awesome new possibilities to make this technique even better. By combining 1) TDD, 2) Pair Programming, and 3) Generative AI, I want to introduce you to a new approach: Test-Driven Generation (TDG).

View more...

Network Guardians: Crafting a Spring Boot-Driven Anomaly Detection System

Aggregated on: 2024-10-11 15:06:27

We’re going to set out on a mind-blowing tour around network security. Upon considering the nearness and risk posed by cyber threats in this epoch, it is important to prevent the threats so that they do not cause irreversible damage within the network. This three-part article series will take you through the process of developing a network anomaly detection system using the Spring Boot framework in a robust manner. The series is organized as follows: Part 1: We’ll concentrate on the foundation and basic structure of our detection system, which has to be created. Part 2: The second volume deals with how to assist in controlling the diffusion of sensitive network information as it targets advanced techniques for actively monitoring the network at the present time. Part 3: In the last part, machine learning methods will be applied to the developed system, including algorithms, which will increase the system's performance in terms of accuracy and ability to detect anomalies. By the end of this series, you will have acquired quite a lot of knowledge in developing a strong-based network anomaly detection system using Spring Boot and making use of technologies to improve your organization’s security level.

View more...

Automating PMO Meetings With n8n Automation

Aggregated on: 2024-10-10 23:06:27

In today's world data and time are two of the most valuable things. The power of data is always in the news, but what about time? There are a ton of operations that are still being done manually which can easily be automated. Today, I am going to talk about one of those manual tasks that take an eternity to be completed. Yes, I am talking about the prep for PMO meetings. But you may ask: how can you automate it? Well, here is how I did it using n8n automation.

View more...

MariaDB Vector Edition: Designed for AI

Aggregated on: 2024-10-10 21:06:27

As a solutions architect with over two decades of experience in relational database systems, I recently started exploring MariaDB's new Vector Edition to see if it could address some of the AI data challenges we're facing. A quick look seemed pretty convincing, especially with how it could bring AI magic right into a regular database setup. However, I wanted to test it with a simple use case to see how it performs in practice.  In this article, I will share my hands-on experience and observations about MariaDB's vector capabilities by running a simple use case. Specifically, I will be loading sample customer reviews into MariaDB and performing fast similarity searches to find related reviews.

View more...

Augmenting the Client With HTMX

Aggregated on: 2024-10-10 19:06:27

This post is part of a series comparing different ways to implement asynchronous requests on the client to augment the latter. So far, I described the process with Vue.js and Alpine.js. Both are similar from the developers' point of view: they involve JavaScript. In this post, I'll focus on HTMX, whose approach is quite different.

View more...

Operationalize a Scalable AI With LLMOps Principles and Best Practices

Aggregated on: 2024-10-10 17:06:27

Organizations are fully adopting Artificial Intelligence (AI) and proving that AI is valuable. Enterprises are looking for valuable AI use cases that abound in their industry and functional areas to reap more benefits. Organizations are responding to opportunities and threats, gain improvements in sales, and lower costs. Organizations are recognizing the special requirements of AI workloads and enabling them with purpose-built infrastructure that supports the consolidated demands of multiple teams across the organization. Organizations adopting a shift-left paradigm by planning for good governance early in the AI process will minimize AI efforts for data movement to accelerate model development. In an era of rapidly evolving AI, data scientists should be flexible in choosing platforms that provide flexibility, collaboration, and governance to maximize adoption and productivity. Let's dive into the workflow automation and pipeline orchestration world. Recently, two prominent terms have appeared in the artificial intelligence and machine learning world: MLOps and LLMOps. 

View more...

Custom Domains for HTTP/2 on Heroku

Aggregated on: 2024-10-10 15:06:27

Several months ago, Heroku announced HTTP/2 support from browser to router. This is pretty awesome, as it means our Heroku applications can now reap the benefits of multiplexing and stream prioritization. It looks like Heroku’s roadmap will eventually get HTTP/2 all the way to the dyno, which means we’ll get gRPC down the road, too. Sweet. But, as I read the announcement more closely, I noticed something that’s worth paying attention to:

View more...

Leveraging Seekable OCI: AWS Fargate for Containerized Microservices

Aggregated on: 2024-10-10 00:06:27

AWS Fargate's Seekable OCI (SOCI) introduces significant performance enhancement for containerized applications by enabling lazy loading of Docker container images. This reduces startup time for Fargate tasks, particularly for large container images, and makes it ideal for applications that need rapid scaling. AWS Fargate is a serverless compute engine that offers many different capabilities:

View more...

Observability for Browsers

Aggregated on: 2024-10-09 23:06:27

Browser agents are essential tools for monitoring and observability in modern web applications, especially with the increasing complexity of both Single Page Applications (SPAs) and traditional multi-page sites. A browser agent operates within a user’s browser, collecting data on performance metrics, errors, user interactions, and network requests, providing real-time insights into the application’s behavior.  For SPAs, browser agents face unique challenges due to the dynamic nature of page transitions, which occur without full reloads. This makes tracking performance metrics, memory leaks, and state changes over time more complex, as data needs to persist and update continuously without the typical page lifecycle events seen in multi-page applications. Conversely, in traditional multi-page websites, challenges arise around data loss due to ephemeral web pages, where navigating away from a page could result in the loss of unsent data. 

View more...

Microservice Proliferation: Too Many Microservices

Aggregated on: 2024-10-09 22:06:27

Microservices architecture promotes the development of applications, as suites of small, independent, loosely coupled services. Because of its numerous advantages (e.g., scalability, reliability, faster development cycles, easier maintenance of individual services, etc., detailed in this article), it has gained significant traction in the software industry lately and organizations are building their applications following microservices architecture. However, it comes with a few pitfalls as well. Recently while working on a use case at work, I observed the other side of microservices architecture, i.e., microservices proliferation. This article is an attempt to detail the pitfalls associated with the excessive creation of microservices (microservices proliferation), offering insights on their causes, implications, and potential strategies for mitigation.

View more...

The Importance Of Verifying Your GitHub Environment’s Security Controls

Aggregated on: 2024-10-09 21:06:27

Security is a top priority of every company. It’s not surprising: source code, the most critical asset of any organization, should be under reliable protection — especially in view of constantly rising threats. Ransomware, infrastructure outages, vulnerabilities, and other threats can strike your GitHub repository at any time. Organizations, especially those that operate in the most regulated industries, can face a few main challenges regarding their GitHub data protection. The first one, we have already mentioned — it’s the value of the data stored in the repositories. The second one is their ability to forecast any event of failure and take proactive measures to make sure that their data is available and recoverable in any event of failure.

View more...

Decoding LLM Parameters, Part 2: Top-P (Nucleus Sampling)

Aggregated on: 2024-10-09 19:06:27

LLM Parameters Like any machine learning model, large language models have various parameters that control the variance of the generated text output. We have started a multi-part series to explain the impact of these parameters in detail. We will conclude by striking the perfect balance in content generation using all of these parameters discussed in our multi-part series. Welcome to the second part, where we discuss another well-known parameter, "Top-P."

View more...

Modify JSON Data in Postgres and Hibernate 6

Aggregated on: 2024-10-09 18:06:27

This is another article in the series related to supporting the Postgres JSON functions in a project using the Hibernate framework with version 6. The topic for the article is modification operations on JSON records. As in the previous article, it is worth mentioning that Postgres might now have such comprehensive operations as other NoSQL databases like MongoDB for JSON modification (although, with the proper function constructions, it is possible to achieve the same effect). It still suits most projects that require JSON modification. Plus, with transaction support (not support in a NoSQL database at such a level), it is a pretty good idea to use Postgres with JSON data. Of course, NoSQL databases have other benefits that might suit better projects. There are generally many articles on Postgres' support for JSON. This article focuses on integrating this support with the Hibernate 6 library. 

View more...

Being the Glue: Managing a Zero-to-One Software Project Across Multiple Teams

Aggregated on: 2024-10-09 17:06:27

In software engineering, the role of a “Glue” is vital yet often overlooked. This term refers to the person who connects various teams, ensuring that a complex project with many moving parts comes together seamlessly. If you’re leading a zero-to-one software project that spans more than a couple of teams, your role as the Glue becomes even more critical. This article explores strategies for managing team dependencies, scheduling demos, building alignments, and adapting to pivots while maintaining focus on user needs. 1. Managing Team Dependencies When working across multiple teams, managing dependencies is one of the biggest challenges. Each team might have its own goals, timelines, and constraints, which can create friction if not carefully coordinated. Here’s how to effectively manage these dependencies:

View more...

DocAI: PDFs/Scanned Docs to Structured Data

Aggregated on: 2024-10-09 16:06:27

Problem Statement The "why" of this AI solution is very important and prevalent across multiple fields. Imagine you have multiple scanned PDF documents:

View more...

Introducing the New Dapr Jobs API and Scheduler Service

Aggregated on: 2024-10-09 15:06:26

The Dapr 1.14 release last month included many new capabilities and was feature-packed. This included the addition of a new Jobs API and Scheduler control plane service for managing jobs. Over the years, the Dapr project was often requested to include a Jobs API. The Scheduler service enables this and is designed to address the performance and scalability improvements on Actor reminders and the Workflow API. In this post, I am going to deep dive into the details of how the Scheduler service was designed and its implementation to give you some background. Prior to v1.14 if you wanted to schedule a job, you could use the Cron binding component to implement recurring jobs on a regular defined schedule; for example, automating database backups, sending out recurring email notifications, running routine maintenance tasks, data processing, and ETL, running system updates and batch processing. However, the binding approach lacked in the areas of durability and scalability, and more importantly, could not be combined with other Dapr APIs. For example, another frequent request is to be able to have delayed messages for pub/sub, and there will undoubtedly be other delayed job scenarios that will emerge.

View more...

Optimizing IoT Performance in Industrial Environments

Aggregated on: 2024-10-09 14:06:26

Internet of Things (IoT) devices have become common in industrial environments, giving users better visibility, control, and capabilities. However, making the IoT product work well requires knowing how to optimize software and hardware-related aspects.  1. Ensure the IoT Device Has Adequate Hardware People must first consider how they will use the IoT device and then evaluate whether it has the appropriate hardware capabilities to meet relevant current and future needs. A good starting point is to examine the storage, memory, and processing performance and verify that it aligns with the proposed use cases. 

View more...

The Art of Full Stack Debugging

Aggregated on: 2024-10-09 13:06:26

Full stack development is often likened to an intricate balancing act, where developers are expected to juggle multiple responsibilities across the front end, back end, database, and beyond. As the definition of full-stack development continues to evolve, so too does the approach to debugging. Full stack debugging is an essential skill for developers, as it involves tracking issues through multiple layers of an application, often navigating domains where one’s knowledge may only be cursory. In this blog post, I aim to explore the nuances of full-stack debugging, offering practical tips and insights for developers navigating the complex web of modern software development. Notice that this is an introductory post focusing mostly on the front-end debugging aspects. In the following posts, I will dig deeper into the less familiar capabilities of front-end debugging.

View more...

Redefining Java Object Equality

Aggregated on: 2024-10-08 23:06:26

Equality in Java Object equality is often a hot topic for assessing concepts and one of the pillars (the other is- hashCode()) of how many of the implementations of Collection Frameworks work. We check equality by providing our own implementation for  the method public booleanjava.lang.Object#equals(java.lang.Object other). According to Oracle documentation, the following mandates should be adhered to: It is reflexive: For any non-null reference value x, x.equals(x) should return true. It is symmetric: For any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true. It is transitive: For any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true. It is consistent: For any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects are modified. For any non-null reference value x, x.equals(null) should return false. Please note that there exist a few more related to using it along with hashCode(), but we do not discuss them here for brevity, assuming the readers are already aware of them.

View more...

Starting to Care About Security

Aggregated on: 2024-10-08 22:06:26

In my last post, I discussed the issue of getting people to care about security, and how it’s largely due to a focus on security behaviors rather than security outcomes. In this post, I’m picking up where I left off, and will talk about… Forging a Path Forward Obviously, the point of sharing this post (and the last one) is to do more than just complain about the situation. This will only be useful if it offers ideas and suggestions for approaching the problem differently and moving past it to a more successful outcome. So, what actionable advice do I have?

View more...

Enhancing Performance With Data Modeling: Techniques and Best Practices for Optimization in Snowflake

Aggregated on: 2024-10-08 21:06:26

Snowflake is a powerful cloud-based data warehousing platform known for its scalability and flexibility. To fully leverage its capabilities and improve efficient data processing, it's crucial to optimize query performance.  Understanding Snowflake Architecture Let’s briefly cover Snowflake architecture before we deal with data modeling and optimization techniques. Snowflake’s architecture consists of three main layers:

View more...

Cloud Cost Optimization: New Strategies for the AI Era

Aggregated on: 2024-10-08 20:06:26

In today's volatile economic landscape, enterprises are scrutinizing their cloud bills more than ever. Platform teams are at the forefront of this challenge, tasked with finding innovative ways to optimize usage and drive down costs. To gain insights into this evolving field, we spoke with Kapil Thangavelu, co-founder and CTO of Stacklet and the creator and lead maintainer of Cloud Custodian. Let's dive into his perspectives on the latest trends in cloud cost optimization. The Changing Landscape of Cloud Costs Q: What's different about the cloud cost outlook today compared to recent years, from your point of view?

View more...

Understanding the Differences Between Rate Limiting, Debouncing, and Throttling

Aggregated on: 2024-10-08 19:06:26

When developing, we often encounter rate limiting, debouncing, and throttling concepts, such as debouncing and throttling in the front end with event listeners and rate limiting when working with third-party APIs. These three concepts are at the core of any queueing system, enabling us to configure the frequency at which functions must be invoked over a given period. While this definition sounds simple, the distinction between the three approaches can take time to grasp. If my Inngest function is calling the OpenAI API, should I use rate limiting or throttling? Similarly, should I use debouncing or rate limiting if my Inngest Function is performing some costly operation?

View more...

PostgreSQL Everywhere and for Everything

Aggregated on: 2024-10-08 18:06:26

PostgreSQL is one of the most popular SQL databases. It’s a go-to database for many projects dealing with Online Transaction Processing systems. However, PostgreSQL is much more versatile and can successfully handle less popular SQL scenarios and workflows that don’t use SQL at all. In this blog post, we’ll see other scenarios where PostgreSQL shines and will explain how to use it in these cases. How It All Started Historically, we focused on two distinct database workflows: Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP).

View more...

Security at the Onset: Stabilizing CSPM and DevSecOps

Aggregated on: 2024-10-08 17:06:26

The time for rapid technology development and cloud computing is perhaps the most sensitive time when security issues are of great importance. It is here that security will have to be injected into a process right from the beginning — be it software development or cloud infrastructure deployment. Two concepts that are very influential in doing so are CSPM and DevSecOps.  Don't worry if these terms seem complicated — all they really mean is the inclusion of security within how companies build and manage their cloud environments and software pipelines.  

View more...