Fog and Cloud Computing: Working Together

PinIt
Businessman with cloud computing themed pictures

As with many things in life, the key is finding the balance.

Editor’s note: The first part of this series discussed “Why fog computing is the killer app for the IoT.”

Fog computing aims to resolve some of the challenges of cloud computing by reducing latency, optimizing WAN bandwidth consumption, strengthening security, and improving redundancy and availability. That being said, it isn’t a panacea—there are many scenarios where cloud computing remains the better solution and both cloud and fog architectures are needed to deliver the best solution.

Just as not all clouds are made equal, not all fogs are made equal. Abuse of the term “cloud” has led people to believe that there is only one cloud, when in reality there is a myriad of clouds, one per application, because the cloud is not only defined by the server or networking technologies, but also by the interfaces and APIs used by the applications.

Cloud latency

For example, in the case of home security cameras, forcing my camera’s feed to go to the cloud servers and then back into my mobile application even when I am at home — instead of letting my camera feed the video locally through my WiFi network — adds an unnecessary amount of latency.

Both fog and cloud computing share the same separation of control and data planes in their architecture. This separation is intentionally designed to allow signaling and media to be handled independently and more efficiently. In other words, the cloud-based home surveillance application could have been designed to instruct the camera to establish a secure connection to my mobile application over my LAN and forward the video feed to it, while still having the cloud service handle the control plane. But instead, the manufacturer chose to implement a cloud service where both signaling and media are centralized, making it less efficient for the use case.

So while a video communication system with global access to any person in the world and constant connectivity with the internet is best served with a cloud centralized approach, it’s better to connect smart vehicles using a fog computing approach, enabling them to relay information to each other in areas where there is no wireless broadband coverage.

Fog and cloud working together

Finally, there are cases where fog and cloud computing complement each other. Going back to the connected vehicle example, cars could collect information about road conditions (ice, bumps, traffic, etc.) and relay it directly to each other to alert other drivers on the same road about potential hazards, but also transfer it to a central cloud server when connected to the WAN to alert other drivers and suggest them to avoid the road.

PaaS

A fog and cloud-computing architecture for connected vehicles using a platform-as-a-service in the cloud.

Real-time communications

Contrary to what many people believe, both cloud and fog computing lack any formal standards and protocols—although ETSI is trying to reach some standardized APIs with their Mobile Edge Computing initiative—but they share architectural similarities.

Both have clients and servers and use Application Programming Interfaces (APIs) to communicate. These APIs are unique for each and every cloud application. They can use standardized protocols and codecs as part of those APIs to facilitate media interconnection and data delivery but the application developers have full freedom to decide how their clients will interact with the servers. This has been key to the success of the platform-as-a-service (PaaS) model. Why build everything from scratch when you can leverage pre-built components?

This reuse principle applies to any application. Fog computing applications can benefit from cloud-based PaaS components such as authentication, centralized data storage, data intensive tasks such as image pattern recognition, voice recognition or artificial intelligence—and, of course, real time communications (RTC).

For example, IoT devices can operate in the LAN on a pure fog networking model, but use real-time APIs to establish an audio or video session outside of the LAN, eliminating the complexities of dealing with network address translation (NAT), firewalls, etc.

home security conceptFor example, it would be possible to design a camera service similar to the one I described real-time APIs to deliver the real-time video. When traveling, my mobile app would connect to the cloud, which would authenticate me, reach my camera, and establish a secure video feed to my mobile over the Internet. Furthermore, it would connect the camera microphone and speaker to allow me to talk to anyone in my house.

However, if I were on site, it would allow the video and audio connections directly over the LAN, saving WAN bandwidth and reducing latency. It could also leverage the WebRTC data channel to transmit other application relevant information, which would enable the application developer to allow apps and devices to communicate locally over the LAN and externally over the Internet without having to maintain their own service infrastructure (real or virtualized).

This camera could also be configured to store the recordings locally on my network attached storage (NAS) at home (via a helper app installed on it) or on a compact storage device that can be installed in a secure location in the house and provide access to these recordings from anywhere—inside or outside my home—based on my own preferences.

Opening new doors

Cloud computing has revolutionized the way we interact with applications and with each other, and provides significant savings and efficiencies over traditional architectures for multiple types of applications—including real time communications. However, when we are talking about billions of devices demanding immediate communication, low latency and high bandwidth, cloud computing cannot provide answers to all challenges.

Fog computing provides answers to challenges such as latency and bandwidth but has its own limitations: redundancy and data backup must be managed locally, and communication is typically limited to the devices within the LAN or a limited service area.

As with many things in life the sweet point is finding the balance. I believe fog and cloud computing will complement each other and open a huge door to new forms of communications, applications and human experiences that we can’t even imagine today.

Related:

Fog computing: a new IoT architecture?

White paper: Fog computing reference architecture

About Carlos Aragon

Carlos Aragon is director of solutions marketing at Kandy.io

Leave a Reply