SoftWhat?

Architecture and Software Engineering tidbits

Recent posts

Mar 26, 2023
How to Manage AWS CDK Application Configuration AWS CDK applications need to maintain certain configuration in the version control repository. Configuration can include application name, programming language version, version control branch, build configuration, account and Region per environment, etc. I often see the use of configuration files (e.g. cdk.json) for this purpose, in formats such as JSON and YAML. In this post, I describe my recommendations for managing AWS CDK application configuration. Context From my experience, builders use configuration files mainly to avoid: 1/ changing the application code because they don’t own it 2/ triggering a build 3/ performing a deployment.…
Mar 25, 2023
Recommended AWS CDK Project Structure for Monolithic Python Applications July 17, 2023: Updated the guidance to align with Application Design Framework recommendations. My Recommended AWS CDK project structure for Python applications blog post describes an application for a single bounded context - User Management Backend service. The application includes a dedicated repository with source code for the service and the toolchain. This is the option #4 in the figure below. Source: https://d1.awsstatic.com/events/Summits/reinvent2022/DOP321_Organize-application-components-into-repositories-and-pipelines-with-AWS-CDK.pdf Some builders initially prefer to start with an application that includes multiple bounded contexts - options #1 and #2 above.…
Feb 5, 2023
Aligning SaaS and Service Planes Definitions Martin Fowler writes the following about Evocative Names in his Writing Software Patterns article: One of the valuable features of patterns work is that it develops a vocabulary with which we can talk about how to do things. Having a clear understanding of what names mean helps communicate intent. When building SaaS applications on AWS, you might stumble into the following terminology: SaaS control plane and SaaS application plane Service control plane and Service data plane In this blog post, I describe the definitions of these terms and explain how they align.…
Sep 28, 2020
cdk-chalice Adds Support for Accessing Chalice-generated CloudFormation Resources cdk-chalice 0.8.1 adds support for accessing AWS Chalice-generated CloudFormation resources as native CDK objects. It is useful if you need to explicitly reference these resources in the broader AWS Cloud Development Kit (AWS CDK) application, or customize the resources generated by Chalice. In this blog post, I will explain how this feature works and provide an example. The new capability is based on the CDK cloudformation-include module, which was released as a developer preview in CDK 1.…
Aug 16, 2020
Thoughts on Interoperability Between AWS CDK, AWS SAM and AWS Chalice Today, AWS has three frameworks to build infrastructure logic and runtime logic for applications based on Amazon API Gateway and AWS Lambda. These are the AWS Cloud Development Kit (AWS CDK), AWS Serverless Application Model (AWS SAM), and AWS Chalice. In this blog post, I will describe tradeoffs between some combinations of them. To begin with, AWS recently announced the general availability of SAM CLI (v1.0.0). SAM CLI allows to locally invoke Lambda functions generated by CDK.…
May 23, 2020
Adapting Maslow's Pyramid to Personal Development The software engineering world is constantly increasing in breadth and depth. There is so much to learn, and it is very challenging to prioritize what and when. Recently, I looked at Maslow’s hierarchy of needs in its pyramid form, and then an idea stroke me - personal development might be very much represented in a similar manner. The missing link for me was adding time sensitivity to the needs (i.e. priorities).…
Apr 28, 2020
Getting Things Done With Outlook and Asana Nowadays, much of incoming (reactive) work arrives through email. In this post I want to share an approach I found efficient for myself to manage that work, in addition to proactive work. The process below builds on Getting Things Done time management method and the Eisenhower method for setting priorities. This is the regular state of my Outlook inbox (except some outliers here and there of course 😊). I usually do one of the following actions when processing inbox, and then archive the email immediately:…
Apr 11, 2020
Automated Path From Hardcoded SQL Queries to SQLAlchemy ORM With Flask Let’s assume you started by developing the database schema directly on the server (e.g. using MySQL Workbench) and used hardcoded SQL queries in the code (e.g. using one of Transaction Script, Domain Model or Logic in SQL approaches). Then at some point you feel confident to use SQLAlchemy’s Object-Relational Mapping (ORM) framework. On a side note, I highly recommend to read OrmHate article by Martin Fowler to get some perspective on when to use ORM frameworks.…
Jan 15, 2020
Organizing Flask-based Web API Directory Structure Acknowledgements: This post was heavily influenced by Explore Flask book and series of Miguel Grinberg’s posts starting with Designing a RESTful API with Python and Flask. Still, the above and most of the other examples I found usually refer to directory structure of frontend applications or very simple web APIs. It took me a while to build a big picture of how to build the directory structure of a web API with Flask, hence I thought it might be useful to share.…
May 16, 2019
Drilling Down to Amazon EC2 Instances Data Transfer Costs The use case I would like to address in this post revolves around the need to understand which specific Amazon EC2 instances incur the highest data transfer charges, including high-level understanding of traffic flow (e.g. to/from Internet, inter-region, intra-region and etc.). For detailed analysis of traffic flow, I would recommend to use Amazon VPC Flow Logs – see Querying Amazon VPC Flow Logs in Amazon Athena (serverless query service) documentation.…