Christa  Stehr

Christa Stehr

1598444378

Announcing wrangler dev — the Edge on localhost

Cloudflare Workers — our serverless platform — allows developers around the world to run their applications from our network of 200 datacenters, as close as possible to their users.

A few weeks ago we announced a release candidate for wrangler dev — today, we’re excited to take wrangler dev, the world’s first edge-based development environment, to GA with the release of wrangler 1.11.

Think locally, develop globally

It was once assumed that to successfully run an application on the web, one had to go and acquire a server, set it up (in a data center that hopefully you had access to), and then maintain it on an ongoing basis. Luckily for most of us, that assumption was challenged with the emergence of the cloud. The cloud was always assumed to be centralized — large data centers in a single region (“us-east-1”), reserved for compute. The edge? That was for caching static content.

Again, assumptions are being challenged.

Cloudflare Workers is about moving compute from a centralized location to the edge. And it makes sense: if users are distributed all over the globe, why should all of them be routed to us-east-1, on the opposite side of the world, causing latency and degrading user experience?

But challenging one assumption caused others to come into view. One of the most obvious ones was: would a local development environment actually provide the best experience for someone looking to test their Worker code? Trying to fit the entire Cloudflare edge, with all its dependencies onto a developer’s machine didn’t seem to be the best approach. Especially given that the place the developer was going to run that code in production was mere milliseconds away from the computer they were running on.

When I was in college, getting started with programming, one of the biggest barriers to entry was installing all the dependencies required to run a single library. I would go as far as to say that the third, and often forgotten hardest problem in computer science is dependency management.

We’ve not the first to try and unify development environments across machines — tools such as Docker aim to solve this exact problem by providing a prepackaged development environment.

Yet, packaging up the Workers runtime is not quite so simple.

Beyond the Workers runtime, there are many components that make up Cloudflare’s edge, including DNS resolution, the Cloudflare cache — all of those parts are what makes Cloudflare Workers so powerful. That means that without those components, a standalone runtime is insufficient to represent the behavior of Worker request handling. The reason to develop locally first is to have the opportunity to experiment without affecting production. Thus, having a local development environment that truly reflects production is a requirement.

#wrangler #cloudflare workers #serverless #developers

What is GEEK

Buddha Community

Announcing wrangler dev — the Edge on localhost
Christa  Stehr

Christa Stehr

1598444378

Announcing wrangler dev — the Edge on localhost

Cloudflare Workers — our serverless platform — allows developers around the world to run their applications from our network of 200 datacenters, as close as possible to their users.

A few weeks ago we announced a release candidate for wrangler dev — today, we’re excited to take wrangler dev, the world’s first edge-based development environment, to GA with the release of wrangler 1.11.

Think locally, develop globally

It was once assumed that to successfully run an application on the web, one had to go and acquire a server, set it up (in a data center that hopefully you had access to), and then maintain it on an ongoing basis. Luckily for most of us, that assumption was challenged with the emergence of the cloud. The cloud was always assumed to be centralized — large data centers in a single region (“us-east-1”), reserved for compute. The edge? That was for caching static content.

Again, assumptions are being challenged.

Cloudflare Workers is about moving compute from a centralized location to the edge. And it makes sense: if users are distributed all over the globe, why should all of them be routed to us-east-1, on the opposite side of the world, causing latency and degrading user experience?

But challenging one assumption caused others to come into view. One of the most obvious ones was: would a local development environment actually provide the best experience for someone looking to test their Worker code? Trying to fit the entire Cloudflare edge, with all its dependencies onto a developer’s machine didn’t seem to be the best approach. Especially given that the place the developer was going to run that code in production was mere milliseconds away from the computer they were running on.

When I was in college, getting started with programming, one of the biggest barriers to entry was installing all the dependencies required to run a single library. I would go as far as to say that the third, and often forgotten hardest problem in computer science is dependency management.

We’ve not the first to try and unify development environments across machines — tools such as Docker aim to solve this exact problem by providing a prepackaged development environment.

Yet, packaging up the Workers runtime is not quite so simple.

Beyond the Workers runtime, there are many components that make up Cloudflare’s edge, including DNS resolution, the Cloudflare cache — all of those parts are what makes Cloudflare Workers so powerful. That means that without those components, a standalone runtime is insufficient to represent the behavior of Worker request handling. The reason to develop locally first is to have the opportunity to experiment without affecting production. Thus, having a local development environment that truly reflects production is a requirement.

#wrangler #cloudflare workers #serverless #developers

Zelma  Gerlach

Zelma Gerlach

1621616520

Edge Computing: Device Edge vs. Cloud Edge

It sometimes makes sense to treat edge computing not as a generic category but as two distinct types of architectures: cloud edge and device edge.

Most people talk about edge computing as a singular type of architecture. But in some respects, it makes sense to think of edge computing as two fundamentally distinct types of architectures: Device edge and cloud edge.

Although a device edge and a cloud edge operate in similar ways from an architectural perspective, they cater to different types of use cases, and they pose different challenges.

Here’s a breakdown of how device edge and cloud edge compare.

Edge computing, defined

First, let’s briefly define edge computing itself.

Edge computing is any type of architecture in which workloads are hosted closer to the “edge” of the network — which typically means closer to end-users — than they would be in conventional architectures that centralize processing and data storage inside large data centers.

#cloud #edge computing #cloud computing #device edge #cloud edge

Kabanda  Nat

Kabanda Nat

1624696786

Microsoft Edge: Web dev tools, A11y, and PWAs

This episode covers:

  • Introductions: Chris Heilmann, Rachel Weil, Erica Draud
  • Chris Heilmann: What’s new with Microsoft Edge?
  • Rachel Weil: What’s new with Microsoft Edge developer tools?
  • Rachel Weil Demo: Customizing the DevTools interface
  • Rachel Weil Demo: Accessiblity features in DevTools
  • Chris Heilmann Demo: Accessiblity features in DevTools
  • Erica Draud: What’s new with Progressive Web Apps?
  • Erica Draud Demo: How to make a PWA and use the tools
  • Tabs vs Spaces? (Everyone)
  • Where can I learn more?

#microsoft edge #web dev tools #pwas #web dev

Juanita  Apio

Juanita Apio

1623173160

Computing on the EDGE

Most of the companies in today’s era are moving towards cloud for their computation and storage needs. Cloud provides a one shot solution for all the needs for services across various aspects, be it large scale processing, ML model training and deployments or big data storage and analysis. This again requires moving data, video or audio to the cloud for processing and storage which also has certain shortcomings compared to do it at the client like

  • Network latency
  • Network cost and bandwidth
  • Privacy
  • Single point failure

If you look at other side, cloud have their own advantages and I will not talk about them right now. With all these in mind, how about a hybrid approach where few requirements can be moved to the client and some remain on the cloud. This is where EDGE computing comes into picture. According to Wiki here is the definition of the same

Edge computing_ is a distributed computing paradigm that brings computation and data storage closer to the location where it is needed, to improve response times and save bandwidth”_

Edge has a lot of use cases like

  • Trained ML models (specially video and audio) siting closer on the edge for inferencing or prediction.
  • IoT data analysis for large scale machines right at the edge

Look at Gartner hype cycle for emerging technologies. Edge is gaining momentum.

There are many platforms in the market specialised in edge deployments right from cloud solutions like azure iot hub, aws greengrass …, open source like _kubeedge, edgeX-Foundary _and third party like Intellisite etc.

I will focus this article on using one of the platforms for building an “Attendance platform” on the edge using facial recognition. I will add as many links as possible for your references.

Let us start with taking the first step and defining the requirements

  • Capture video from the camera
  • Recognise faces based on trained ML model
  • Display the video feed with recognised faces on the monitor
  • Log attendance in a database
  • Collect logs and metrics
  • Save unrecognised images to a central repository for retraining and improving model
  • Multi site deployments

Choosing a platform

Choosing the right platform from so many options was a bit tricky. For the POC, we looked at few pieces in the platform

  • Pricing
  • Infrastructure maintenance
  • Learning curve
  • Ease of use

There were other metrics as well but these were on top of our mind. Azure IoT looked pretty good in terms of above evaluation. We also looked at Kubeedge which provided deployments on Kubernetes on the edge. It is open source and looked promising. Looking at many components (cloud and edge) involved with maintenance overhead, we decided not to move ahead with open source. We were already using Azure cloud for other cloud infra, this also made our work a little more easier in choosing this platform. This also helped

Leading platform players

Designing the solution

Azure IoT hub provided 2 main components. One is the cloud component responsible for managing the deployments on edge and collection of data from them. The other is the edge component consisting of

  • Edge Agent : manages deployment and monitoring of modules on the IoT Edge device
  • Edge Hub : handles communications between modules on the IoT Edge device, and between the device and IoT Hub.

I will not go into the details, you can find more details here about the Azure IoT edge. To give a brief, Azure edge requires modules as containers which can to be pushed to the edge. The edge device first needs to be registered with the IoT Hub. Once the Edge agent connects with the hub, you can push your modules using a deployment.json file. The container runtime that Azure Edge uses is moby.

We used Azure IoT free tier which was sufficient for our POC. Check the pricing here

As per the requirements of the POC, this is what we came up with

The solution consists of various containers which are deployment on the edge as well as few cloud deployments. I will talk about each components in details as we move ahead.

As part of the POC, we assumed 2 sites where attendance needs to be taken at multiple gates. To simulate, we created 4 ubuntu machine. This is the ubuntu desktop image we used. For attendance, we created a video containing still photos of few filmstars and sportsperson. These videos will be used for attendance in order to simulate the cameras, one for each gate.

Modules in action

Camera module

It captures IP camera feed and pushed the frames for consumption

  • It uses python opencv for capture. For the POC, we read video files pushed inside the container.
  • Frames published to zeromq (brokerless message queue).
  • Used python3-opencv docker container as base image and pyzmq module for mq. Check this blog on how to use zeromq with python.

The module was configured to use a lot of environment variables, one being sampling rate of the video frames. Processing all frames require high memory and CPU, so it is always advisable to drop frames to reduce cpu load. This can be done in either camera module or inferencing module.

Inference Module

  • Used a pre-existing face recognition deep learning model for our inferencing needs.
  • Trained the model with easily available filmstars and sportsperson images.
  • The model was not trained with couple of images which were present in the video to showcase undetected image use case. These undetected images were stored in ADLS gen2, explained in the storage module.
  • Python pyzmq module was used to consume frames published by the camera module.
  • Not every frame was processed and few frames were dropped based on the configuration set via environment variables.
  • Once an image was recognised, a message (json) for attendance was send to the cloud using IoT Edge hub. Use this to specify routes in your deployment file.

#deep-learning #edge-computing #azure #edge

Alec  Nikolaus

Alec Nikolaus

1596036600

Edge Is Taking Data to a Higher Level

This article is an introduction to edge computing. Let’s have a look at what edge computing is and the advantages.

Introduction

Over the years of computing, the processing and storage of data systems that are used in the interconnected computers have been based on the technology of cloud computing. Cloud computing has been based on the centralized data storage systems where all the devices performing some internet operations depend on the efficiency of the cloud service provider.

Since the data has often been centralized, various concerns including the security and the speed in operation have been raised regarding this setup of infrastructure. Since the data is centralized, a single breach can sabotage a large number of users. Moreover, people’s right to privacy may be violated since the service providers have an opportunity to access and monitor people’s details and demographic characteristics.

Latency to the information required may be experienced when the data is being transmitted from the cloud to the end-user due to factors such as the traffic and the distance.

The introduction of edge computing has proved to be effective in the problems associated with cloud computing. Let’s have a look at what edge computing is and the advantages.

Edge Computing From a Broad Perspective

The introduction of edge computing has led to the successful proximity of internet data to the end-user. This is done by installing the edge devices close to the end-user by different service providers. A system of interconnected nodes enables the transfer of data from one edge device to the other, hence resulting in the ease of accessing information.

The response time which has been a critical concern especially to the heavy commercial consumers has been solved by this great technology of edge computing. Since the edge devices are close to the end-user, the time of travel of the information from one end-user to the other or from an end-user to a system of AI in the edge devices is minimized. Besides, the traffic that exists in cloud computing is eliminated since the decentralized edge devices serve few users, consequently, the efficiency in the response time and rate.

What Is So Unique in Edge Computing

The system of a computer program that functions to avail data to users at their location and delivers it, can be referred to as an edge device.

Most service providers such as the CCTV cameras, traffic systems in roundabouts and other critical points that heavily depend on the real-time processing of data find the edge computing useful in these functions. The CCTV cameras collect a huge amount of data that can be as high as 10 GB per second especially in a moving car for about a mile. For the data to be transferred to the cloud for the AI (artificial intelligence) to assist in its processing, there can be latency experienced in the process resulting in poor decision making especially in the self-driving cars or the AI dependent systems.

Edge devices enable the real-time processing of the data in huge volumes and at the shortest distance hence the elimination of the latency experienced when cloud computing is adopted. Cloud computing might be efficient in the operation of huge data for its capacity and the extent of specialized and sophisticated hardware installed in it, the edge devices are unchallenged in the operation of real-time data.

#cloud computing #data #edge computing #edge #interner of things #cloud