-1

I'm currently working on an app that will need some realtime communication between two clients. Not necessarily text chat. I was wondering if I can utilize free IRC services like Freenode to act as the backend of sorts for my app's communication?

I skimmed through their TOS and I couldn't find anything against it. But I want to know if there are some gotchas that I need to be aware of.

user400424
  • 373
  • 3
  • 15
  • Why would you use IRC for the communication? For that you need to implement not only the socket communication but also the IRC protocol (at least partially). Since you need sockets anyway, why not simple use them to communicate directly between the programs? – Some programmer dude Aug 28 '17 at 08:51
  • 3
    I'm voting to close this question as off-topic because it doesn't seem to be about a software or programming problem. – Some programmer dude Aug 28 '17 at 08:57
  • @Someprogrammerdude I need something to host it as the communication will be done over the internet. – user400424 Aug 28 '17 at 09:31
  • Why does it need to be "hosted"? Do you need to save the communication? Why can't you have direct communication between the programs instead? – Some programmer dude Aug 28 '17 at 09:33
  • @Someprogrammerdude the two clients can't operate with opened ports so none of them can do a direct hosting for the communication, thus the need to rely on an external service that they both can access. I wanted to use free IRC service because I don't want to pay for a BaaS for a small project – user400424 Aug 28 '17 at 09:36
  • I'm voting to close this question as off-topic because it's about TOS (terms of service) / legal issues instead of directly about programming or coding. – Pang Sep 26 '17 at 09:35

1 Answers1

0

It sounds like what you're really asking is something like the following...

How can I communicate between two clients over the Internet, even if both of these clients are behind some kind of firewall that prevents a direct TCP or UDP connection?

Answer: The usual solution is to use a server on the Internet that is reachable by both clients as an intermediary, to relay their traffic. Up until recently this was accomplished in a very application specific manner and required managing a dedicated server on the Internet. But what if there was a way to offload the burden to someone else...

I was wondering if I can utilize free IRC services like Freenode to act as the backend of sorts for my app's communication?

Answer: Probably not. Or if it works for your test app, you will quickly get banned in production when you try to send a significant amount of traffic through the IRC servers. Fortunately this kind of relay service is actually available for developers and production use cases. The WebRTC was designed specifically to make these kinds of real-time applications possible. The firewall-busting buzzwords you should be Googling for are STUN and TURN.

I'm currently looking into Twilio's hosted service for my own apps, however it's also possible to host your own TURN relay on Amazon's EC2. Unfortunately there's no such thing as a free lunch, so you'll have to pay some amount for each of these services but you'll be able to bask in the warm glow of writing robust, standards compliant code.

v1bri
  • 1,398
  • 8
  • 13
  • Thank you! I didn't know I would get banned. I was going to send the messages as an encrypted string to the IRC server so there shouldn't be any issue about privacy. But I didn't consider that the IRC servers will have rate limits. It's not exactly for a browser-based app, more of a desktop one but I'll check out the resources you posted. – user400424 Oct 02 '17 at 13:26