A dual-database pattern for real-time logistics applications
A hackathon project demonstrates a powerful pattern for logistics apps, using Aurora PostGIS for state and spatial queries, and DynamoDB for high-throughput event streams. Here's the breakdown. THE…
A hackathon project demonstrates a powerful pattern for logistics apps, using Aurora PostGIS for state and spatial queries, and DynamoDB for high-throughput event streams. Here's the breakdown.
THE ANSWER UP FRONT
This architectural pattern is for founders building applications with both complex relational/spatial data and a high-volume, real-time event stream. Think logistics, IoT, or real-time marketplaces. You should skip this complexity if your application is a standard CRUD app or doesn't have a critical real-time or geospatial component. The bottom line: Separating state (PostGIS) and events (DynamoDB) lets each database perform its specialized function optimally, but introduces operational overhead and potential consistency challenges that must be managed.
METHODOLOGY
This is a v0 review of an architectural pattern, not a commercial product. The analysis is based on a single source: a blog post by the creator of a hackathon project called “Hold·My·Package,” published on dev.to on June 29, 2026. The source URL is https://dev.to/np_hacks_code/how-postgis-and-dynamodb-streams-power-a-real-time-delivery-hub-platform-5719.
This review covers the author's claims about the architecture, the specific roles of Aurora PostgreSQL with PostGIS and DynamoDB with Streams, and the provided SQL query examples. It does not cover independent performance benchmarks, long-term operational costs, failure mode handling, or data consistency strategies between the two databases. All technical details are based on the author's public description. An update is warranted if a production system using this pattern publishes performance data.
WHAT IT DOES
The author's project, a platform for managing local package delivery hubs, uses a dual-database architecture to separate two distinct concerns: persistent state and transient events.
Aurora PostGIS for state and spatial logic
Aurora PostgreSQL (Serverless v2) serves as the system's source of truth. It stores core relational data like users, packages, and hubs. The key is its use of the PostGIS extension, which pushes complex business logic directly into the database layer. Instead of application code calculating distances, the system uses SQL queries to perform spatial operations. For example, finding the nearest delivery hub to a failed delivery location is a single ST_Distance query. The author also claims to use Row-Level Security for multi-tenancy and materialized views for pre-calculated analytics, keeping the application layer focused on business workflows rather than data manipulation.
DynamoDB for the event stream
DynamoDB handles the high-throughput stream of events generated by package status changes: received, scheduled, dispatched, delivered. Each status change is a write to a single DynamoDB table. This design is optimized for a high volume of writes and diverse read patterns (e.g., a package's timeline, a hub's live feed). The integration with DynamoDB Streams is critical. It allows these events to trigger AWS Lambda functions automatically, which in turn push real-time notifications to clients via a service like Pusher. This creates a reactive, event-driven notification system decoupled from the primary database.
WHAT'S INTERESTING / WHAT'S NOT
The most interesting aspect is the clear, pragmatic separation of concerns. The mantra “Aurora owns state, DynamoDB owns events” is a sophisticated architectural choice that avoids forcing a single database into a role it’s not designed for. Using PostGIS to handle spatial logic at the database level is efficient and correct; it leverages decades of geospatial optimization. For a hackathon project, this demonstrates a mature understanding of data modeling.
What's not covered, and what any team implementing this should focus on, are the failure modes and consistency guarantees. The author doesn't discuss the classic dual-write problem: what happens if a write to Aurora succeeds but the corresponding event write to DynamoDB fails? Without a transactional outbox pattern or a reconciliation process, the state and the event log can drift apart. This architecture also increases operational complexity. A team needs expertise in managing, monitoring, and securing two very different database systems. The elegance of the pattern in the steady state belies the difficulty of managing its edge cases in production.
PRICING
This is an architectural pattern, not a product, so pricing is based on the underlying AWS services.
- AWS Aurora Serverless v2: Billed on Aurora Capacity Units (ACUs), I/O operations, and storage used. Pricing is variable based on load.
- AWS DynamoDB: Billed on provisioned or on-demand read/write capacity units, storage, and reads from DynamoDB Streams.
Pricing is entirely usage-dependent. A snapshot from June 2026 shows that both services have free tiers, but a production logistics application would quickly exceed them.
VERDICT
For founders building in complex domains like last-mile logistics, this PostGIS and DynamoDB pattern is a powerful template. It correctly identifies that relational/spatial data and event streams are different problems requiring different tools. If your product's core value proposition relies on both geo-intelligence and real-time notifications, the benefits of this specialized approach can outweigh the added complexity. However, if your application is a more straightforward CRUD service, this is over-engineering. Adopting this pattern means committing to managing the operational overhead and solving the hard problem of data consistency between two disparate systems.
WHAT WE'D TEST NEXT
A v2 review would require a production-grade implementation to benchmark. We would first test the data consistency strategy. How does the system recover from a failed write to DynamoDB? We would measure the end-to-end latency of the event pipeline, from a status update in the application to a notification appearing on a client device. Finally, we would load-test the PostGIS instance with increasingly complex spatial queries to identify performance bottlenecks as the number of hubs and active deliveries scales into the thousands.
The investor read
This pattern signals the maturation of polyglot persistence in vertical SaaS. Startups are increasingly choosing best-of-breed databases for specific tasks rather than forcing a single general-purpose database to do everything. For investors, a pitch deck showing this architecture for a logistics or IoT play is a positive signal of technical sophistication. However, the key diligence question becomes: how are you managing the complexity? An investable company won't just show the elegant diagram; they will demonstrate robust tooling for observability, data reconciliation, and handling the failure modes inherent in a distributed data architecture. The pattern is a strong foundation, but the operational maturity built on top of it is what separates a hackathon project from a venture-scale business.
Every claim ties to a primary source. See our methodology.