Build a Real-Time IoT Application with Confluent and Apache Kafka
Oct 27, 2022Wei Rui

Summary
This post details the implementation of an end-to-end IoT motion detection and alerting system. It covers hardware selection (Raspberry Pi Zero W), software stack (Motion, cURL, librdkafka, Docker), integration with AWS S3 for video storage, and the use of Confluent Cloud with Kafka and ksqlDB for event ingestion and real-time processing. Specific technical details include using librdkafka for publishing events with a defined JSON schema, creating a ksqlDB stream for motion events, and implementing a React/Next.js UI with ksqlDB push queries (EMIT CHANGES) for real-time monitoring and pull queries for past event search, utilizing web workers for managing push query connections.