
Without anything stopping us further, we jumped on to using routing sub-package leaving the Linux Command approach as an ephemeral hero. As an added bonus, we enjoyed the ease of handling any errors on using routing package.

QUBE CINEMAS CODE
It prevented our code to give a room for string parsing logic and escaped us from damaging the readability of the code. The sub-package routing of gopacket gave us everything that we felt wanting in the previous approach. We realized that we got to look for a neat and impeccable solution.įurther exploring led us to a very convincing solution in all the ways.

Even if it’s plausible for us to parse for any possible output, it will eventually fail to meet the coding standards leaving the reviewers’ eyebrows frowned.

Unfortunately, this process will turn out to be more painful in case of any error like network going down or not connected to the internet. The caveat with this approach is that you have to parse the output string to extract out the necessary information. By formatting the command with the destination host IP address we will be able to figure out the network interface a packet takes to reach the destination host. Fortuitously, we found the Linux command in no time to query the routing table to extract the desired information (network interface). Our first thought solution was to leverage the Routing table. A bit of schooling - If a packet wants to reach a host located in a private network, will take Network Interface 1 as its exit route, likewise a packet takes Network Interface 2 to reach a host in public network. Given this setup, our goal was to find the network interface the packet takes to reach its destination. So it turned out to be an unprecedented requirement for us to solve.įor the purpose of illustration, let us assume that we have two networks connected to the machine and one of the two networks is a public network and the other is a private network. If we fail to pass on the right network interface to the receiver, our whole purpose of building that feature will be collapsed. As the host machine is connected to multiple networks, the challenge is to identify the right network interface that is accessible by the remote machine and configure the corresponding IP address on the remote machine. We were developing a feature, in which, we had to configure the host machine IP address on a remote machine so that the remote machine can pull data at its ease. If you are on the rush of finding the solution, scroll down all the way to the end. Though this problem seems to be a very trivial one on the first sight from the implementation point of view, the way the problem is solved easily in Golang is laudable. But in our case, the host machine has multiple network interfaces bridging different networks. Qube has digital cinema operations in over 4,000 screens (42) across India, masters over 1,800 movies per year across 6 locations in India and the UAE, designs and delivers the most cost-efficient Premium Large Format screens under its EPIQ. The use case would’ve been a non-issue if the host machine had a single network interface. Qube's service offerings are constantly evolving to cater to the needs of the global cinema business. Qube believes in inclusion, and we come from various backgrounds, cultures, and experiences.This post shares our experience on finding a way to determine the network interfaces on a Linux Machine that provides the route to a particular remote machine.

We are a role-based organization, so per your role, you get to choose your work style, be it regular work, splitting your time between an in-office work style, or working remotely! You get a chance to build and shape the movie-going experience of millions of others and work with products that constantly evolve to cater to the needs of the global cinema business! Qube offers a substantiate allowance to foster learning! We hire intellectually curious people and support your learning and development as led by you. We are as flexible as the role allows and give you the autonomy to manage your time accordingly! Our purpose is to bring to life every story - to engage, entertain and enlighten the world. As a company with a passion for cinema, we are committed to creating a seamless world of digital cinema with innovative, robust, reliable, and cost-effective products and constantly evolving to cater to the needs of the global cinema business. Qube CinemaAt Qube Cinema, technology and innovation are at our core.
