Get Mystery Box with random crypto!

Computer Science and Programming

Categories: Technologies
Language: English
Subscribers: 156.44K
Description from channel

Channel specialized for advanced topics of:
* Artificial intelligence,
* Machine Learning,
* Deep Learning,
* Computer Vision,
* Data Science
* Python
For Ads: @otchebuch & @cobbl, https://telega.io/c/computer_science_and_programming

Ratings & Reviews

4.00

2 reviews

Reviews can be left only by registered users. All reviews are moderated by admins.

5 stars

1

4 stars

0

3 stars

1

2 stars

0

1 stars

0


The latest Messages 4

2024-02-16 12:33:59
Improving API Performance with Database Connection Pooling

The diagram below shows 5 common API optimization techniques. Today, I’ll focus on number 5, connection pooling. It is not as trivial to implement as it sounds for some languages.

When fulfilling API requests, we often need to query the database. Opening a new connection for every API call adds overhead. Connection pooling helps avoid this penalty by reusing connections.

How Connection Pooling Works

1. For each API server, establish a pool of database connections at startup.
2. Workers share these connections, requesting one when needed and returning it after.

Challenges for Some Languages

However, setting up connection pooling can be more complex for languages like PHP, Python and Node.js. These languages handle scale by having multiple processes, each serving a subset of requests.

- In these languages, database connections get tied to each process.
- Connections can't be efficiently shared across processes. Each process needs its own pool, wasting resources.

In contrast, languages like Java and Go use threads within a single process to handle requests. Connections are bound at the application level, allowing easy sharing of a centralized pool.

Connection Pooling Solution

Tools like PgBouncer work around these challenges by proxying connections at the application level.

PgBouncer creates a centralized pool that all processes can access. No matter which process makes the request, PgBouncer efficiently handles the pooling.

At high scale, all languages can benefit from running PgBouncer on a dedicated server. Now the connection pool is shared over the network for all API servers. This conserves finite database connections.

Connection pooling improves efficiency, but its implementation complexity varies across languages.
26.7K views09:33
Open / Comment
2024-02-12 17:14:59
Leveraging SAM for Single-Source Domain Generalization in Medical Image Segmentation

https://arxiv.org/pdf/2401.02076.pdf

https://github.com/SARIHUST/SAMMed

@computer_science_and_programming
29.6K views14:14
Open / Comment
2024-02-08 19:19:33
Monolithic VS Microservices Architecture. Which one are you using?

In the realm of software architecture, the choice between Monolithic and Microservices can shape the destiny of your application. Let's break down the key differences in a nutshell!

1. Monolithic Architecture

- One Big Castle: Monoliths are like a majestic castle, where all components (database, server, user interface) are tightly knit into a single structure.

- Unified & Simple: Easy to develop and deploy due to its unified structure. Changes are made in one place, making coordination a breeze.

- Scaling Challenges: Scaling can be a challenge. When one aspect needs upgrading, the entire application must be scaled, even if only a small part requires more resources.

2. Microservices Architecture

- City of Specialized Buildings: Microservices resemble a bustling city, with each service as a specialized building handling a distinct function.

- Scalability & Flexibility: Offers scalability on a per-service basis. If one part of the application needs more resources, you can scale just that service.

- Increased Complexity: As the number of services grows, managing the communication between them can become complex. Decentralization brings its own set of challenges.
38.3K views16:19
Open / Comment
2024-02-05 12:22:12
Ever wondered how your computer securely communicates with a remote server?

Let's dive into the magic behind SSH and unravel its secrets.

1. What is SSH?
SSH, or Secure Shell, is a cryptographic network protocol that enables secure communication between two devices over an unsecured network. It's like a secure tunnel for your data!

2. Key Players: Public and Private Keys
SSH uses a pair of cryptographic keys – a public key (shared with the world) and a private key (kept super-secret). When you connect, these keys perform a digital handshake to ensure a secure connection.

3. The Handshake Dance: Authentication
The handshake involves your computer proving its identity using the private key, and the server verifying it using the corresponding public key. Think of it as a secret password exchange, but way cooler!

4. Encryption Enchantment: Securing the Chat
Once the handshake is complete, SSH wraps your data in layers of encryption, ensuring that even if someone intercepts it, they'll find nothing but gibberish.

5. Port Perfection: Default Port 22
SSH communicates through port 22 by default. It's like the entrance to your secure data party! But beware, changing ports adds an extra layer of security.

SSH is the superhero of secure communication, ensuring your data remains confidential, and the connection is trustworthy. Next time you SSH, remember the cryptographic dance happening in the background, making it all possible!
17.2K views09:22
Open / Comment
2024-02-01 15:12:58
Public vs Internal Load Balancers: Unveiling the Power of Balance!

Load balancing is the unsung hero of seamless digital experiences, and choosing between public and internal load balancers can be a game-changer. Let's dive into the key differences in a nutshell!

Public Load Balancers:
- Audience: Everyone, Everywhere!
- Designed to distribute incoming traffic across public-facing servers.
- Ideal for applications accessible over the internet, such as websites or APIs.
- Acts as the gateway, directing external requests to the right internal resources.

Internal Load Balancers:
- Keep it in the Family:
- Tailored for distributing traffic within a private network or data center.
- Perfect for applications serving internal users or specific services behind the scenes.
- Enhances security by keeping sensitive systems shielded from the public eye.

How to Choose?
- Public:
- Opt for when your services need to be accessible from the internet.
- Ideal for handling high volumes of external traffic.
- Best suited for public-facing applications like websites or APIs.
15.2K views12:12
Open / Comment
2024-01-29 14:13:16
18 most used Linux commands YOU MUST KNOW

- ls
- mv
- ssh
- cd
- cat
- sudo
- pwd
- grep
- top
-mkdir
- find
- wget
- rm
- chmod
- tar
- cp
- chwon
- gzip
16.8K views11:13
Open / Comment
2024-01-25 23:08:01
Public Static Void Main(String[] args) Explained.

public: An access modifier keyword that indicates the class (MainClass) is accessible from outside the package.

class: A keyword used to declare a class in Java.
MainClass: The name of the class. It follows the naming conventions for classes in Java.

{ and }: Curly braces define a block of code. In this case, they enclose the body of the class.

public: An access modifier keyword indicating that the main method can be called from outside the class.

static: A keyword indicating that the main method belongs to the class itself rather than to an instance of the class.

void: A keyword indicating that the main method does not return any value.

main: The name of the method. It is the entry point for the Java program.

(String[] args): The method parameter list. String[] args is an array of strings that can be used to pass command-line arguments to the program.

System.out.println("Hello, World!");: A statement that prints the string "Hello, World!" to the console. System.out is an object representing the console output, and println is a method to print a line.
18.7K views20:08
Open / Comment
2024-01-21 13:32:59
Explore Human Parsing Modality for Action Recognition

https://arxiv.org/pdf/2401.02138.pdf

https://github.com/liujf69/EPP-Net-Action
15.1K views10:32
Open / Comment
2024-01-17 20:19:24
6 Software ARCHITECTURAL PATTERNS

- Event Driven
- Layered
- Monolithic
- Microservice
- MVC
- Master Slave
20.2K views17:19
Open / Comment
2024-01-14 18:20:09
NoSQL vs SQL

NoSQL databases provide flexible data models ideal for diverse data structures and scalability.

1. Key-Value: Simple, uses key-value pairs (e.g., Redis).
2. Document: Stores data in JSON/BSON documents (e.g., MongoDB).
3. Graph: Manages complex relationships with nodes and edges (e.g., Neo4j).
4. Column Store: Optimized for analytics, organizes data by columns (e.g., Cassandra).

SQL databases, like RDBMS and OLAP, provide structured, relational storage for traditional and analytical needs

1. RDBMS: Traditional relational databases with tables (e.g., PostgreSQL & MySQL).
2. OLAP: Designed for complex analysis and multidimensional data (e.g., SQL Server Analysis Services).
15.7K views15:20
Open / Comment