i have been arguing since the days of ICQ that instand messaging could be done over SMTP. people yelled at me then that that would ruin email because it would be a different way to communicate that doesn't work well with email clients.
they were sort of right of course, because it's the client that makes the difference, not the protocol.
and deltachat today proves that i was right all this time.
it's really just about sending and replying to messages.
you have text, voice, video and physical messages.
they are synchronous or asynchronous.
instant messaging, as much as it is instant is still asynchronous because i can reply to a message hours or days later. they are only synchronous in the same way as an immediate email reply is synchronous.
maybe IRC can be considered only synchronous because it doesn't feature an option to reply to specific messages, so there is no threading. just a linear stream.
for asynchronous messaging each protocol (like SMTP, XMPP, mastodon, NNTP, etc) needs to be implemented but only a single implementation of the backend to manage the actual messages is needed because most features of all of these protocols can be mapped to the same primitive in the backend/database.
each message has a sender, recipients, the content of the message. a parent messages that is being replied to. some messages further have a body or attachments. and some have a subject/thread topic.
that alone covers the majority of messaging protocols out there.