BigchainDB looks like a good option. I think it shows a clean architecture for putting messages in a logged and signed distributed database. Through the underlying RethinkDB, they also offer publish and subscribe notifications (very important for actually SENDING the messages to users on the thread) and database queries.
I am pursuing the idea of doing this with cloud-native databases from Google and Amazon, with native features for pub/sub and event processing. So, my version would not be distributed. BigchainDB is distributed. But, the cloud version would be very convenient and scalable.
The next step after that is to add:
- Encrypted channels, so that there is a secret key for each message threead that is available only to thread participants.
- Smart contract processing. A smart contract would get a chance to issue db queries and then post updates.