Architecture of ConverseJS

I am reading the components of conversejs. I don’t understand the role of ‘Web Server’. Doesn’t the client NEED to connect directly to the XMPP server (using BOSH or not, that I understand). Why and how would we ‘relay’ the connection to a third server?

ConverseJS is a third party XMPP client that uses written in Javascript. It typically runs in the browser of an end-user.

The webserver is there to serve the webclient to the browser of the end-user. The client, when loaded in the browser, connects from the client’s computer to the BOSH endpoint.

For clarity, the image that you provided should probably be modified. Instead of having a line from the web server to the BOSH endpoint, the line should be drawn between the web browsers and the BOSH endpoint.

1 Like

Yeah, that clarifies the doubt.

How is this achieved ? How would a ‘webserver’ serve the webclient to the browser of the end-user.

The webclient is just a bit of javascript embedded in an HTML page. For example, the ConverseJS project has set up such a page here, that serves a chat client that connects to their support chat: Converse

I know about conversejs and its function as a client. I was asking about the ‘Web Server’ part. The component ‘Web Server’ is ambiguous to me

You might be reading to much into the importance of the web server. You’ll need something to serve the content (HTML that contains the client) to browsers, but that’s pretty much it.

There are some additional features that the webserver can take a part in, like performing magic with cookies to get SSO functionality - but that’s all far beyond what you minimally need. If you’re interested in learning about that, you should talk to the ConverseJS community.

Okay, thank you