Building an HTTP Tunnel With WebSocket and Node.JS

When we develop some apps which integrate with third-party services, we need to make our local development server to be exposed to the Internet. To do that, we need an HTTP tunnel for our local server. How does the HTTP tunnel work? In this article, I will show you how I build an HTTP tunnel tool.

Why Do We Need To Deploy Our Own HTTP Tunnel Service?

There are lots of awesome online services for HTTP tunnels. For example, we can use ngrok to get paid fixed public domain to connect your local server. It also has a free package. But for the free package, you can’t get a fixed domain. Once you restart the client, you will get a new random domain. It is inconvenient when you need to save the domain in a third-party service.

Creating a Vue.JS Websocket Server

Using a WebSocket server is a great way to speed up your applications. APIs inherently come with their own HTTP overhead, which means every time you call an API, you have to wait a little bit for the HTTP response.

This is mostly fine, but if you have an application with a lot of time-sensitive and frequent server requests, it can become a problem. A good example of this is a chat app, where you need to see what the other person is saying immediately. APIs can still work in this scenario, but it's not the best solution for the job.

Real-Time Stock Data Updates with WebSockets using Ballerina

The internet is built on the HTTP standard for communicating data between clients and servers. Although HTTP is widely-used, when there is a requirement to support the continuous transmission of data streams or real-time updates between client and server, repeatedly making regular HTTP requests will slow things down.

Messaging on the Internet

Before discussing the real power and use of WebSocket let’s see what are the different ways of messaging on the internet. 

Why Pub/Sub Isn’t Enough for Modern Apps

Chat notifications in Slack. Your Uber driver’s current position. Gone are the days where an app simply presented static data or invoked the occasional API; today’s users expect applications to be fully responsive—not just in terms of UI, but in terms of data too.

This shift in how data is used by applications is universal, but introducing live data to existing applications is not a trivial task. As developers tackle these new requirements, they’ll quickly encounter several realizations:

How to Build a Concurrent Chat App With Go and WebSockets

Go emerged from Google out of a need to build highly performant applications using an easy-to-understand syntax. It's a statically typed, compiled language developed by some of C's innovators, without the programming burden of manual memory management. Primarily, it was designed to take advantage of modern multicore CPUs and networked machines.

In this post, I'll demonstrate the capabilities of Go. We'll take advantage of Go's ability to create concurrent apps to build a chat app easily. On the backend, we'll use Redis as the intermediary to accept messages from the browser and send them to the subscribed clients. On the frontend, we'll use WebSockets via socket.io to facilitate client-side communication. We'll deploy it all on Heroku, a PaaS provider that makes it easy to deploy and host your apps. Just as Go makes programming such an application simple, Heroku makes it easy to supplement it with additional infrastructure.

Analytics Web Socket

Web analytics is the measurement and collection of continuous activity of web usage. This requires continuous communication between client and server. To do that, having a REST API adds an overhead of connection and TLS handshakes every communication. Also, each user event requires communications and a few microseconds worth of a response to report it to the backend. 

For this kind of scenario, WebSockets come to the rescue. A WebSockets is a full-duplex communication, which makes a connection once and then sends/receives data throughout the persisted connection. For more on WebSockets, check out this article.

The Two Most Important Challenges With an API Gateway When Adopting Kubernetes

API Gateway when adopting Kubernetes.


Building applications using the microservices pattern and deploying these services onto Kubernetes has become the de facto approach for running cloud-native applications today. In a microservice architecture, a single application is decomposed into multiple microservices. Each microservice is owned by a small team that is empowered and responsible to make the right decisions for the specific microservice.

Marker Tracking via WebSockets With a Raspberry Pi

Imagine you intend to automatically move a couple of robots within a room. You need accurate position and orientation (direction frontside is pointing to) of each robot. Apparently, outdoor systems like GPS don't work and you have a small budget. What do you do?

After some research for easy-to-apply solutions, my students and I decided to visually track our robots. We put a camera at the ceiling continuously streaming a video of our robots below. What remained to be done was capturing the frames of the video stream, searching for the objects of interest inside and serving the findings.