Skip to main content

Posts

How does Disney Hotstar capture 5 Billion Emojis during a tournament?

  Here is my understanding of how the system works. 1. Clients send emojis through standard HTTP requests. You can think of Golang Service as a typical Web Server. Golang is chosen because it supports concurrency well. Threads in GoLang are lightweight.  2. Since the write volume is very high, Kafka (message queue) is used as a buffer. 3. Emoji data are aggregated by a streaming processing service called Spark. It aggregates data every 2 seconds, which is configurable. There is a trade-off to be made based on the interval. A shorter interval means emojis are delivered to other clients faster but it also means more computing resources are needed. 4. Aggregated data is written to another Kafka.  5. The PubSub consumers pull aggregated emoji data from Kafka.  6. Emojis are delivered to other clients in real-time through the PubSub infrastructure.  The PubSub infrastructure is interesting. Hotstar considered the following protocols: Socketio, NATS, MQTT, and gRPC, and settled with MQTT. Fo
Recent posts

World of Drool Engine

  Rule Engine Within mission-critical applications, the process of maintaining business logic within the source code can become too complicated. Business rules can be used to ease the development and maintenance by separating business logic from the source code. In the Java world, most of the rules engines libraries implement JSR94 standard known as  Java Rule API Engine .     The following table highlights the top five major Rule Engine based technologies: Popularity Rule Engine Summary 1 Drools A Business Rules Management System (BRMS) solution which provides a core business rules engine (BRE), a web authoring and rules management application (Drools Workbench) and an Eclipse IDE plugin for core development 2 OpenRules A general-purpose business rules and decision management system 3 EasyRules EasyRules provides the Rule abst