Hacker News new | past | comments | ask | show | jobs | submit login

Can I run XMPP or IRC on an iphone by now or does it still only receive messages when foregrounded?



"Use a bouncer" might be the answer there. All engineering is compromise, and needing a bit more compromise to support legacy applications is not unreasonable.

(In fact, why are you running a stream-oriented application over such an unreliable connection at all?)


My XMPP client works perfectly on my Android phone. Prompt and reliable notifications of new messages. Better than most "Push Message" based clients I've used for other chat services.

It's consistently the last in battery usage as well.

Honestly I don't need the OS to protect me from poorly engineered apps, I just need it to correctly blame the apps so I know which ones to stop using.


>Honestly I don't need the OS to protect me from poorly engineered apps, I just need it to correctly blame the apps so I know which ones to stop using.

No, but the other 6 billion people on the planet do.


Which is why Apple is so big. Also Walmart. Also Top40.


Classic HN response.

I'd guess a FTP and a linux file-server would solve all your filesharing woes as well.

No dev making a mass market device or software should build as if the 1% graybeard engineer is gonna be the only user, that's a lot more user hostile.


The "which apps are using battery" feature is easily useable by novice users.

However most phone vendors incorrectly assume "background connections" will drain battery life despite evidence to the contrary.

Phone vendors have a vested interest though in forcing developers to use their proprietary "push" feature for syncing to phones, they say it's for "battery life" but really its about vendor lock in.

A well engineered app can sync over its own TCP connection just fine and not hurt battery life, but then such an app can work on any device, not just blessed Android builds that have access to GCM.


Android's "these are the apps killing your battery life" interface is perfectly usable by Joe Everyuser. This is a specious argument.


Reality suggests otherwise.

Every modern phone today will give you a list of the apps that take the most juice, and yet somehow for some reason people still install facebook. We might need to protect users from themselves.


Or users could start holding facebook accountable for shitty battery life.

I don't understand why phone manufacturers need to add features to protect facebook users from facebook. facebook has the money to build an app that isn't shit.


Never mind HN, that's a classic Slashdot response.


A bouncer is not a satisfying answer, then I could just use something web-based anyways.

My Android tablet is on a stable WiFi network at home...


>"Use a bouncer" might be the answer there.

Weechat and weechat-android are great choices here. Best CLI and Android IRC clients I've used, and I've tried quite a few.


I run Cisco Jabber on my iPhone, and it seems to run fine. AFAIK that is XMPP.


Getting messages should not/does not have anything to do with running in the background.


If you want a messaging app to work well, it should send and receive messages when the phone has network connectivity and power. Power is a prerequisite for running in the foreground, but network connectivity is not. Some people may in fact want messaging apps to only work while in the foreground and network available, but I suspect that's less desired.

If you're trying to run standard irc and appear online as much as possible, that's not going to work in iOS without a bouncer to stay online for you and send push messages to send notifications and allow the app to run for a bit to download the messages.

It's probably not a bad idea on Android too, it's technically possible to run as a background service and stay connected, but there's a lot of uncertainty, because other services can crowd you out, and you're at the whim of Google and oems with power management these days.


And also, it's the 21st century and we don't need chat protocols to be client-side-liveness chatty to "stay on" when the entire cellular network is architected to find devices and route messages to them.

IRC isn't a well-designed protocol for this use case, and a "land-side" bouncer that bridges the chatty protocol to a lazier protocol ought to be more energy-efficient overall.


Well-designed or not, it exists, and sometimes you just want to use it, without a lecture on how it's suboptimal.


That's fine. you are "free" to hack your own version of Android that modifies the APIs to disregard power-management best practices.

... and maybe your own hardware to run them on. But I wouldn't expect any major player competing against other companies to do the work for you when the outcome is supporting some chat protocols that most people don't use.

(Otherwise, if you're expecting vendors to do it for you, you get to expect the lecture that comes with that expectation, in the form of APIs designed to minimize the ease of doing the wrong-for-the-average-utility-of-the-platform thing. Your cell radio could probably be adjusted to operate as a spark-gap transmitter also, but I don't expect them to provide an easy API for that either ;) ).


Getting messages requires an open TCP connection, hence it really is quite important (at least with IRC) that the app stays running in the background.


This is what the push message API in iOS is for. It wakes up the app when messages come in.


> This is what the push message API in iOS is for. It wakes up the app when messages come in.

IRC isn't reliant on a proprietary push message API, though (be that provided by Apple or Google).

I'm sure there are long-lived bouncer plugins that will integrate with said APIs, but the core IRC protocol is not suited to or designed for devices that aren't capable of a long-lived connection.


Which means there is a third party eavesdropping on chat.


Receiving messages (aka "listening" in server jargon) is essentially a background task, constantly probing to check for any changes.


I think the point being made is that’s a terrible use of resources, not only are you keeping the app running, but you are also forcing the power hungry LTE radio to stay on more.

This idea that the end device should do all the work is not a sustainable approach. There should be a server side component that is handling this for you and sending push notifications when your app needs to wake up for new data.


> sending push notifications when your app needs

How do you think push notifications work? There isn't some magic in LTE to wake up your phone. Your phone needs to keep a connection open in the background and periodically wake up the modem to check for new information.

I use Conversations (XMPP client) on Android, it keeps a plain old TCP connection open in the background and honestly it does not much battery at all. It's consistently at the bottom of battery usage according to my phone.


Do push notifications take advantage of knowledge of the physical layer of the network?

It's a lot cheaper to keep an LTE radio on in a low-wattage "ping me if you need me" mode and trust the 'infinite-power' landside terminal to notify you of messages than to wake it up once every N seconds to loudly ping a cell tower "HEY LET ME KNOW IF I HAVE ANY MESSAGES KTHX."


> How do you think push notifications work?

There’s a very distinct difference between having a persistent connection that only transmits data when there’s something notable vs having a connection that constants pushes a kitchen sink of data that may or may not be needed. Sure, if you sent a push notification on every single message and status change on the IRC server, it’d likely use the same amount of (or maybe more) battery, but who does that?


Right. That's why there's an API for it. Each app doesn't have to stay awake listening. The OS will wake the app up.


Oh, that does make sense.

In that case, having the app run the background really does seem like a waste when compared to leaving the OS to do this task.


Slack receives messages with no problem.

If XMPP/IRC can’t provide that, it’s not iOS’ problem.


Slack works because of push notifications. A random IRC app can't handle push notifications for you because they aren't the IRC server and aren't running a bouncer for you. On the other hand, the IRC server can't handle push notifications for you because they don't have an app signed with Apple's key sending the notifications.

Basically protocols as a general thing can't work on iOS, only individual apps/services which get to read all your messages and access your login credentials work.


> Basically protocols as a general thing can't work on iOS, only individual apps/services which get to read all your messages and access your login credentials work.

Which I think is a reasonable requirement for a chat service, especially on mobile.


I don't know why you were downvoted; it's a solid-and-concise critique of the difference in protocols.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: