Reader small image

You're reading from  Expert C++ - Second Edition

Product typeBook
Published inAug 2023
PublisherPackt
ISBN-139781804617830
Edition2nd Edition
Right arrow
Authors (5):
Marcelo Guerra Hahn
Marcelo Guerra Hahn
author image
Marcelo Guerra Hahn

Marcelo Guerra Hahn, With over 18 years of experience in software development and data analysis, Marcelo Guerra Hahn is a seasoned expert in C++, C#, and Azure. As an Engineering Manager at Microsoft C++ Team and former leader of SoundCommerce's engineering team, Marcelo's passion for data and informed decision-making shines through. He shares his knowledge as a lecturer at esteemed institutions like Lake Washington Institute of Technology and University of Washington. Through this book, Marcelo aims to empower readers with advanced C++ techniques, honed by real-world experience, to become proficient programmers and skilled data analysts.
Read more about Marcelo Guerra Hahn

Araks Tigranyan
Araks Tigranyan
author image
Araks Tigranyan

Araks Tigranyan is a passionate software engineer at Critical Techworks, with an unwavering love for the world of programming, particularly in C++. Her dedication to crafting efficient and innovative solutions reflects her genuine passion for coding. Committed to excellence and driven by curiosity, Araks continuously explores new technologies, going above and beyond to deliver exceptional work. Beyond programming, Araks finds solace in sports, with football holding a special place in her heart. As an author, Araks aspires to share her profound expertise in C++ and inspire readers to embark on their programming journeys.
Read more about Araks Tigranyan

John Asatryan
John Asatryan
author image
John Asatryan

John Asatryan, the Head of Code Republic Lab at Picsart Academy, seamlessly blends his academic background in International Economic Relations from the Armenian State University of Economics with his ventures in technology and education. Driven by a genuine passion for coding, John's commitment to empowering aspiring developers is evident in his expertise in the field. His unwavering dedication to bridging the gap between education and technology inspires others to pursue their coding dreams.
Read more about John Asatryan

Vardan Grigoryan
Vardan Grigoryan
author image
Vardan Grigoryan

Vardan Grigoryan is a senior backend engineer and C++ developer with more than 9 years of experience. Vardan started his career as a C++ developer and then moved to the world of server-side backend development. While being involved in designing scalable backend architectures, he always tries to incorporate the use of C++ in critical sections that require the fastest execution time. Vardan loves tackling computer systems and program structures on a deeper level. He believes that true excellence in programming can be achieved by means of a detailed analysis of existing solutions and by designing complex systems.
Read more about Vardan Grigoryan

Shunguang Wu
Shunguang Wu
author image
Shunguang Wu

Shunguang Wu is a senior professional staff at Johns Hopkins University Applied Physics Laboratory, and received his PhDs in theoretical physics and electrical engineering from Northwestern University (China) and Wright State University (USA), respectively. He published about 50 reviewed journal papers in the area of nonlinear dynamics, statistical signal processing and computer vision in his early career. His professional C++ experience started with teaching undergraduate courses in the late 1990s. Since then he has been designing and developing lots of R&D and end-user application software using C++ in world-class academic and industrial laboratories. These projects span both the Windows and Linux platforms.
Read more about Shunguang Wu

View More author details
Right arrow

Large-Scale Application Design

The demand for scalable and efficient systems has increased as more organizations have embraced technology. As more and more businesses start using digital technologies, the need to handle large volumes of data, support growing user bases, and ensure application performance becomes key. This chapter focuses on large-scale applications in C++, focusing on crucial aspects such as organization and scaling.

In this context, we will analyze the ideas behind horizontal and vertical scaling. Scaling is used to improve application performance in two primary ways – via horizontally and vertically scaling. This chapter examines the benefits and considerations associated with each approach. The chapter also discusses the specific challenges and techniques in scaling C++ applications. C++ has long been a popular programming language for its performance and flexibility, but scaling C++ applications to handle large-scale projects can present unique obstacles...

Technical requirements

The g++ compiler with the -std=c++2a option is used to compile the examples in this chapter. You can find the source files used in this chapter at https://github.com/PacktPublishing/Expert-C-2nd-edition/tree/main/Chapter15.

The introduction of large-scale, cross-platform project organizing

Large-scale, cross-platform project organizing in C++ refers to implementing a comprehensive system that facilitates managing and coordinating multiple projects across different platforms, using the C++ programming language. It involves the development of a robust framework that enables seamless integration, communication, and resource sharing between diverse projects. By leveraging the power and versatility of C++, this approach provides a scalable and efficient solution to organize and execute large-scale projects on various platforms.

Large-scale, cross-platform project organization in C++

Large-scale, cross-platform projects in C++ pose unique challenges in organization and management. These projects involve developing software applications that can run on multiple operating systems or platforms, such as Windows, macOS, and Linux. This article will explore the key aspects and considerations involved in organizing...

Horizontal and vertical scaling

Horizontal and vertical scaling are architectural strategies that can be applied in various domains, including software development in C++. Although scaling primarily refers to managing infrastructure and resources, it can affect software design and development.

Horizontal and vertical scaling are two fundamental approaches to handling increased demands or improving performance in computing systems. These concepts apply to various domains, including software development, databases, and server infrastructure. Let’s delve into horizontal and vertical scaling, understanding their differences, advantages, and use cases.

Horizontal scaling

Horizontal scaling, or scaling out, involves adding more instances or nodes to distribute a workload across multiple machines. In this approach, a system’s capacity is increased by expanding horizontally rather than enhancing the resources of individual devices.

The advantages of horizontal scaling...

Scaling C++ applications

Scaling C++ applications refers to optimizing and expanding C++ code bases to handle increased workloads and accommodate growing user demands. It involves analyzing performance bottlenecks, identifying areas of improvement, and implementing scalable solutions such as parallelization, distributed computing, and load balancing. By scaling C++ applications, developers can ensure that their software can efficiently handle larger data volumes, higher user concurrency, and increased processing demands, resulting in improved performance and a better user experience.

Horizontal scaling in C++

Horizontal scaling in C++ involves distributing a workload across multiple machines or instances to handle increased demand or achieve better performance. This can be achieved through techniques such as load balancing and distributed computing.

In a horizontally scaled C++ application, different instances or nodes can handle other parts of the workload concurrently. This...

Designing data-intensive applications

Designing data-intensive applications in C++ involves considering various aspects, including data storage, data processing, and efficient utilization of system resources. This section will list some key considerations and best practices for designing data-intensive applications in C++.

To begin with, some best practices for data modeling and storage are listed as follows:

  • Identify the nature and structure of the data: Analyze the data requirements and determine the appropriate data model, such as relational, NoSQL, or a combination of both, based on the application’s needs.
  • Choose efficient data storage solutions: Select appropriate data storage technologies, such as databases (MySQL, PostgreSQL, and MongoDB) or distributed filesystems (Hadoop HDFS and Apache Cassandra), based on factors such as scalability, performance, and data integrity requirements.
  • Optimize data access and retrieval: Employ techniques such as indexing...

Summary

This chapter covered several essential aspects of large-scale software development, providing insights into organizing cross-platform projects, implementing scaling strategies, scaling C++ applications, and designing efficient data-intensive applications.

This introduction to large-scale, cross-platform project organization highlights the complexity of developing software applications that can seamlessly run across multiple operating systems or platforms. It emphasizes key considerations such as modular architecture, abstraction layers, platform-independent libraries, build systems, testing practices, documentation, and collaboration. By understanding and implementing these practices, developers can effectively manage the intricacies of large-scale, cross-platform projects.

The discussion on horizontal and vertical scaling explored two fundamental approaches to handling increased demands and enhancing performance in computing systems. Horizontal scaling involves distributing...

Questions

  1. What are the key considerations for organizing a large-scale cross-platform project in C++?
  2. What are the differences between horizontal and vertical scaling, and what are their respective advantages and use cases?
  3. How can C++ applications be scaled effectively, considering multithreading, parallel computing, and efficient resource utilization?
  4. What are the important factors to consider when designing data-intensive applications in C++, including data storage, processing, and memory management?
  5. How can modular architecture and abstraction layers be leveraged in large-scale cross-platform projects to ensure scalability and maintainability?
  6. What are the best practices to optimize performance and ensure data integrity and security in data-intensive applications developed in C++?
  7. How would you differentiate between different client applications when implementing a server application?

Further reading

For further information, refer to the following:

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Expert C++ - Second Edition
Published in: Aug 2023Publisher: PacktISBN-13: 9781804617830
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (5)

author image
Marcelo Guerra Hahn

Marcelo Guerra Hahn, With over 18 years of experience in software development and data analysis, Marcelo Guerra Hahn is a seasoned expert in C++, C#, and Azure. As an Engineering Manager at Microsoft C++ Team and former leader of SoundCommerce's engineering team, Marcelo's passion for data and informed decision-making shines through. He shares his knowledge as a lecturer at esteemed institutions like Lake Washington Institute of Technology and University of Washington. Through this book, Marcelo aims to empower readers with advanced C++ techniques, honed by real-world experience, to become proficient programmers and skilled data analysts.
Read more about Marcelo Guerra Hahn

author image
Araks Tigranyan

Araks Tigranyan is a passionate software engineer at Critical Techworks, with an unwavering love for the world of programming, particularly in C++. Her dedication to crafting efficient and innovative solutions reflects her genuine passion for coding. Committed to excellence and driven by curiosity, Araks continuously explores new technologies, going above and beyond to deliver exceptional work. Beyond programming, Araks finds solace in sports, with football holding a special place in her heart. As an author, Araks aspires to share her profound expertise in C++ and inspire readers to embark on their programming journeys.
Read more about Araks Tigranyan

author image
John Asatryan

John Asatryan, the Head of Code Republic Lab at Picsart Academy, seamlessly blends his academic background in International Economic Relations from the Armenian State University of Economics with his ventures in technology and education. Driven by a genuine passion for coding, John's commitment to empowering aspiring developers is evident in his expertise in the field. His unwavering dedication to bridging the gap between education and technology inspires others to pursue their coding dreams.
Read more about John Asatryan

author image
Vardan Grigoryan

Vardan Grigoryan is a senior backend engineer and C++ developer with more than 9 years of experience. Vardan started his career as a C++ developer and then moved to the world of server-side backend development. While being involved in designing scalable backend architectures, he always tries to incorporate the use of C++ in critical sections that require the fastest execution time. Vardan loves tackling computer systems and program structures on a deeper level. He believes that true excellence in programming can be achieved by means of a detailed analysis of existing solutions and by designing complex systems.
Read more about Vardan Grigoryan

author image
Shunguang Wu

Shunguang Wu is a senior professional staff at Johns Hopkins University Applied Physics Laboratory, and received his PhDs in theoretical physics and electrical engineering from Northwestern University (China) and Wright State University (USA), respectively. He published about 50 reviewed journal papers in the area of nonlinear dynamics, statistical signal processing and computer vision in his early career. His professional C++ experience started with teaching undergraduate courses in the late 1990s. Since then he has been designing and developing lots of R&D and end-user application software using C++ in world-class academic and industrial laboratories. These projects span both the Windows and Linux platforms.
Read more about Shunguang Wu