Skip to main content


Event Driven Microservice Architecture with AWS Kinesis

I won't get into details of what a microservice architecture is all about. There are plenty of resources on the net that can help you understand this architecture. One good resource is by Chis Richardson.  In my journey to achieving a loosely coupled services based architecture, I initially started with service decomposition and using a shared database. There are a lot of cons to this approach and it creates a single point of failure at runtime but it also creates dependencies to data models and structures especially if you don't segregate boundaries by creating different "databases", "schemas", or "namespaces" in that physically shared database.  There is a pattern called Database per-service  that provides a lot of capabilities since each service has its own database server when comes to keep your services independent and achieving greater scalability. There are some alternatives to this approach such as private tables o
Recent posts

Using AWS QuickSight and Athena to query DataDog Events

DataDog is an observability platform that provides a wide range of solutions for monitoring and alert of cloud scale applications. I have had the pleasure of working with DataDog these past years. I have used it to perform Application Performance Monitoring (APM), Database Monitoring (DB), Log Aggregation and recently started to use its Real User Monitoring (RUM) capabilities.  RUM is a performance monitoring process that collects detailed information about an end-users interactions with a given applications. You can use it to measure how an end-user is interacting with the page elements, detect their mouse movements and frustrations. Combined with APM tracing, RUM gives you a complete view of user activities, service traces and database interactions.  You can use all of this collected data and create dashboards and visualizations in your DataDog console. These can help anytime be alerted and you can use them to troubleshoot your applications very effectively. However, collected data i

Achieving Seamless Navigation through AWS Cognito

Seamless Navigation with AWS Cognito Cognito is an identity and access management solution of the AWS ecosystem. It allows you to secure your applications and manage your users credentials and helps you control access management. Cognito provides capabilities to secure applications with SAML, OIDC and OAUTH2 protocols. You can find more information on Cognito on Amazon's web site here: . Especially checkout the developer documentation here: . Background There is a lot to cover in AWS Cognito. This article will be focusing on how to achieve seamless navigation between two different client applications. You can consider this scenario as a federated scenario suing SAML or OIDC federation. However, I wanted to cover a scenario where web profile isn't available in one of those applications so you don't have an IDP Session to help you login to your secondary

PostgreSQL: Partitioning/Sharding and Foreign Data Wrapper Step up and Configuration

Following snippet of PostgreSQL documentation, , explains the benefits of partitioning as fallows.  Partitioning refers to splitting what is logically one large table into smaller physical pieces. Partitioning can provide several benefits: Query performance can be improved dramatically in certain situations, particularly when most of the heavily accessed rows of the table are in a single partition or a small number of partitions. Partitioning effectively substitutes for the upper tree levels of indexes, making it more likely that the heavily-used parts of the indexes fit in memory. When queries or updates access a large percentage of a single partition, performance can be improved by using a sequential scan of that partition instead of using an index, which would require random-access reads scattered across the whole table. Bulk loads and deletes can be accomplished by adding or removing partitions, if

Useful PostgreSQL Queries

I have been actively using PostgreSQL for the last 7 years. As with many databases engines, PostgreSQL provides us with many capabilities when it comes to helping developers identify slow performing queries. This article focuses on several useful (primarily administrative queries) for PostgreSQL which may be helpful in debugging you database performance issues. Queries Show Running Queries Often times it is useful to see which queries are running and how long they have been running from. The below is a sample query to find 'active' queries and information about them.  SELECT pid, client_addr, query_start, age(query_start, clock_timestamp()), usename, query, state, wait_event_type, -- Only available in >9.6 wait_event -- Only available in >9.6 FROM pg_stat_activity WHERE query != ' ' AND query NOT ILIKE '%pg_stat_activity%' AND state = 'active' ORDER BY query_start desc; Particularly useful attribute