1. Open APIs for Open Minds
Fi-Ware :: la plataforma de Internet del Futuro
Joaquín Salvachua (jsalvachua@dit.upm.es)
Javier Cerviño (jcervino@dit.upm.es)
Alvaro Alonso (aalonso@dit.upm.es)
Juan Quemada jquemada@dit.upm.es)
viernes, 4 de abril de 14
3. FI-PPP
• Esto tiene muchos acronimos raros.
• Intentaremos ignorarlos por ahora para no
liaros.
• Plataforma cloud con acceso a un gran
numero de componentes y datos de
diversas Ciudades inteligentes y sensores.
• FI es por Future Internet.
viernes, 4 de abril de 14
7. Información técnica
• Esta en un wiki
• http://forge.fi-ware.org/plugins/
mediawiki/wiki/fiware/index.php/
Main_Page
• Es enciclopedica y no tutorial.
• No asustarse y preguntarnos
viernes, 4 de abril de 14
9. Catálogo
• Hay un catálogo con toda la información de
cada uno de ellos.
• http://catalogue.fi-ware.eu/
• Existen muchos, pero nos vamos a centrar
en los más representativos.
viernes, 4 de abril de 14
10. Generic Enablers
• Son Piezas de lego que podemos usar para
nuestros servicios
viernes, 4 de abril de 14
11. GE
• Nombre que se dan a los diversos
componentes en los proyectos.
• Son especificaciones de los API de acceso a
estos componentes y los GEi las
implementaciones que existen (Como las
clases y los objetos).
• Receta: son los componentes que
usaremos.
viernes, 4 de abril de 14
14. Detalles
• Acceso a la infraestructura en la fi-nube:
• Registrarse en : https://account.lab.fi-
ware.org
• Esto nos permitirá crear y acceder a una
máquina virtual.
viernes, 4 de abril de 14
19. Iden%ty
Management
in
FI-‐WARE
• Management
of
users,
their
authen)ca)on
and
authoriza)on,
and
privileges
within
organiza)ons.
• Resources
used:
– Users
– Organiza%ons
– Roles
– Applica%ons
• Users
register
themselves,
create
organiza%ons,
and
assign
roles
into
these
organiza%ons.
• It
enables
applica)ons
to
access
user’s
protected
informa)on.
– Trusted
environment
– OAuth
2.0
standard
• hHp://oauth.net/2/
19
viernes, 4 de abril de 14
21. Architectura
21
NGSI
IoT
Adapter
IoT Backend Device
Management
Browser
Context
BrokerTicket
Management
CEP
Wirecloud
(javascript
run%me)
widgets
Object
Storage
History
Loca%on
Wirecloud
(server)
Cosmos
viernes, 4 de abril de 14
22. Architectura
21
NGSI
IoT
Adapter
IoT Backend Device
Management
Browser
Context
BrokerTicket
Management
CEP
Wirecloud
(javascript
run%me)
widgets
Object
Storage
History
Loca%on
Wirecloud
(server)
Cosmos
viernes, 4 de abril de 14
23. Reference
IoT
FI-‐Lab
Scenario
22
HACKATHONs
DCA
IDAS
Context
Broker
SANTANDER
SEVILLA
App
Logic
FI-‐WARE
Cloud
User
Interface
Dashboards
UI
Prototyping
OAuth2.0 DCA
Portal,
Dashboard
viernes, 4 de abril de 14
24. New
Devices,
Technologies
&
Protocols:
23
HW
(Motes,
TT
…)
TX
(BLE,
802.15.4…)
6LowPAN
UDP
CoAP
HW
NGSI
/
Light
App
viernes, 4 de abril de 14
25. What
is
Cosmos?
24
• Cosmos
is
Telefónica's
Big
Data
and
Open
Data
asset.
• Cosmos
is
Hadoop
ecosystem-‐based
• HDFS
as
its
distributed
file
system
• Hadoop
core
as
its
MapReduce
engine
• HiveQL
as
the
remote
analysis
mechanism
• Oozie
as
remote
MapReduce
jobs
and
Hive
launcher
• Plus
other
proprietary
modules
• SFTP
server
for
HDFS
• Cygnus,
the
context
data
injector
coming
from
Orion
• Automa%c
cluster
deployment
(roadmap)
• Infinity
protocol
(roadmap)
• Plus
open
datasets
viernes, 4 de abril de 14
27. Orion
data
persistency
in
Cosmos
26
hHps://forge.fi-‐ware.eu/plugins/mediawiki/wiki/fiware/index.php/How_to_persist_Orion_data_in_Cosmos
viernes, 4 de abril de 14
28. Open
Datasets
in
Cosmos
27
Source Dataset Data
type Notes
Smar
t
Ci%es
Málaga Plagues
tracking HistoricalSmar
t
Ci%es
Santander Smart
Santander Sensoring Data
coming
through
Orion
Context
Broker
Smar
t
Ci%es
Santander
Parque
de
las
Llamas Sensoring
Data
coming
through
Orion
Context
Broker
Smar
t
Ci%es
Sevilla Bikes
ren%ng Historical
Smar
t
Ci%es
Sevilla
Water
metering Historical
Smar
t
Ci%es
Sevilla
Census Historical
Smar
t
Ci%es
Sevilla
Infraestructures Historical
Smar
t
Ci%es
Zaragoza Air
quality Historical
Other TwiHer FI-‐WARE-‐related
tweets StreamingOther
AEMET Weather Historical Un%l
September
2013
hHp://forge.fi-‐ware.eu/plugins/mediawiki/wiki/fiware/index.php/FI-‐WARE_open_datasets_central
viernes, 4 de abril de 14
29. Our
IoT
Resources
Ecosystem
is
28
SANTANDER
SEVILLA
MALAGA
TRENTO
viernes, 4 de abril de 14
30. Context
management
• Context
Management
in
FI-‐WARE
is
about
management
of
Context
data
(aka
Context
Informa%on)
• Context
Informa%on
is
always
relevant
to
“en%%es”,
although
en%%es
can
be
anything
(applica%ons,
users,
things,
…)
• Orion
Context
Broker
intermediates
between
context
producers
and
context
consumers
29
Orion
Context
Broker Applica%ons
viernes, 4 de abril de 14
31. The
NGSI
informa%on
model
30
Meta-data
• Name
• Type
• Value
Context Element attributes
• Name
• Type
• Value
Context Element
• En%tyId
• En%tyType
1 n 1 n
“has”
“has”
(We
are
not
fully
suppor%ng
metadata
right
now)
Node
Lamps
Electrical
Regulator
Vans
Technicians
Issues
loca%on TimeInstant
severity baHeryCharge
illuminance
presence
electricPoten%al
viernes, 4 de abril de 14
32. Orion
Context
Broker
in
a
nutshell
Orion
Context
Broker
Context
Producers
Context
Consumers
subscrip%ons
update
query
no%fy
no%fy
update
update
DB
1026
1026
viernes, 4 de abril de 14
33. Orion
Context
Broker
in
a
nutshell
31
Orion
Context
Broker
Context
Producers
Context
Consumers
subscrip%ons
update
query
no%fy
no%fy
update
update
DB
1026
1026
viernes, 4 de abril de 14
34. NGSI
API
• REST
API
(XML
&
JSON
rendering)
• NGS10
–updateContext
–queryContext
–subscribeContext
/
updateContextSubacrip%on
/
unsusbribeContext
• NGS9
–registerContext
–discoverContextAvailability
–subscribeContext
Availability/
updateContextAvailabilitySubacrip%on
/
unsusbribeContextAvailability
• Addi%onal
“convenience”
opera%ons
to
easy
some
opera%ons
32
viernes, 4 de abril de 14
43. How
to
exploit
the
data
36
• The
easy
way:
Hive
queries
• Hive
queries
are
SQL-‐like
• Hive
uses
pre-‐defined
MapReduce
jobs
for
filtering,
grouping,
joining…
• All
the
datasets
are
loaded
into
Hive
tables
• Hive
cli
is
available
within
the
cluster
(tes%ng
purposes)
• Simple
Hive
remote
clients
can
be
created
• The
not
so
easy
way:
custom
MapReduce
jobs
• The
jobs
must
be
created
from
scratch
• Datasets
are
directly
read
from
HDFS
• Oozie
can
remotely
launch
the
MapReduce
jobs
and
Hive
tasks
as
well
• Java
API
• API
REST
viernes, 4 de abril de 14