Photo by Matthew Henry on Unsplash

Better together or better not? Edge Computing vs Cloud

Practical reasons to decentralize data computing in a short selling guide

Artur Kobyliński
Published in
4 min readMar 7, 2020

--

It’s quite thrilling when someone who represents a tech company asks you for advice. You help and make a deal at the same time, great. Such situations season the job. Unless you were asked about machine learning on embedded systems and you’ve just realized that your real neural network doesn’t respond. Let’s try to avoid this kind of incident and find the right way to keep the discussion flowing. Hence this text is an attempt to answer the question of the difference between applying machine learning in the cloud and on the edge devices in the context of a product purpose.

In simplification, the creation of a concept of AI devices can be seen as a result of reference to 8 presented further issues like privacy, latency, etc. Namely, shifting computing from Cloud to Edge is a strong trend nowadays, let’s then see what empowers that.

Your Highness Edge:

Most of us like privacy and simply don’t like it when our photos are stored and post-processed in the cloud without any notice or permission. Obviously, in many cases (and types of data) it’s forbidden by law. On the other hand, it’s not forbidden for a cinema to check out what type of audience is interested in their shows. Any demographic data, like age and gender, may be worth determining. Here, edge computing is a great solution: it can “observe” people to measure the indicators like an age without interfering with their privacy. Indeed, the information flowing from the device to the cloud is not an image anymore: it’s a processed, non-personalized stream that changes the subject from a person to an indication once and forever.

Holy bandwidth is the maximum rate of data transfer across a network. This limit is a hurdle to overcome in cases like streaming from tens of security cameras to the cloud. So checking whether a stranger drinks coffee in the kitchen may cost the company much more than this coffee. Not to mention what impact would it be on YouTube in the office? Again that can be computed (or partially computed) on edge and the result is sent to the cloud.

Network connectivity always goes together with the latency (delay) — a time of information transfer. Even 5G, which pushes it to the limits, is laden with a minimum of 30 ms of data transfer between mobile and server. Any system that is critical on immediate reactions can’t base on computing in the cloud. Typical cases here are autonomous devices like drones or cars — they can’t wait for the decision to be computed remotely.

Confidentiality is not the same as privacy. It’s about protecting generated data and not the subject itself. This applies to a situation where, for example, a company wants to avoid pumping its crucial data outside the building.

Offline, and what? no Internet?! Fortunately, not everything is connected yet otherwise, Sigma (the company I work for) would come to a stumer. But seriously there are situations where a device can’t be connected to the Internet — e.g. offshore.

Geospatial and various sources type generalization is a huge advantage. To some degree, cloud computing is not sensitive to geographical distribution and also doesn’t depend on the data type. If sources of information originate from all over the world then a centralized architecture is easier to set up than complex peer-to-peer connections. There is another aspect of having cloud-based solutions: the architecture can be realized as a hybrid of different services from different clouds.

Do heavy lifting in the cloud. Let’s take a look at Cortex-M0 being equipped with less than 100kB of RAM memory but in practice, we can use a few kB. Trying to execute (inference) a reasonable size neural network on M0, we must deal with lacking a couple of MB for parameters only. Thanks to ASICs we observe huge progress in optimization but still, machine learning for embedded systems is tricky so the rule of thumb is stick to the cloud as long as you can.

In practice, the best results we can get are in the balance between both solutions. The ultimate goal is how to tune these instruments to play Beethoven.

--

--

Artur Kobyliński

Focused (or not) on machine learning for embedded systems and only thousands of other things. Competence Team Leader.