Hey everyone! I've been dabbling in software development for a few years, mainly in a niche area, and I'm not super knowledgeable about internet protocols and servers. I created an application that exchanges TCP messages on a local network, where each instance runs as a server on one port and a client on another. Now, I'm looking to expand this app so users can connect over the internet instead of just a LAN. Ideally, I want to implement a system where users can log in and create rooms to exchange messages, syncing their projects together. However, I need advice on how to approach this. What exactly do I need to look into? Is it really necessary to set up a server? Which services would you recommend, and what topics should I study? I'm quite the novice in this area, so I appreciate any guidance! Thanks!
4 Answers
WebRTC might be the route to consider. Although it's quite complex, it’s supported by nearly all web browsers and works seamlessly over public networks, even passing through firewalls, which is a big win for your app. You’ll need STUN/TURN servers, but many providers offer free tiers to get started. Alternatively, building something with Node.js and Express could also work well for socket connections!
You might want to look at IRC protocols. They’re fairly well-documented and could provide you with a robust framework for real-time messaging. Here’s a link to the wiki for some background: https://en.m.wikipedia.org/wiki/IRC
Consider using a message broker like RabbitMQ or MQTT. They handle message management, and you can monitor the messages effectively. These tools usually support SSL for secure connections too. There are a ton of resources out there for getting started with them!
Have you checked out NATS? It’s a fast and secure pub/sub system that lets clients listen to topics and send messages securely over the internet. It has clients for almost any programming language, including Lua. Plus, you can host servers in the cloud or on your local machine. Definitely worth a look!
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String