Post AP1wexvilNPbMQqG36 by deepbluev7@fosstodon.org
(DIR) More posts by deepbluev7@fosstodon.org
(DIR) Post #AP1upNuUpACOvO6qSu by Wyndix@fosstodon.org
2022-10-28T13:37:01Z
0 likes, 0 repeats
Sometimes I wonder, why does #matrix use JSON and HTTP for their protocol?
(DIR) Post #AP1upOKjFdBOEkNnM0 by deepbluev7@fosstodon.org
2022-10-28T15:16:42Z
0 likes, 0 repeats
@Wyndix Because it is supported everywhere. Why would it not use them?
(DIR) Post #AP1wPQ4ENjQXzfPRTc by Wyndix@fosstodon.org
2022-10-28T15:34:22Z
0 likes, 0 repeats
@deepbluev7 yeah but I mean is it really efficient? 🤔I heard in many places that HTTP is not a good fit for interop protocols but I can't really link many sources...
(DIR) Post #AP1wexvilNPbMQqG36 by deepbluev7@fosstodon.org
2022-10-28T15:37:12Z
0 likes, 0 repeats
@Wyndix If you use http/2 the overhead isn't that great. Since you reuse the same connection and just send some headers back and forth. Listening on a socket or long polling doesn't behave that differently apart from the heartbeat (when nothing happens) being slightly heavier. JSON is not as efficient as a binary protocol, but you can always upgrade that to CBOR to reduce the payload size and other protocols use XML, which isn't smaller either.
(DIR) Post #AP1wu0lMVqUwUUAew4 by Wyndix@fosstodon.org
2022-10-28T15:35:53Z
0 likes, 0 repeats
@deepbluev7 Actually: https://github.com/kukushkin/mimi-messaging/blob/master/docs/Why_HTTP_is_a_bad_choice.md
(DIR) Post #AP1wu19p2u41iLcC3s by deepbluev7@fosstodon.org
2022-10-28T15:39:57Z
0 likes, 0 repeats
@Wyndix I don't think those arguments apply to http/2 and 3. You can do parallel requests over that and most libraries are async. Most protocols are synchronous if you look at the actual socket traffic, but http provides proper framing so that it doesn't have to be that way. And routing and load-balancing is barely a downside, if you want to be able to scale to millions of users, is it? Also, do you want an unauthenticated chat protocol?
(DIR) Post #AP1z6495xePaMj9DV2 by Wyndix@fosstodon.org
2022-10-28T16:04:30Z
0 likes, 0 repeats
@deepbluev7 So basically HTTP is not that bad to begin with, and JSON is fast anyways (though there's an MSC for CBOR support apparently https://github.com/matrix-org/matrix-spec-proposals/issues/3341) soo forget I said anything
(DIR) Post #AP1zBvmJz2Te9VIAXQ by deepbluev7@fosstodon.org
2022-10-28T16:05:37Z
0 likes, 0 repeats
@Wyndix Well, bad is always relative to something else and usually everything has downsides as well as benefits. It's not bad to ask about those!
(DIR) Post #AP1zHRQVkAF1ktia1Y by Wyndix@fosstodon.org
2022-10-28T16:06:31Z
0 likes, 0 repeats
@deepbluev7 I'm just so so obsessed with Matrix and I want it to be perfect :pppAt first I just thought JSON was a bit of an overkill but then I saw the criticism on HTTP so I decided to make that post - You've changed my mind though
(DIR) Post #AP20PLnOf9jcYvl3PE by deepbluev7@fosstodon.org
2022-10-28T16:19:16Z
0 likes, 0 repeats
@Wyndix Well, if you want to chat more about matrix, don't hesitate to join the Nheko rooms like #nheko:nheko.im :3