teleren/devto huggingface dataset:
Exploring AgenSQL Architecture...
Tags: apacheage, postgres, database, architecture
Published: 2023-06-28 15:53:50

## Introduction
Organizations are turning to superior and too-scale databases to cope with their data management needs. AgensSQL, based on PostgreSQL Database Management System, has become a popular integrated choice due to its extended characteristics and backing by an attentive community. It is intended as an adjustable and powerful solution for different types of data management responsibilities. In this article, we look into the leading traits of AgensSQL architecture and how it can improve your data experience.

## Extensive Feature Set
AgensSQL offers an array of features that take advantage of open-source technologies. Its interface works harmoniously with a variety of open-source tools and frameworks, enhancing its efficacy. Redundancy mechanisms, high-speed data transfer capabilities, and other functions are all available to meet the varying needs of modern data management systems. Employing these features can help businesses optimize their data operations and simplify their processes.

## Architecture
AgensSQL architecture incorporates a monitoring system called POWA (PostgreSQL Workload Analyzer). POWA enables administrators to gain insights into database performance, identify bottlenecks, and optimize resource allocation, resulting in improved overall system efficiency.

## Conclusion
AgensSQL is an integrated database platform constructed on PostgreSQL that offers users a versatile and adjustable data administration solution. Its modular structure allows for customizing to suit the unique needs of businesses, whether they be small start-ups or large enterprises. Through using its vast array of features and tools, companies can gain better control over their data operations, optimize performance and simplify their operations. With AgensSQL Architecture at its core: firms have access to a powerful yet flexible system to manage their data effectively.


Reference
[https://github.com/bitnine-oss/agens-sql#agens-sql-architecture](https://github.com/bitnine-oss/agens-sql#agens-sql-architecture)
Webvium Browser dev releases
Tags: browser, product, testing, java
Published: 2023-06-28 15:37:34

## Webvium Browser 
A lightweight, fast, material-inspired web browser specifically designed for Android and supported devices.
Despite its low app size of 500KB, it offers amazing features that enchance your browsing experience.

You can download the dev version of Webvium at https://mrepol742.github.io/webviumdev and immerse yourself in a new and awesome browsing experience. The browser is fully optimized and design with a material-based interface, carefully choosing colors and icons to provide an aesthetically pleasing experience.

My webvium browser takes pride in being the lightest, fastest, secure and private android web browser. It has been programmed and designed from scratch, ensuring top-notch performance and plethora of features. 

I build this app using Java and support Android 5.0 to the latest version of android, it also supports windows 11 using WSA.

Try it now, it's just 500KB perhaps the smallest android app pack with features you havent seen.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/03aj13z4v9expm8kh50a.png)
https://mrepol742.github.io/webviumdev
Postgres SQL for Dummies: Vacuum Processing (Part 6)
Tags: database, apache, apacheage, postgres
Published: 2023-06-28 15:34:03

Vacuum processing is definitely one of those features which makes Postgres SQL great. It essentially removes dead tuples and freezes transaction ids to ensure the smooth operation of the database.

## VACUUM
Two modes are provided for dead tuples removal: Concurrent VACUUM and Full VACUUM. In concurrent VACUUM transactions can still be made while the dead tuples are being removed but in Full VACUUM the table is locked until all the dead tuples are removed. This VACUUM implementation used to be manual until v8 which supports an *autovacuum* daemon. In v8.4 the visibility map that we referred to in a previous post was introduced. It helps skips pages that do not contain dead tuples making the complete process more efficient.

### Concurrent VACUUM
#### First Block
This block performs freeze processing and removes index tuples that point to dead tuples.

#### Second Block
In this block the dead tuples are actually removed and FSM and VM are also updated in a page-by-page fashion. 

#### Third Block
It performs the required clean-up and update the statistics.

###Full VACUUM
While the concurrent VACUUM removes the dead tuples, it does not help much with the table size reduction hence hindering the performance. This is exactly why you need a full VACUUM. It does both delete dead tuples while also helping in the size reduction.

## Freeze processing 
Freeze processing freezes old transaction ids. It is a part of VACUUM processing itself. It has two modes: lazy mode and eager mode. Lazy mode scans pages with dead tuples, while eager mode scans all pages regardless of dead tuples.

The PARALLEL option allows parallel processing of vacuuming index and cleaning index phases in the VACUUM command.

The other two important features that make Postgres stand out are the removal of unnecessary clog files as discussed in part 5 and the autovacuum daemon which handles the vacuums.
Postgres SQL for Dummies: Concurrency Control (Part 5)
Tags: database, apache, apacheage, postgres
Published: 2023-06-28 15:27:55

Let's assume that you are working as an Engineer designing some new kind of database, what's the most important thing that you need to make sure exists in your database system for it to be practical? Well it would have to be the ACID properties. Even among the ACID properties the two most important ones are atomicity and isolation. This is exactly why we need concurrency control. It helps us maintain these two properties in Postgres. 

There are three broad concurrency control techniques: Multi-version Concurrency Control (MVCC), Strict Two-Phase Locking (S2PL), and Optimistic Concurrency Control (OCC), each with its own set of variations as well. Needless to say this might get a little complicated here but I'll try my best to keep it simple. MVCC is simple; there's two versions when writing, the old version and the new version and both are maintained, readers don’t block writers, and writers don’t block readers. S2PL is a locking based mechanism instead where the one who has the lock at a particular time can perform and operation only while others wait to attain the lock. Snapshot Isolation (SI) is a complex version of MVCC used by Postgres. It's essentially just like having a backup always and when someone wants to read data, we lookup the transaction id, apply some visibility checks and see where should we read from; the backup or the updated data. 

Transaction IDs serve as unique identifier for the the transactions. There are special txids as well indicating things like frozen transactions and so on. 

##Heap Tuple
This a very important data structure that stores a bunch of relevant information such as which transaction id updated the tuple, which transaction id inserted the tuple, how many commands were executed, etc. Insertion, Deletion, and Updating is made possible by using this data structure and manipulating its fields to maintain consistency. 

When inserting an index tuple, PostgreSQL uses the FSM (Free Space Map) of the corresponding table or index to select the page which can be inserted it. Commit log holds the statuses of all the transactions. There's four statuses: IN_PROGRESS, COMMITTED, ABORTED, and SUB_COMMITTED.

##Transaction Snapshot
It is the snapshot of all the transactions and their statuses at a particular point in time. 

##Visibility Rule Checks
In this part we have all the things mentioned above in the article and based on certain rules we can check whether a transaction is visible or invisible. Let's explore Rule 1 only to get the idea: Rule 1: *If Status(t_xmin) = ABORTED ⇒ Invisible*. Now since tx_min deals with insertion, if insertion is aborted it makes sense that the transaction becomes invisible. 

##Serializable Snapshot Isolation
In order to prevent anomalies like Dirty Reads, Non-Repeatable Reads, and Phantom Reads, SSI is used. It uses a graph based approach and tries to make sure no cycle is produced.
Panel - Freshworks Dev Summit 2023
Tags: aws, ai, developers
Published: 2023-06-28 15:08:57

I had the incredible pleasure of being part of Freshworks Dev Summit '23, powered by Amazon Web Services (AWS), where we delved into the fascinating world of AI-led development - Balancing risk with innovation, during an insightful panel discussion.

A big thank you to our moderator Rajeev Purohit for facilitating an engaging conversation with Vivek Raja P S, Vinay Kumar, and Avinash Kumaar.

Congratulations to #freshworks on the launch of Freddy Co-pilot, a remarkable tool that makes developers' lives easier through #generativeai.

I would like to extend a special thanks to Sagata Chakraborti and the Media team for the delightful developer experience interview. The creative setting and meticulous planning truly stood out.

It was a pleasure to meet Jones Zachariah Noel N and Ganesh Samarthyam. Thank you, Tanmay Kapoor, for the invitation and for hosting us!

Stay tuned for a series of upcoming blogs in the realm of AI-led development.

**Gallery**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fu7xp2zevgqlf27u5ktv.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4wicbpinwetn8t2hfbyi.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2wzerfadv8owa4stdcr.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nk0q5hv0q8g39nf2lfkp.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0hy23zw86jl7oo836q35.png)


[LinkedIn Post](https://www.linkedin.com/posts/bhuvanas_freshworks-generativeai-ai-activity-7079803436778602496-o-ag)
HOSTING AND LAUNCHING OF MY FIRST WEBSITE!
Tags: frontend, javascript, backend, programming
Published: 2023-06-28 15:00:40

Hey guys,it's me again,Bright Dev. greetings from wherever you're reading from, I trust yall are doing great. It has been a while since I posted here. 

Well, guess what?  There have been so many improvements on my side. Just on Monday here, I hosted and launched my very first website ( personal site)
 https://brightonwuemeri.com/  , things have been super amazing 😁
though I still have some changes to make on the website, I'm sure you'll enjoy what you'll see.

I know you may ask , why launch a website when it is not fully ready?
Well, I have a few answers to that, to the  reason I launched my website.

First of all,  the website was launched to build a self confidence for myself and to see the result of sacrifices made for since the last 5 months. 

Well, it's  just to have a basic understanding of web hosting and how to get a domain.  

I used  https://www.namecheap.com/ to get my domain while I used  https://www.asurahosting.com/.


Also, I learnt about Secure Sockets Layer (SSL) and its importants to on my website.  With this ssl , I was able to encrypt my website and made sure it's safe for visitors to view 


Lastly, I learnt SEO (search engine optimization), though I haven't applied this on my website.  But believe I'll soon. It's a gradual process. 


So, with the SEO , I am able to understand its usefulness it will be my website.  

It helped me to give more details about my website, thereby making it optimized by search engine. 


Probably somewhere may ask,  how do I make my website optimization? 

Well, you need to code it , right there from your VS Code, in your html.  

And we use the meta tag and its properties such as  name, property, and content.

Basically, with these few details , your website can be optimized. 


Well, this will be the end of it 😊😊 I when you see this, most especially for beginners,  it should be of help to you. And for the Pro out there, I want nothing but a review from you that will go a long way for me. Also, I'm open to being corrected. 

Stay blessed, yall ❤️🙏🏻, Bright Onwuemeri Cares 😊.@justiceorogun @blessing0024
Event Listeners in JavaScript
Tags: javascript, react
Published: 2023-06-28 14:58:21

JavaScript is one of the most well-known and highly used programming languages in the world of coding today, one reason being all the tools it can equip to simplify the life of an engineer. For example, event listeners in JavaScript/React allow programmers to target specific portions of their code in order to carry out certain commands or access certain code blocks without disrupting others. Event listeners are a fundamental aspect of JavaScript that allow developers to make web pages interactive and responsive. By capturing and responding to user actions, such as clicks, mouse movements, or keyboard inputs, JavaScript empowers developers to create dynamic and engaging web applications.

**What are Events?**
JavaScript events are actions or occurrences that take place within a web page, triggered by user interactions or certain conditions. These events can be detected and responded to by JavaScript code, allowing developers a unique way to achieve whatever objective their program has.

**Different Types of Events**
Events can be "listened" to from several sources, whether it's from your mouse, keyboard, or an interactive component on a webpage(forms). Some mouse events include click, mouseover, and mouseout, and mousemove. While basic events such as click and mouseover may be self-explanatory, events such as mouseout and mousemove, which record the movement of the user's mouse within an element, allow developers a new way to spice up their customer's UI with only a few additional lines of code. Similarly, commonly used events such as 'keypress', which records the pressing and releasing of a key, achieve the same goal. Many developers also integrate the 'keyup' and 'keydown', which just records the pressing and releasing of a key separately, in order to create a more immersive experience within the webpage. Lastly, one of the most important forms of events are just exactly that: forms. Form events such as 'select', 'submit' and 'input', allow developers a way to store any data entered by the user within the form and to create components that use that data. 

In conclusion, event handling is a crucial aspect of JavaScript programming, allowing developers to create unique and interactive web applications that fulfil the requirements of their clients. By understanding the basics of event handling, such as event handlers, DOM event handlers, and event listeners, developers can build more responsive and user-friendly applications.
How did you become a developer? What was the magic moment?
Tags: watercooler, beginners, discuss, career
Published: 2023-06-28 14:32:08

I'll go first. Honestly, the first time I touched a computer was when my parents brought home an Apple ][ Plus computer at around 1986 I think it was. They had no idea how to put it together. I took one look at it and figured out how to hook everything together and it was like magic. 

{% youtube 8_35IqeTD88 %}

The video featured above, although not my own, resonates perfectly with the thrill that surged through me at that moment. The feeling was simply electric. Alongside the computer, I was presented with a set of four programming books on Apple Basic and some software. My curiosity led me to dissect and understand the code visible on the floppy disks.

In my excitement, I modified and personalized the pre-existing commercial software by editing its code. Although, on one occasion, I messed up with a program due to the absence of undo options in those times. However, every step of this process felt like magic and marked the inception of my journey into the world of development.

If you enjoy my technology-focused articles and insights and wish to support my work, feel free to visit my Ko-fi page at https://ko-fi.com/philipjohnbasile. Every coffee you buy me helps keep the tech wisdom flowing and allows me to continue sharing valuable content with our community. Your support is greatly appreciated!
Optimizing API Performance: Exploring Effective Rate Limiting Algorithms
Tags: api, algorithms, systemdesign
Published: 2023-06-28 14:28:01

**Introduction:**
In the realm of API rate limiting, choosing the right algorithm is crucial for maintaining system stability, preventing abuse, and ensuring fair resource distribution. This article delves into several popular rate limiting algorithms and highlights their advantages and disadvantages. By understanding these algorithms, developers can make informed decisions to implement effective rate limiting strategies.

- _Leaky Bucket: Managing Requests with a Queue_

The Leaky Bucket algorithm offers a straightforward and intuitive approach to rate limiting. By utilizing a queue, incoming requests are appended to the end of the queue and processed at a regular interval or through first-in, first-out (FIFO) processing. This algorithm provides control over the request rate by discarding or "leaking" additional requests when the queue is full. We explore the simplicity and limitations of the Leaky Bucket algorithm.

- _Token Bucket: Controlling Access with Tokens_

The Token Bucket algorithm employs the concept of a bucket filled with tokens. Each incoming request requires the consumption of a token from the bucket to proceed. If no tokens are available, the request is refused, and the requester must retry later. This algorithm allows for the refreshing of tokens over a defined time period, ensuring fair distribution of resources. We examine the Token Bucket algorithm's token-based approach and its effectiveness in rate limiting scenarios.

- _Fixed Window: Rate Limiting within Fixed Time Windows_

The Fixed Window algorithm tracks request rates within fixed time windows. By using a window size of n seconds, each incoming request increments a counter for the respective window. If the counter exceeds a predefined threshold, the request is discarded. We explore the simplicity and limitations of the Fixed Window algorithm and its ability to handle bursty traffic.

- _Sliding Log: Dynamic Rate Limiting with Time-stamped Logs_

The Sliding Log algorithm employs time-stamped logs to track and enforce rate limits. These logs are stored in a time-sorted hash set or table, with older logs discarded beyond a threshold. When a new request arrives, the algorithm calculates the sum of logs within a specified time range to determine the request rate. If the request exceeds the threshold rate, it is held. We delve into the flexibility and considerations of the Sliding Log algorithm.

- _Sliding Window: Balancing Performance and Precision_

The Sliding Window algorithm combines elements of both the Fixed Window and Sliding Log algorithms to achieve a balance between processing cost and precise rate limiting. Similar to the Fixed Window algorithm, it tracks a counter for each fixed window. Additionally, it accounts for the weighted value of the previous window's request rate based on the current timestamp, enabling a smoother handling of traffic bursts. We analyze the advantages and trade-offs of the Sliding Window algorithm.
MVP: The cure to developers block
Tags: webdev, beginners, productivity
Published: 2023-06-28 14:26:57


As a developer, you have probably struggled with completing a project at some point. Don't fret, most developers have been in your shoes before. One proven way to break out of that cycle is building each project as MVP. 

## What is Minimum Viable Product
Minimum viable product (MVP), is a product that has enough features to attract early adopters and validate the idea behind the product. Here, the features of the product is structured and developed by order of priority. It is like breaking down a complex project into small chunks of tasks and ticking each feature one box at a time. The product referred to here is that mind blowing project you want to build for your portfolio. 

## Importance of building MVP
The endpoint of MVP is to use customers feedback to build a mature product. Building with MVP in view allows you develop a product from the lens of the customer. Whether you're building an MVP for production or for learning purposes, it helps you to break free from the developers block. Even though your product isn't profit oriented,yet, it will help you to showcase your achievements and celebrate your small victories.

## Steps in building MVP
1. Write down the features of your desired product.
2. Arrange these features in order of priority from the user perspective.
3. Categorize features into phases. 
Note:Some features can come after the product has been deployed. 
4. Build your product one phase at a time. 

## Still confused about MVP?
As a developer especially newbies, there's a lot of pressure to learn a whole lot within a short time frame. Building your small projects as MVPs will help you to:
- build faster
- practice as you learn
- share your work progress with others
- reduce the hassle of being stuck in a project for years.

Say goodbye to dev block while building with MVP in mind.
"The Internals of Postgresql" chapter #7
Tags: postgres, database
Published: 2023-06-28 14:21:41

## **Heap Only Tuple**
Heap Only Tuple (HOT) is a feature implemented in PostgreSQL version 8.3 to optimize the storage and update of rows in a table with an index. 

##

* **Without HOT**: updating a row in a table requires inserting a new version of the row and a new index tuple in the index page, which consumes index page space and incurs high inserting and vacuuming costs for the index tuples.

* **HOT allows PostgreSQL to** store the updated row version in the same table page as the old row version, without inserting a new index tuple in the index page. This optimization effectively utilizes the pages of both the index and table and reduces the need for VACUUM processing.

##

## **Index-Only Scans**
Index-only scans are a technique used by relational database management systems (RDBMS) to directly use the index key without accessing the corresponding table pages when all the target entries of the SELECT statement are included in the index key. This technique reduces the I/O cost. PostgreSQL has introduced this option since version 9.2. 

##

When using an index scan, PostgreSQL has to check the visibility of the tuples in principle, and the index tuples do not have any information about transactions such as the t_xmin and t_xmax of the heap tuples. Therefore, PostgreSQL has to access the table data to check the visibility of the data in the index tuples. 

##

To avoid this, PostgreSQL uses the visibility map of the target table. If all tuples stored in a page are visible, PostgreSQL uses the key of the index tuple and does not access the table page that is pointed at from the index tuple to check its visibility. Otherwise, PostgreSQL reads the table tuple that is pointed at from the index tuple and checks the visibility of the tuple, which is the ordinary process.