Creating an internal chat for Public Safety Answering Points (PSAPs)

In emergencies, every second counts, and having the right communication method for each situation can be a crucial difference. At Zaleos, we understand that accessibility is key in emergency communication services, and traditional emergency services often rely on voice-based communication, which can be limited for some individuals. Therefore, I created a chat system to complement existing emergency communication methods.

In an emergency, voice communication is not always available or suitable. For example, in a noisy environment, voice-based communication can be difficult. A chat system can substitute for calls when the callers' language does not match the call center's, as tools like auto-translation can facilitate communication.

Development

The solution is a chat system based on RabbitMQ, a popular message broker that can be used in multiple languages like Python using the Pika library.

¿How does RabbitMQ work?

RabbitMQ consists of queues that store messages, producers, consumers, and exchanges. An exchange in RabbitMQ receives producers' messages and pushes them to queues. The routing strategy used determines how an exchange will route the messages. In this case, I used a topic exchange.

Sample exchange

A topic exchange facilitates message routing based on topics associated with queues. Topics consist of words separated by dots and can include wildcard characters: * (star) matches one word, and # (hash) matches one or more words. For example, a queue bound to "*.*.*" or "#" would receive messages from all existing chatrooms.

The architecture

The project uses Tornado as a WebSocket handler, enabling a web page to connect to the client interface. Users can send messages and join chatrooms by entering an identifier in a text box.

Architecture

To add persistence to the messages, I implemented a MySQL database and containerized it using Docker. I also containerized the RabbitMQ service and the server logic, enabling the entire system to be deployed on any platform through Docker.

0:00
/0:13

Working application demo

Next steps

The application is currently functional but can benefit from further enhancements. Two potential areas for improvement include:

  1. Enhancing Web Interface Functionality: Currently, the system uses a web interface only for client inputs. Expanding the functionality of this web page by incorporating real-time updates to display messages would improve the user experience.
  2. Adding User Management: To ensure the privacy and security of information, it's essential to implement identification and authentication. This would allow users to create accounts and customize their experience based on their specific needs or conditions to assist the emergency center better.

Conclusion

In conclusion, this chat system enhances emergency communication by providing an accessible alternative to traditional voice-based methods. This approach ensures that help is available to everyone, regardless of their communication preferences or limitations.

References