Websites conduct themselves like
software - something comparable to apps. Thus, the execution of web codes must
the accelerated
HTML and JavaScript are primarily used to
present static websites - a couple of formula fields and that's it. Meanwhile,
both languages are used for programming, for things like Angry Birds to
smartphone apps. Many functions are written in JavaScript. However, that raises
a performance problem. You see, JavaScript runs only in one thread for every
open website, so the browser cannot execute several scripts at the same time.
Every interaction by the user, such as a click of the mouse, all potentially
causes delay. There are approaches to resolve these bottlenecking. The HTML5
standard introduces the so called Web Worker. It is an interface in the browser
which allows long Java Scripts to be executed in its own thread. The programmer
of the website must only ensure that the worker scripts can run independent of
user interaction. The result calculated by the Web Worker is then transmitted
by it to the browser, which then incorporates itself into the presentation of
the website.
HTML
and JavaScript are primarily used to present static websites - a couple of
formula fields and that's it.
Web code is optimised
for the Hardware
Web Workers are a huge step towards
optimising the scripting language for multi-core CPUs. However, Internet
Explorer will only introduce them with Version 10, and Android support is still
absent in mobile devices (refer right). Furthermore, Web Worker does not offer
unlimited multithreading. That can be carried only with a deeper intervention
as in the open source project Fabric Engine. That also makes it possible to
write a web code which is executed as fast as, say, C++. The trick lies in
introducing an additional engine with its own compiler in the browser, and this
engine is to be responsible only for the performance parts. This is written in
its own language, Fabric KL, as an extension of JavaScript. Intel is following
a similar method with its River-Trail project. But unlike web workers, both
these methods are not part of the web standard.
The GPU acceleration sometimes achieves
even more than the multi-core support because graphic cores in mobile devices
compute animation faster than CPUs which gives a whole new look to the website
(see right). WebGL delivers complex graphical operations to the graphic chip
and accelerates interactive 3D computations. The ActionScript code in Adobe
Flash was the first choice up to now for this task; however, its performance
and security leaves a lot to be desired. That's why, as open standards, WebGL
and HTML5 are likely to replace the proprietary Flash in the long term. With
the CreateJS projection, even Adobe offers a way out of Flash to HTML5-Export.
Unfortunately, WebGL is just at the starting line where mobile devices are
concerned. Only Sony has made a WebGL enhancement available for its Xperia
phones running Android 4.0. For Apple's devices with iOS 5, at least a hack is
available.
Hardware support in browser
Three procedures efficiently process
JavaScript in multicore CPUs: Web Worker, Fabric Engine and River Trail. WebGL
computers animation on the graphic chip. Not every browser can manage that.
|
Web Worker
|
Fabric Engine
|
River Trail
|
WebGL
|
Chrome
|
From Version 4
|
-
|
-
|
Fully from Version on 18
|
Firefox
|
From Version 3.5
|
From Version 12 via Plug-in
|
From Version 9 via Plug-in
|
Partially from Version 4
|
Internet Explorer
|
From Version 10
|
From Version 4 via Plug-in
|
-
|
-
|
Safari
|
From Version 4
|
-
|
-
|
Partially from Version 5.1
|
Opera
|
From Version 10.6
|
-
|
-
|
Partially from Version 12
|
Safari Mobile
|
From iOS 5
|
-
|
-
|
Partially from iOS 5 (via Hack)
|
Android Browser
|
-
|
-
|
-
|
Android 4 (for Sony Xperia)
|
Opera Mobile
|
From Version 11
|
-
|
-
|
Partially from Version 12
|
Fabric Engine
accelerates WebCode
Using multithreading, Fabric engine
processes Javascripts as fast as normal software written in C++. The benchmark
shows the measurements of a "Monte Carlo" simulation.
·
JavaSkript: 1,434.5 seconds
·
SingleThread C++: 413 seconds
·
JavaScript WithMIT Fabric Engine: 55.5 seconds
·
MultiThread C++: 53.4 seconds
Interactive 3D
Internet thanks to WebGL
Extensive 3D landscapes, as can be found on
the website ro.me, run smoothly only on the graphic chip. WebGL serves as an
interface between GPU and browser thereby.
Interactive
3D Internet thanks to WebGL
A Personal Web for billions of devices
In a couple of years there will be
more machines than people on the web. Their data traffic functions under other
rules
As a user, one has a relatively simple
model of the World Wide Web: PCs, notebooks and smartphones connect to a
server, and in front of each of these devices sits a person who views websites
or chats with his or her friends. But meanwhile, an increasing number of
machines are also exchanging notes with each other on the web. According to an
E-plus study, 2.3 million SIM cards were distributed in 2010 in Germany alone
for communication between machines. The figure will have reached five million
by next year. Here, sending an SMS is the simplest method of machine-to-machine
(M2M) communication. There are projects underway in the industrial and even in
governmental institutions like the ETSI (European Telecommunication Standard
institute) which define new protocols that are optimised to the 'Machine
Internet'. This is necessary to avoid men and machine from getting in each
other's ways in the future.
According to Mike Muller, Chief Technology
Officer of chip developer ARM, approximately 100 billion devices will be online
by 2020, while analysts from Gartner peg the figure at 60 billion. This is
fired by the notion that every car, bike and domestic device will be equipped
with web access facilities. Right now, there are already cities whose lighting
is controlled over the Internet (refer right). At the centre of M2M devices
sits a microcontroller which is responsible for control and communication. That
includes even bulbs with IPv6 address or pacemakers. Presently, it will also be
possible to control machines with ever smaller chips. ARM recently unveiled the
blueprint of the Cortex-MO+: the size of this smallest 32 bit CPU is only one
millimeter.
Communication Channels reserved for
Machines
The hardware in the Machine Network has
lesser computing power these days. The built-in microcontroller still employs 8
or 16 bit commands, not done anymore by PC programs from Windows 95 onwards.
For this purpose, they only need limited communication protocols which meet
their requirements (refer right). A light sensor integrated in a network of
street lights must simply only send measurement data twice a day for a short
time. With the MQTT (Message Queuing Telemetry Transport), IBM has released its
own messaging protocol for machines. It practically is a counterpart of HTTP,
only with a smaller header; thus designed for lower overhead to transmit data
from RFID chips, for instance. The industry is still arguing over which frequency
band the wireless should take place. At the moment, it is rather a question of
whether the M2M communication ought to be opened at all for 3G network (UMTS).
In the long run, 3G and 4G (LTE) could remain reserved for humans as the
majority of machines only communicate via the 2G network (GSM).
Network-Integrated city lighting
Philips' CityTouch enables complete control
of the lighting of a city via web interface as it networks all lamps with each
other. This system is already employed in London and Prague.
Network-Integrated
city lighting
Miniature Devices with Web Connection
The Internet is omnipresent: the bulb with
a web address is controlled by a microcontroller JN5148-001 1. The LifeTouch
sensor HRV011 2 measures the heart activity and reports it to the hospital.
Miniature
Devices with Web Connection
Communication Protocols for sensors
Networked devices communicate with their
own protocols which are adapted to their needs and their weak computing power.
These are the four most important:
·
ROLL: The Routing Protocol for Low power and
Lossy Networks is a streamlined protocol with which light sensors link
themselves to a network to convey status messages.
·
6LOWPAN: Devices receive their unique IP address
by IPv6 over Low power Wireless Personal Area Network based on IPv6 standard to
enable them to be integrated in the existing network with little expense.
·
COAP: The Constrained A plication Protocol
enables a streamlined data transmission between 8 bit microcontrollers with
less computing power (100 kilobyte ROM and 10 kilobyte RAM) - such as in
thermal sensors in containers.
·
MQTT: The Message Queuing Telemetry Transport
developed by IBM is a streamlined communication protocol - suitable also for
messages by RFID chips.