soc.saiyajin.space is one of the many independent Mastodon servers you can use to participate in the fediverse.

Administered by:

Server stats:

3
active users

Just reading through the / core specification [www.rfc-editor.org] bc I initially wanted to write an own jabber <-> matrix bridge (the ones that exist either dont work anymore, aren't maintained or didn't work with my usecase), and I seriously consider just scraping that idea.

It's even more awefull of an protocol than HTTP; no length-prefix of messages, malformed xml, and genneraly try-and-error mentality for most of the protocol.

www.rfc-editor.orgRFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
Mai :v_trans:
Public

Gosh it gets worse; Not only do we use fucking SASL for the authentication layer, the protocoll also defines the ability to use two streams over two TCP connections or multiple streams over multiple TCP connections! Or in other words: a ducking logictical nightmare!!!

Julian
Public

@mai_lapyst why would you need length prefixes for XML if you have closing tags? And where is the XML malformed?

Daniel Gultsch
Public

@mai_lapyst @j_r it's not malformed it's just one continuous document (as you have correctly pointed out)
This means you start parsing once and don't stop parsing. (instead of for example trying to parse each stanza individually)
You need an XML stream parser that emits events for open and closed tags. This also means that you don't need length encoding. (which I guess you would need if you were trying to read the tcp packets as a string first and then stick each stanza into a new parser)

Daniel Gultsch
Public

@mai_lapyst @j_r I can ensure you that most XMPP libraries use regular XML event parsers that aren't patched for any irregularities.

Gerardo Lisboa
Quiet public

@daniel @mai_lapyst @j_r note to self: re-read #xml #stream parsing principles and code, and #xslt too.

rakoo
Quiet public
@mai_lapyst

You don't parse HTTP packets and json payloads by hand, why would you do it with xmpp
@j_r
JoinJabber
Quiet public
Debacle
Quiet public

@mai_lapyst

I see! It's more or less the opposite of slidge which you need. Sorry, no idea then 😞 But if you find a solution — or you develop your own — please keep us informed!

Mai :v_trans:
Quiet public

@debacle Yeah :/ Appritiate the input though! And yea, will post about it if I get something up and running :3