Inspiration

In the wake of devastating earthquakes around the world, the urgency for faster, smarter, and scalable alert systems has never been higher. SEISMIA was born out of the need to use real-time technology to save lives by notifying people seconds before disaster strikes. Romania’s seismic zones, paired with government-backed high-frequency data feeds, provided a fertile ground to engineer a fully serverless and scalable notification platform.

What it does

SEISMIA is a real-time earthquake notification system capable of sending SMS, email, and Telegram alerts within seconds of seismic activity detection. It continuously ingests seismic data, filters for critical events—such as those with magnitudes over 4.0—and then pushes notifications in parallel using Lambda-based Kafka consumers. Each user is guaranteed to receive a single alert per event, thanks to a robust concurrency control mechanism implemented with DynamoDB. The platform is cloud-native, scalable, and optimized for speed and reliability.

How we built it

The backbone of SEISMIA is constructed using AWS Lambda functions serving both as Kafka producers and consumers. The producer side uses multithreading to simulate horizontal scaling, writing messages to Kafka topics and random partitions to maximize throughput. Each message is enriched with metadata and sent using a randomized "topic roulette" mechanism.

On the consumer side, Lambda functions read from all topics concurrently, distributing notifications based on a locking strategy enforced in DynamoDB. This ensures that no subscriber is notified more than once per event. Emails are sent via Amazon SES, SMS through Twilio, and Telegram messages are dispatched directly to chat groups.

To handle transient errors, we use Lambda retry policies and SQS dead-letter queues. Provisioned concurrency is employed to eliminate cold start delays, ensuring that alerts are delivered within seconds. The infrastructure is automated using Terraform, with plans to implement a CI/CD pipeline.

Challenges we ran into

Integrating Kafka with a serverless architecture presented numerous challenges. Ensuring parallelism while avoiding duplicate messages was non-trivial. We encountered race conditions when updating subscriber notification timestamps in DynamoDB. Another significant challenge was mitigating latency introduced by Lambda cold starts—an issue we resolved using provisioned concurrency. Balancing real-time performance with cost-effectiveness added an extra layer of complexity.

Accomplishments that we're proud of

We are proud to have built a fully serverless, real-time notification system capable of delivering alerts in under 5 seconds. Our custom concurrency control using timestamp checks and optimistic locking in DynamoDB ensures robust duplicate prevention. The use of multithreaded Kafka producers improved throughput significantly. Furthermore, the system is aligned with Romanian government institutions and is under consideration for national deployment.

What we learned

This project taught us how to balance performance, resilience, and cost in a highly dynamic, cloud-native environment. We deepened our knowledge of real-time data handling and concurrency control. From Lambda retries to SQS dead-letter queues, we learned how to build fault-tolerant serverless applications. Perhaps most importantly, we learned how technology can play a critical role in saving lives.

What's next for From Tremors to Saving Lives: SEISMIA

The next phase involves formal integration with Romanian government agencies such as ISU Romania. We're planning to implement auto-scaling infrastructure using CDK or Terraform, along with enhanced cost and error monitoring for Kafka, Lambda, Twilio, and SES. A web app will be developed for civilians and first responders to manage subscriptions, likely hosted in a Kubernetes cluster.

In addition, we aim to adapt the solution for Azure Serverless and expand beyond Romania using global seismic data sources. Educational content will also be created, turning SEISMIA into a hands-on case study for data science, serverless, and DevOps learners. Finally, the platform may be extended to support other types of critical alerts, ensuring it remains a flexible and life-saving tool in emergencies.

*The project architecture, designs and code is under Proprietary License. IP registrations.

Built With

Share this project:

Updates