Maintain Your Python Project with Cutting-Edge Tools

Widyanto H Nugroho
5 min readApr 11, 2022

Architecture and Deployment

Software architecture is, simply, the organization of a system. This organization includes all components, how they interact with each other, the environment in which they operate, and the principles used to design the software. In many cases, it can also include the evolution of the software into the future.

Software architecture is designed with a specific mission in mind. That mission has to be accomplished without hindering the missions of other tools or devices. The behavior and structure of the software impact significant decisions, so they need to be appropriately rendered and built for the best possible results.

Software Architecture of our App

Our team projects use Google Cloud Platform environment. We use Google Cloud Run to host our microservices and use Google Compute Engine as VM Instances of PostgreSQL Database.

Capacity Planning

In modern software environments, like those built on scalable microservices architectures, hitting capacity limits is a common cause of production-level incidents. It’s also, arguably, a type of incident teams can often prevent through proactive planning.

Simply put, capacity planning is work teams do to make sure their services have enough spare capacity to handle any likely increases in workload, and enough buffer capacity to absorb normal workload spikes, between planning iterations.

During the capacity-planning process, teams answer these four questions:

  1. How much free capacity currently exists in each of our services?
  2. How much capacity buffer do we need for each of our services?
  3. How much workload growth do we expect between now and our next capacity-planning iteration, factoring in both natural customer-driven growth and new product features?
  4. How much capacity do we need to add to each of our services so that we’ll still have our targeted free capacity buffer after any expected workload growth?

The answers to those four questions — along with the architectures and uses of the services — help determine the methodology our teams use to calculate their capacity needs.

Error Handling

Error handling refers to the response and recovery procedures from error conditions present in a software application. In other words, it is the process comprised of anticipation, detection, and resolution of application errors, programming errors, or communication errors. Error handling helps in maintaining the normal flow of program execution. In fact, many applications face numerous design challenges when considering error-handling techniques.

Error handling helps in handling both hardware and software errors gracefully and helps execution to resume when interrupted. When it comes to error handling in software, either the programmer develops the necessary codes to handle errors or makes use of software tools to handle the errors. In cases where errors cannot be classified, error handling is usually done by returning special error codes. Special applications known as error handlers are available for certain applications to help in error handling. These applications can anticipate errors, thereby helping in recovering without actual termination of the application.

There are four main categories of errors:

  • Logical errors
  • Generated errors
  • Compile-time errors
  • Runtime errors

Sentry

In our software engineering projects, we use Sentry as our error monitoring and handling tool.

The Sentry SDK will automatically capture and report any unhandled error that happens in your application runtime without any additional configuration or explicit handling. Generally, unhandled errors are errors that aren’t caught by any except (or try/catch) clause.

The image above is an example of error captured by Sentry. This will help us to maintain and fast response on handling errors in our application. We also integrate the error handling into our Discord server. With this, we can get fast notifications if an error occurred straight in our working environment.

Disaster Recovery

Disaster recovery (DR) is an organization’s ability to respond to and recover from an event that negatively affects business operations. The goal of DR methods is to enable the organization to regain use of critical systems and IT infrastructure as soon as possible after a disaster occurs. To prepare for this, organizations often perform an in-depth analysis of their systems and create a formal document to follow in times of crisis. This document is known as a disaster recovery plan.

Read on to learn more about why DR is important, how it works, and the difference between disaster recovery and business continuity. You’ll also discover what to include in a disaster recovery plan and the major types of DR, as well as major DR services and vendors.

Why it is important?

Disasters can inflict many types of damage with varying levels of severity, depending on the scenario. A brief network outage could result in frustrated customers and some loss of business to an e-commerce system. A hurricane or tornado could destroy an entire manufacturing facility, data center, or office.

Our team uses Google Cloud Platform as the cloud service provider. Our Application is running on Google Cloud Run which doesn't contain any data. All the data is in the database on Google VM Instance. Our plan to do disaster recovery is we are continuously backup our database data and store it on Google Cloud Storage. This can be done automatically on GCP.

Finale

It is always good to maintain your code within projects to ensure the quality of the software

Sources

--

--