Hey fellow devs,
This is my first post in this awesome community, and I’m excited to share my project with you all. As a newbie, I’d love to get your feedback on my design.
Here’s the context: I have an umbrella project with two apps. The first app is a gateway that receives a high volume of messages from Meta’s WhatsApp Cloud API. These messages are destined for different business account numbers (in Meta’s jargon). To simplify, imagine receiving messages like {"1800555", "message 1 from whatsapp consumer"}
, {"18007777", "message 2 from another whatsapp consumer"}
, and so on.
The second app is a bot that processes these messages. Now, here’s how my architecture works: the gateway (a Plug endpoint) is a node called gateway_node@127.0.0.1
. When a message arrives, it reads from Mnesia, which has a map of business accounts to destination nodes. The destination node is a copy of the bot app (app 2), which can be something like customer_services_node@127.0.0.1
or another_company@127.0.0.1
.
The advantage of this setup is that I can add nodes (business accounts) on demand without affecting the others.
So, what do you think? Is this approach too newbie-ish? Any recommendations?
Thanks in advance!