One of the most dangerous disasters in the world is an earthquake. Earthquake early warning systems should provide reliable warnings as fast as possible with the fewest false and missed warnings. Social networks, distributed networks, and real-time systems have become the most important components of the new computer era, the Internet of Things (IoT). This research presents the existing development status of an earthquake early warning system (EEWS) and proposes an open system communication protocol based on instant messaging via a distributed network for earthquake early warning by using Extensible Messaging and Presence Protocol (XMPP) as a lower layer. Approximately all current EEWS use a centralized approach but these systems suffer from a problem of a single point of failure. This proposed system not only reduces the communication time but also make the system more robust and reliable where if one or more node fails, a whole system can still survive and the system is open so it can easily communicate with other systems.