I think that HTTP(S) is not a good protocol for real time chat. However, Matrix does have the advantage of being open source. (But, I prefer IRC; it does not require specialized software to use it, and does not add too many complicated things (although some implementations do, you can mostly ignore them).)