Cloud computing has been developed more than one decade and still keeps growing and growing. At the present time when we enjoy the huge benefits it brings to us, we are also aware of its deficiency that we have to enhance, especially for applications running against IoT. This session is to present the next generation of cloud computing: Edge Computing. We will introduce you what Edge Computing is, why we need it, and how it works with current cloud computing services. Furthermore, when we get involved into edge computing, we need a tool to help us to analysis real-time and continuous data streams generated by devices, equipment and systems on IoT. Therefore we will also present Apache Edgent, a programming model and micro-kernel style run-time, and show you how it works in conjunction with centralized analytic systems and provides efficient and timely analytic across the whole IoT ecosystem.
https://cyberjos.blog/java/seminar/jcconf-2017-next-generation-of-cloud-computing-edge-computing-and-apache-edgent/
7. #JCConfTaiwan 2017
Cloud Computing
●
Cloud Computing has been raised for long
time. Its scope reaches a historically new high
every year
●
There are huge amount of various data
generated every day, including news, posts,
tweets, logs, user behaviors...
●
Models/patterns/analysis related to Machine
learning increase the speed of expansion as
well
8. #JCConfTaiwan 2017
Cloud Computing Issue
●
Increasing data need more storage space and
computing power
●
Network latency between cloud and clients
becomes a more and more serious issue
●
Clients may not be able to work while network
outage/disconnection
9. #JCConfTaiwan 2017
Fog Computing
●
Cisco introduced this concept in 2014. Next
year, Cisco, Dell, Intel, Microsoft and other
companies founded OpenFog Consortium
which now contains more than 50 companies
●
It’s an architecture that uses one or more
collaborative end-user clients or near-user
edge devices to handle a substantial amount
of storage, communication, configuration,
control, measurement and management.
10. #JCConfTaiwan 2017
Fog Computing Goal
●
Proximity to end-users and clients
●
Dense geographical distribution and local
resource pooling
●
Latency reduction and backbone bandwidth
saving to achieve better quality of service
●
Edge analytics/stream mining
●
Superior user-experience and redundancy in
case of failure
11. #JCConfTaiwan 2017
Fog Computing Issue
●
Computing ability of Machine Learning still
need lots of improvement
●
Is it possible to move data collectors closer to
clients?
●
The concept of CDN
12. #JCConfTaiwan 2017
Edge Computing
●
An architecture of optimizing cloud computing
systems by performing data
processing/analytics and knowledge
generation at the edge of the network or near
the source of the data
●
This reduces the communications bandwidth
needed between clients and data centers
●
This approach requires leveraging resources
that may not be continuously connected to a
network like laptops, smart phones, sensors
13. #JCConfTaiwan 2017
Edge Computing Advantage
●
Decreases the volumes of data that must be
moved
●
Reduces transmission costs, shrinks network
latency and improves quality of services
●
Eliminates the core computing environment
limiting or removing a major bottleneck and a
potential point of failure
●
Security and scalability
14. #JCConfTaiwan 2017
Edge Computing Application
●
Low latency and high bandwidth of network
●
Ability of real-time image processing, analysis
and recognition
●
IoT applications: autonomous cars, unmanned
flying vehicles, AR/VR, medical or weather
monitoring, machine learning, AI
●
It can run on a huge computing equipment, a
cluster of small ones, or mobile devices that
connect to cloud via cable, WIFI or bluetooth
16. #JCConfTaiwan 2017
Situation of Edge Computing
●
AWS announced Lambda@Edge, Greengrass
and Snowball Edit in 2016
●
SAP bought IoT platform provider Plat.One for
Edge Computing
●
Linux Foundation gathered more than 50
companies to build up an open source project
named EdgeX Foundry which is a general IoT
Edge Computing framework
25. #JCConfTaiwan 2017
Apache Edgent
A programming model and micro-kernel style
runtime that can be embedded in gateways
and small footprint edge devices enabling
local, real-time, analytics on the continuous
streams of data coming from equipment,
vehicles, systems, appliances, devices and
sensors of all kinds.
Working in conjunction with centralized
analytic systems, it provides efficient and
timely analytics across the whole IoT
ecosystem: from the center to the edge.
26. #JCConfTaiwan 2017
Apache Edgent
●
Analyzes data and events at the device. When
we analyze on the edge, we can:
●
Reduce the amount of data transmitted to
analytics servers
●
Reduce the amount of data to be stored
●
Uses analytics to determine when data needs
to be sent to a back-end system for further
analysis, action, or storage
●
Shifts from sending a continuous flow of trivial
data to the server to sending only essential
and meaningful data as it occurs
27. #JCConfTaiwan 2017
History
●
IBM released IoT framework named Quarks
that analyze data generated by IoT
●
Apache Quarks was undergoing incubation
●
Apache Quarks was renamed to Apache
Edgent in July 2016 due to the name not being
unique enough
●
It is still in incubation now
28. #JCConfTaiwan 2017
Feature
●
Functional flow API for streaming analytics,
such like Map, Flatmap, Filter, Aggregate,
Split, Union, ...
●
Connectors (MQTT, HTTP, Watson, JDBC,
File, Kafka, Web Socket, custom)
●
Bi-directional communications with the back-
end
●
Web based interface to view application graph
and metrics
●
Edgent uses Java Lambda expressions
29. #JCConfTaiwan 2017
Environment
●
Runs on edge device, Raspberry Pi or Android
●
A simple Linux box on the edge can run Java
7/8 and Edgent
●
Currently Java based, may support other
languages as more developers get involved
●
Version: 1.1.0-incubating (2017-03-20)
30. #JCConfTaiwan 2017
Use Case
●
IoT: Analyze data on distributed edge devices
and mobile devices to:
●
Reduce the cost of transmitting data
●
Provide local feedback at the devices
●
Embedded in an application server instance:
Analyze application server error logs in real
time without impacting network traffic
●
Server rooms and machine rooms: Analyze
machine health in real time without impacting
network traffic or when bandwidth is limited
34. #JCConfTaiwan 2017
Stream Analytics
●
The fundamental building block of an Edgent
application is a stream: a continuous sequence
of tuples (messages, events, sensor readings,
and so on)
●
The Edgent API provides the ability to process
or analyze each tuple as it appears on a
stream, resulting in a derived stream
35. #JCConfTaiwan 2017
Stream Analytics
●
Streams are terminated using sink functions
that can perform local device control or send
information to centralized analytic systems
through a message hub
●
Edgent's primary API is functional where
streams are sourced, transformed, analyzed or
sinked though functions, typically represented
as lambda expressions
36. #JCConfTaiwan 2017
Temperature Sensor
import java.util.Random;
import org.apache.edgent.function.Supplier;
public class TempSensor implements
Supplier<Double> {
double currentTemp = 65.0;
Random rand;
TempSensor() { rand = new Random(); }
public Double get() {
double newTemp = rand.nextGaussian() +
currentTemp;
currentTemp = newTemp;
return currentTemp;
}
}
37. #JCConfTaiwan 2017
Temperature Sensor Application
import static
java.util.concurrent.TimeUnit.MILLISECONDS;
import
org.apache.edgent.providers.direct.DirectProvider
;
import org.apache.edgent.topology.*;
public class TempSensorApplication {
public static void main(String[] args) {
TempSensor sensor = new TempSensor();
DirectProvider dp = new DirectProvider();
Topology topology = dp.newTopology();
TStream<Double> temp =
topology.poll(sensor, 100,
MILLISECONDS);
TStream<Double> filtered =
temp.filter(t -> t < 50 || t >
80);
filtered.print();