Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use XMPP instead of HTTP

My friend and I, we are working on iPhone application. This application uses XMPP protocol to provide chat functionality. Right now we are designing architecture for the application.

So my friend is working on iPhone side, and I am ruby on rails guy.

My friend suggested, that we wrap every call, that is usually served via HTTP into XMPP. So, user registration, users search, profile editing, photo uploading, everything goes via XMPP. No HTTP at all.

My friend wants to use XMPP, because he says, that it's much easier to implement XMPP on client-side rather HTTP. As for me, this is bullshit, but we've got a product owner, who have been working with my friend for a long time and he trusts him.

So what I'm trying to do is to convince my friend and product owner that using XMPP for what HTTP can work find — is totally not the best idea.

I feel, that if we implement everything on XMPP, we will have a pain in an ass till the end of lives. But how do I prove it?

P.S. I'm not against chat over XMPP, I am against users search, photo uploading, rankings, nearby search and various other restful requests.

Please, leave response. Any help appreciated.

A little update:

Yesterday we had a long discussion. And it turns out, it's quiete hard to receive response from both XMPP and HTTP in Objective-C. Because every single object and its data should be stored in Core Data model, while this model can't be securely modified from various places. Say, if you use HTTP transport, you always want to use only HTTP transport to update data in your model. And if you use XMPP, you should always use XMPP. So, you can't use both.

That's what my iPhone buddy told me. It sounds weird for me, can anyone explain me that?

like image 650
pavel Avatar asked Feb 15 '26 13:02

pavel


1 Answers

Point him to using ASIHttpRequest for all HTTP calls, and then ask where the equivalent library is that will make wrapping data in XMPP calls just as easy...

XMPP is great for what it was built for: chat. HTTP is great for what it does - communications with a web server, or web service. You get web servers that understand the difference between POST and GET, you get proxies that understand how to optimize HTTP traffic, you get automatic server side compression of large payloads, you get calls that you can analyze in any browser, you get a myriad of tools like Charles designed to analyse HTTP traffic so you can see what you are sending.

And of course HTTP has multiple kinds of authentication built into the protocol which the libraries handle for you, rather than building a broken authentication system on top of XMPP (and the first time you design any authentication system it WILL be flawed).

like image 86
Kendall Helmstetter Gelner Avatar answered Feb 18 '26 02:02

Kendall Helmstetter Gelner



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!