VENDO
* BAIC X35.
* Modelo 2021 (se comprรณ 0km en el 2022)
* 46.600 km
* Motor 1.5, nafta
* Caja Automรกtica
* Techo solar panorรกmico
* Cubiertas nuevas
* Mantenimiento al dรญa en el representante
* Gs. 85.000.000
Take advantage of all the benefits of @OracleDatabase 23ai innovations with #AutonomousDatabase.
See how you can get started today: https://t.co/GSJUAlCl9N
Patrones de Arquitectura que debes conocer โ
1. Arquitectura Orientada a Eventos
Los componentes del sistema se comunican entre sรญ mediante eventos. Los productores de eventos generan datos y los envรญan a un intermediario, quien luego los distribuye a los consumidores de eventos interesados.
Ventajas: Escalable y desacoplado
Desventajas: Difรญcil de depurar y puede haber latencia
Se usa: Para eventos en tiempo real o aplicaciones grandes que deben sincronizarse frecuentemente
2. Arquitectura por Capas
Organiza el sistema en capas jerรกrquicas, cada una con una responsabilidad especรญfica como presentaciรณn, lรณgica de negocio y acceso a datos.
Ventajas: Fรกcil de mantener y reutilizar
Desventajas: Puede afectar el rendimiento y ser rรญgido
Se usa: En aplicaciones empresariales con reglas de negocio complejas
3. Monolito
Todo el sistema estรก integrado en una sola aplicaciรณn grande donde todos los componentes estรกn interconectados.
Ventajas: Fรกcil de desarrollar inicialmente y buen rendimiento
Desventajas: Difรญcil de escalar y mantener a largo plazo
Se usa: En aplicaciones mรกs simples que no requieren escalabilidad avanzada
4. Microservicios
El sistema se divide en pequeรฑos servicios independientes que se comunican a travรฉs de API.
Ventajas: Altamente escalable y flexible
Desventajas: Mรกs complejo de gestionar y puede aumentar la latencia
Se usa: En aplicaciones grandes y complejas que requieren despliegue independiente
5. MVC (Modelo-Vista-Controlador)
Patrรณn que divide la aplicaciรณn en Modelo (datos y lรณgica), Vista (interfaz de usuario) y Controlador (manejo de la entrada del usuario).
Ventajas: Facilita la gestiรณn y la reutilizaciรณn
Desventajas: Aรฑade complejidad y puede generar sobrecarga
Se usa: En frontend (web y mรณvil) para separar la lรณgica de negocio de la interfaz de usuario
6. Arquitectura Maestro-Esclavo
Un servidor maestro maneja las operaciones de escritura, mientras que los servidores esclavos manejan las operaciones de lectura.
Ventajas: Mejora el rendimiento y la disponibilidad
Desventajas: Problemas de consistencia y mayor complejidad
Se usa: Para bases de datos a gran escala que requieren balanceo de carga
.@Oracleโs Keynote at #KubeCon-#CloudNativeCon: how we are operating #AI services on #Cloud native technologies ๐
If you missed it, hereโs some snacked content. You can also join us on our G2 booth & get insights about our solutions & contributions to @KubeCon_ & @CloudNativeFdn
๐ง๐ผ๐ฝ ๐ฎ๐ฌ ๐ฆ๐ค๐ ๐พ๐๐ฒ๐ฟ๐ ๐ผ๐ฝ๐๐ถ๐บ๐ถ๐๐ฎ๐๐ถ๐ผ๐ป ๐๐ฒ๐ฐ๐ต๐ป๐ถ๐พ๐๐ฒ๐
Here is the list of the top 20 SQL query optimization techniques I found noteworthy:
1. Create an index on huge tables (>1.000.000) rows
2. Use EXIST() instead of COUNT() to find an element in the table
3. SELECT fields instead of using SELECT *
4. Avoid Subqueries in WHERE Clause
5. Avoid SELECT DISTINCT where possible
6. Use WHERE Clause instead of HAVING
7. Create joins with INNER JOIN (not WHERE)
8. Use LIMIT to sample query results
9. Use UNION ALL instead of UNION wherever possible
10. Use UNION where instead of WHERE ... or ... query.
11. Run your query during off-peak hours
12. Avoid using OR in join queries
14. Choose GROUP BY over window functions
15. Use derived and temporary tables
16. Drop the index before loading bulk data
16. Use materialized views instead of views
17. Avoid != or <> (not equal) operator
18. Minimize the number of subqueries
19. Use INNER join as little as possible when you can get the same output using LEFT/RIGHT join.
20. Frequently try to use temporary sources to retrieve the same dataset.
Do you know what is ๐ค๐๐ฒ๐ฟ๐ ๐ข๐ฝ๐๐ถ๐บ๐ถ๐๐ฒ๐ฟ? Its primary function is to determine ๐๐ต๐ฒ ๐บ๐ผ๐๐ ๐ฒ๐ณ๐ณ๐ถ๐ฐ๐ถ๐ฒ๐ป๐ ๐๐ฎ๐ to execute a given SQL query by finding the best execution plan. The query optimizer takes the SQL query as input and analyzes it to determine how best to execute it. The first step is to parse the SQL query and create a syntax tree. The optimizer then analyzes the syntax tree to determine how to run the query.
Next, the optimizer generates ๐ฎ๐น๐๐ฒ๐ฟ๐ป๐ฎ๐๐ถ๐๐ฒ ๐ฒ๐ ๐ฒ๐ฐ๐๐๐ถ๐ผ๐ป ๐ฝ๐น๐ฎ๐ป๐, which are different ways of executing the same query. Each execution plan specifies the order in which the tables should be accessed, the join methods, and any filtering or sorting operations. The optimizer then assigns a ๐ฐ๐ผ๐๐ to each execution plan based on the number of disk reads and the CPU time required to execute the query.
Finally, the optimizer ๐ฐ๐ต๐ผ๐ผ๐๐ฒ๐ ๐๐ต๐ฒ ๐ฒ๐ ๐ฒ๐ฐ๐๐๐ถ๐ผ๐ป ๐ฝ๐น๐ฎ๐ป with the lowest cost as the optimal execution plan for the query. This plan is then used to execute the query.
Check in the image the ๐ผ๐ฟ๐ฑ๐ฒ๐ฟ ๐ถ๐ป ๐๐ต๐ถ๐ฐ๐ต ๐ฆ๐ค๐ ๐พ๐๐ฒ๐ฟ๐ถ๐ฒ๐ ๐ฟ๐๐ป.
#technology #softwareengineering #programming #techworldwithmilan #sql
ยกUtilidad super interesante para programadores!
Se llama scc y te dice de un proyecto:
โ La complejidad del cรณdigo
โ Quรฉ lenguajes y tecnologรญas usa
โ Archivos, lรญneas y comentarios de cada uno
Te da los resultados en una tabla โ
๐๐ผ๐ป๐๐ถ๐ป๐๐ผ๐๐ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ ๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ๐
In their book "Continuous Architecture in Practice," authors Murat Erder, Pierre Pureur, and Eoin Woods introduced the critical ideas of continuous architecture. The main topics in this architecture are:
- Moving from top-down perspective design to evolving shared designย
- Introducing artifacts, such as styles & patterns, principles and decisions
It includes the following activities:
๐ญ. ๐ฃ๐ฟ๐ผ๐๐ถ๐ฑ๐ถ๐ป๐ด ๐น๐ฒ๐ฎ๐ฑ๐ฒ๐ฟ๐๐ต๐ถ๐ฝ - Do more leadership and less managing, i.e., allow the team to do the architectural work
๐ฎ. ๐๐ผ๐ฐ๐๐ ๐ผ๐ป ๐พ๐๐ฎ๐น๐ถ๐๐ ๐ฎ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ - Don't be obsessed with features, but the right balance with scenarios
๐ฏ. ๐๐ฟ๐ถ๐๐ถ๐ป๐ด ๐ฎ๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฎ๐น ๐ฑ๐ฒ๐ฐ๐ถ๐๐ถ๐ผ๐ป๐ - Use technical leadership group to make and implement decisions and capture them in an accessible way (ADRs)
๐ฑ. ๐ ๐ฎ๐ป๐ฎ๐ด๐ถ๐ป๐ด ๐๐ฒ๐ฐ๐ต๐ป๐ถ๐ฐ๐ฎ๐น ๐ฑ๐ฒ๐ฏ๐ - Using a unified backlog for visibility and prioritization.
๐ฒ. ๐๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐๐ถ๐ป๐ด ๐ณ๐ฒ๐ฒ๐ฑ๐ฏ๐ฎ๐ฐ๐ธ ๐น๐ผ๐ผ๐ฝ๐ - Measuring quality attributes in automated and manual ways.
Continuous Architecture Principles are:
๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ญ: ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐ ๐ฝ๐ฟ๐ผ๐ฑ๐๐ฐ๐๐. Evolve from projects to products. Architecting products is more efficient than just designing point solutions to projects and focuses the team on its customers.
๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ฎ: ๐๐ผ๐ฐ๐๐ ๐ผ๐ป ๐พ๐๐ฎ๐น๐ถ๐๐ ๐ฎ๐๐๐ฟ๐ถ๐ฏ๐๐๐ฒ๐ rather than on functional requirements. Quality attribute requirements drive the architecture.
๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ฏ: ๐๐ฒ๐น๐ฎ๐ ๐ฑ๐ฒ๐๐ถ๐ด๐ป ๐ฑ๐ฒ๐ฐ๐ถ๐๐ถ๐ผ๐ป๐ ๐๐ป๐๐ถ๐น ๐๐ต๐ฒ๐ ๐ฎ๐ฟ๐ฒ ๐ป๐ฒ๐ฐ๐ฒ๐๐๐ฎ๐ฟ๐. Design architectures based on facts, not on guesses. There is no point in designing and implementing capabilities that may never be usedโit wastes time and resources.
๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ฐ: ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐ ๐ณ๐ผ๐ฟ ๐ฐ๐ต๐ฎ๐ป๐ด๐ฒ. Leverage the "power of small." Big, monolithic, tightly coupled components are complex to change. Instead, leverage small, loosely coupled software elements.
๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ฑ: ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐ ๐ถ๐ ๐ฟ๐ฒ๐๐ฝ๐ผ๐ป๐๐ถ๐ฏ๐น๐ฒ ๐ณ๐ผ๐ฟ ๐ฏ๐๐ถ๐น๐ฑ๐ถ๐ป๐ด, ๐๐ฒ๐๐๐ถ๐ป๐ด, ๐ฑ๐ฒ๐ฝ๐น๐ผ๐๐ถ๐ป๐ด, ๐ฎ๐ป๐ฑ ๐ผ๐ฝ๐ฒ๐ฟ๐ฎ๐๐ถ๐ป๐ด. Most architecture methodologies focus exclusively on software building activities, but architects should also be concerned about testing, deployment, and operation to support continuous delivery.
๐ฃ๐ฟ๐ถ๐ป๐ฐ๐ถ๐ฝ๐น๐ฒ ๐ฒ: ๐ ๐ผ๐ฑ๐ฒ๐น ๐๐ต๐ฒ ๐ผ๐ฟ๐ด๐ฎ๐ป๐ถ๐๐ฎ๐๐ถ๐ผ๐ป ๐ผ๐ณ ๐๐ผ๐๐ฟ ๐๐ฒ๐ฎ๐บ๐ ๐ฎ๐ณ๐๐ฒ๐ฟ ๐๐ต๐ฒ ๐ฑ๐ฒ๐๐ถ๐ด๐ป ๐ผ๐ณ ๐๐ต๐ฒ ๐๐๐๐๐ฒ๐บ ๐๐ผ๐ ๐ฎ๐ฟ๐ฒ ๐๐ผ๐ฟ๐ธ๐ถ๐ป๐ด ๐ผ๐ป. How teams are organized drives the architecture and design of the systems they work on.
#softwaredesign
๐ฆ๐๐๐๐ฒ๐บ ๐๐ฒ๐๐ถ๐ด๐ป: ๐๐ผ๐ ๐๐ผ ๐๐ฒ๐๐ถ๐ด๐ป ๐๐ป๐๐๐ฎ๐ด๐ฟ๐ฎ๐บ
In this post, we continue with the system design series. Let's first discuss the requirements:
๐ญ. ๐ฅ๐ฒ๐พ๐๐ถ๐ฟ๐ฒ๐บ๐ฒ๐ป๐๐:
Functional requirements:
- Upload images from a mobile client
- Users follow other users
- Generate a feed of images
- Scale: 10 million users / upload 2 photos per month, wherever photo have 5MB -> 100TB month -> 1.2PB per year
Non-functional Requirements: Our system should be available. In the case of any web service, itโs a mandatory rule. The system should also be reliable, which means any uploaded photo by users should never be lost.
๐ฎ. ๐๐ฒ๐๐ถ๐ด๐ป ๐ฑ๐ฎ๐๐ฎ ๐๐๐ผ๐ฟ๐ฎ๐ด๐ฒ
First, we create three tables to hold users, photos, and followers:
- User (name, email, location, lastLoginTime)
- Photo (user_id, title, location, URL, creationDate)
- UserFollow (from, to)
๐ฏ. ๐๐ฒ๐๐ถ๐ด๐ป ๐๐๐๐๐ฒ๐บ
The next step is to design the system. The first flow is when we have uploaded the image. From the mobile device, we hit the API gateway (single entry point for all clients), which then hit Load Balancer before going to the write App server. The load balancer is here to distribute the user traffic to many servers.
Here, we keep many copies of the component to remove the single point of failure in the system, making it highly available. This server writes the image metadata to the Metadata DB, while the image is written to the Azure Blob/ AWS S3 or similar service.
To support millions of users, we need to partition our database to divide and store our data into different DB servers. We can use database sharding for metadata. If we partition metadata DB based on โUserID,โ we may keep all the user photos in the same shard. One User seems to have almost 3 TB of data. If one DB shard is 1TB, we will need three data shards for each User.
Reading the images from the system is done via the App server (read), which reuses the cache (e.g., Redis), which reads metadata from the Metadata DB and returns it to the client, which then reads the image itself from the Blob/S3, or do this via CDN close to him.
The third option is a feed of images the user sees in the app. Here, we can use the Feed Generation service, which reads data from the Cache or Metadata DB. Users can get the latest newsfeed from the server using two approaches:
- ๐๐ถ๐ญ๐ญ-๐๐ข๐ด๐ฆ๐ฅ ๐๐ฑ๐ฑ๐ณ๐ฐ๐ข๐ค๐ฉ. In this approach, each User may poll the server after a regular interval to check if any friend has a new update. The server has to find all the user connections and check for each friend to create a new post. If there are new posts, the databaseโs query will get all the recent posts created by a userโs connections.
- ๐๐ถ๐ด๐ฉ-๐๐ข๐ด๐ฆ๐ฅ ๐๐ฑ๐ฑ๐ณ๐ฐ๐ข๐ค๐ฉ. In this approach, servers can push new data to the users as soon as it is available. Users must maintain a long polling request with the server to receive the updates.
#softwarearchitecture #systemdesign #programming
๐ง๐ต๐ฒ ๐๐ฟ๐๐ด๐ฎ๐น ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐
Dr. Werner Vogels at AWS re: Invent 2023 shared his view of the frugal architect.
He mentioned three pillars:
๐ญ. ๐๐ฒ๐๐ถ๐ด๐ป
๐น ๐ ๐ฎ๐ธ๐ฒ ๐๐ผ๐๐ ๐ฎ ๐ก๐ผ๐ป-๐ณ๐๐ป๐ฐ๐๐ถ๐ผ๐ป๐ฎ๐น ๐ฅ๐ฒ๐พ๐๐ถ๐ฟ๐ฒ๐บ๐ฒ๐ป๐: To balance features, time-to-market, and efficiency, consider costs early and often when designing, building, and operating systems.
๐น ๐ฆ๐๐๐๐ฒ๐บ๐ ๐๐ต๐ฎ๐ ๐๐ฎ๐๐ ๐๐น๐ถ๐ด๐ป ๐๐ผ๐๐ ๐๐ผ ๐๐๐๐ถ๐ป๐ฒ๐๐: When income permits, architect systems to achieve economies of scale in line with the profit levers of the business model. Unchecked expansion depletes value in the absence of profitability.
๐น ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐ถ๐ป๐ด ๐ถ๐ ๐ฎ ๐ฆ๐ฒ๐ฟ๐ถ๐ฒ๐ ๐ผ๐ณ ๐ง๐ฟ๐ฎ๐ฑ๐ฒ-๐ผ๐ณ๐ณ๐: Every design decision has trade-offs. It's crucial to regularly re-evaluate technical and business trade-offs and invest in resources aligned with business needs.
๐ฎ. ๐ ๐ฒ๐ฎ๐๐๐ฟ๐ฒ
๐น ๐จ๐ป๐ผ๐ฏ๐๐ฒ๐ฟ๐๐ฒ๐ฑ ๐ฆ๐๐๐๐ฒ๐บ๐ ๐๐ฒ๐ฎ๐ฑ ๐๐ผ ๐จ๐ป๐ธ๐ป๐ผ๐๐ป ๐๐ผ๐๐๐: Despite the initial cost, monitoring systems help businesses identify inefficient procedures, expedite processes, and strategically assign resources to top priorities.
๐น ๐๐ผ๐๐ ๐๐๐ฎ๐ฟ๐ฒ ๐๐ฟ๐ฐ๐ต๐ถ๐๐ฒ๐ฐ๐๐๐ฟ๐ฒ๐ ๐๐บ๐ฝ๐น๐ฒ๐บ๐ฒ๐ป๐ ๐๐ผ๐๐ ๐๐ผ๐ป๐๐ฟ๐ผ๐น๐: With robust monitoring in place, you can take action in areas where you have identified opportunities for improvement. By implementing granular controls, you can optimize for both cost and user experience.
๐ฏ. ๐ข๐ฝ๐๐ถ๐บ๐ถ๐๐ฒ
๐น ๐๐ผ๐๐ ๐ข๐ฝ๐๐ถ๐บ๐ถ๐๐ฎ๐๐ถ๐ผ๐ป ๐ถ๐ ๐๐ป๐ฐ๐ฟ๐ฒ๐บ๐ฒ๐ป๐๐ฎ๐น: Finding cost-effectiveness is a continuous process. Keep an eye on your systems to spot trends and eliminate inefficiencies. System reviews are necessary for ongoing optimization to identify potential improvements.
๐น ๐จ๐ป๐ฐ๐ต๐ฎ๐น๐น๐ฒ๐ป๐ด๐ฒ๐ฑ ๐ฆ๐๐ฐ๐ฐ๐ฒ๐๐ ๐๐ฒ๐ฎ๐ฑ๐ ๐๐ผ ๐๐๐๐๐บ๐ฝ๐๐ถ๐ผ๐ป๐: Always ask yourself why something worked in the past. Despite prior triumphs, review techniques and resources. "We've always done it this way" is one of the most harmful expressions in English, as Grace Hopper infamously said.
#technology #cloudcomputing #aws
ยกLa emociรณn crece para #TestingPY en Villarrica!๐ Un vistazo a nuestros souvenirs: llaveros, calcomanรญas y bolรญgrafos. Prepรกrate para un dรญa de aprendizaje, innovaciรณn y networking este 18 de noviembre.๐ค๐ง #SoftwareTesting#TechEvent#Networking#Innovation#VillarricaTech ๐๏ธ๐