Running indirectly… The Go Mobile project is marked as “experimental” and I guess it will take a couple of years until we’ll get some stable version. The way I’m going to show you how to run Go programs on Android is a bit tricky as it actually uses Termux which is an Android terminal emulator and Linux environment app. Technically we could install and run there many other languages, but let’s see how it’s getting on with Go.
Let’s start listening… …listening for incoming socket connections. This is the very first thing that every server should do and to avoid potential problems with firewalls/proxies, let’s use the standard port 80. So, what else should our WebSocket server be able to do? respond to the handshake request (GET) receive and send messages extract frames keep track of clients respond to Pings and Pongs
Forget about frameworks for now… There’s a lot of frameworks that support WebSockets, but the purpose of every framework is to speed up the process of building products by hiding all low level details underneath, the details which I believe are important to know (=understand). You probably know that WebSockets allow you to establish real time communication between a webserver and its clients and what’s cool about it, is you can get a response without a need to request it (explicitly).
Does the place matter? Unless there’s a security guard asking you to empty your pockets, leave your mobile phone at the reception, the place does not really matter. Ask yourself these two simple questions: do you really know what other people do in the office? If you’re a manager you’re probably have your own office and if even if you don’t you probably would not stare at someone’s monitor (they will minimize the window very quickly anyway ;) ) Having your staff in the office gives you only an illusion of controlling their work.
Why am I blogging? I just want to share my ideas, knowledge and experience with you and I hope you’ll find it interesting. I’m a pragmatist, so I will do my best to make my posts useful but I will also touch very theoretical topics. I don’t like very long posts myself (I think most of us just scroll down to get to the point :)), so I will try to keep them short.