Professional Documents
Culture Documents
Abstract—Administrators and operators of next generation improving city management [6], [7] and, in the long term,
cities will likely be required to exhibit a good understanding city life quality. Several research efforts tackle the issues
of technical features, data issues, and complex information that, and challenges [8], [9] related to these “smart cities” [10],
up to few years ago, were quite far from day-to-day administra-
tion tasks. In the smart city era, the increased attention to data e.g., for handling huge amounts of sensors deployed in the
harvested from the city fosters a more informed approach to city territory [11], [12], to manage administrative processes
city administration, requiring involved operators to drive, direct, through open-data exchanges [13], to establish common lay-
and orient technological processes in the city more effectively. ers of interoperability between city functions through semantic
Such an increasing need requires tools and platforms that can modeling [14], etc.
easily and effectively be controlled by nontechnical people. In
this paper, an approach for enabling “easier” composition of Among these challenges, data-handling is particularly
real-time data processing pipelines in smart cities is presented, interesting. On one hand, it requires technology capable of
exploiting a visual and block-based design approach, similar to handling thousands of data points, continuously captured from
the one adopted in the Scratch programming language for ele- the field. On the other hand, it requires new programming
mentary school students. The proposed approach encompasses patterns and paradigms which shall be accessible to per-
both a graphical editor and a sound methodology and workflow,
to allow city operators to effectively design, develop, test, and sons that were previously not exposed to hard technological
deploy their own data processing pipelines. The editor and the aspects, e.g., city administrators. While many researchers
workflow are described in the context of a pilot of the ALMANAC are investigating methods and tools for complex event
European project. processing (CEP) [15], [16] and Big Data [17], [18] in the
Index Terms—Big data analysis, block-based programming, context of smart cities, few approaches explore interaction pat-
complex event processing (CEP), filter and pipe, smart city, visual terns, programming languages and/or interfaces for enabling
programming. nonexperts to define on-line data processing pipelines, as it
will likely be needed in next generation cities.
In this paper, we explicitly target this challenge by propos-
I. I NTRODUCTION ing a block-based and visual language for defining CEP
ITIES are playing an increasingly important role, world-
C wide. They are currently inhabited by nearly half the
world’s population [1] (68% in Europe),1 consume 80% of
pipelines through composition of simple processing stages,
namely blocks. We exploit the proven paradigm of block-based
programming, e.g., adopted by the MIT Scratch program-
the world’s energy production and roughly produce 70% ming language [19] to enable elementary school students to
of the total carbon dioxide [2]. Urban-related challenges approach computer science. This paradigm, integrated with the
encompass: 1) the adoption of information and sensing well known pipe and filter pattern [20], permits to design a
technology for better understanding the city dynamics [3]; language composed by simple, easy to understand, process-
2) the increasing engagement of citizens in administrative ing blocks that composed together can generate complex and
and management processes, possibly leveraging the power articulated processing pipelines. Along with a graphical editor
of the crowds [4]; and 3) the environmental sustainability to define CEP pipelines, this paper presents a sound methodol-
of cities, fostering virtuous behaviors for better consuming ogy and workflow to allow city operators to effectively design,
energy and goods, and for better handling waste and pol- develop, test, and deploy the pipelines they would like to
lutants [5]. In this extremely complex context, innovative define. Both the editor and the workflow presented here are
city-wide ICT platforms are deemed as crucial elements for described in the context of a pilot of the ALMANAC European
project, in particular the pilot held in the city of Turin,
Manuscript received June 15, 2017; accepted July 12, 2017. Date of
publication July 18, 2017; date of current version April 10, 2018. This
Italy.
work was supported by the European Community’s Seventh Framework
Programme (FP7/2007-2013) under Grant 609081. (Corresponding author:
Luigi De Russis.) II. R ELATED W ORKS
D. Bonino is with the Pervasive Technologies Research Area, Istituto
Superiore Mario Boella, 10138 Turin, Italy (e-mail: dario.bonino@ismb.it). CEP and techniques for handling high-cardinality, high-
L. De Russis is with the Department of Control and Computer Engineering, frequency data streams typical of the Big Data domain have
Politecnico di Torino, 10129 Turin, Italy (e-mail: luigi.derussis@polito.it).
Digital Object Identifier 10.1109/JIOT.2017.2728089
been widely investigated in research. With the advent of Smart
1 According to Eurostat, http://ec.europa.eu/eurostat/documents/3217494/ Cities, these topics gained an increased momentum related to
5728777/KS-HA-11-001-EN.PDF, last visited on June 14, 2017. the inherent challenges brought by the city scenario, from
2327-4662 c 2017 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
776 IEEE INTERNET OF THINGS JOURNAL, VOL. 5, NO. 2, APRIL 2018
large-scale deployment to interoperability between stream case will be widely used in the remainder of this paper,
formats, etc. Ganz et al. [21] presented a survey of tech- especially for describing and contextualizing the proposed
niques and methods to process and transform raw sensor workflow for city officers. The realization of the Bad Smell
data into higher level abstractions, which are human and/or use case will be contextualized in a pilot of the ALMANAC
machine understandable with clear references to Internet of project (briefly described in Section IV). To realize the use
Things (IoT) and smart cities scenarios. Among the avail- case, no specialized code or external tool will be used. A sec-
able approaches and techniques, a rather evident trend emerges ondary purpose of the use case is to demonstrate the type of
which, on one side recognize that CEP languages are too com- processing chains that city operators may realize in a smart city
plex for nonexpert users that are required to define processing context. Although this and similar use cases can be built with
tasks, and on the other side considers semantic characteri- other methods (e.g., CEP languages), these include knowledge
zation and matching of events a viable solution to address on specific domains and other advanced skills that many city
smart city scenarios. Anicic et al. [22] defined two high- officers do not possess.
level languages for specifying event patterns named “ETALIS The Bad Smell use case arises from a real need of an
Language for Event” and “Event Processing SPARQL” which ALMANAC pilot: to know when waste bins, distributed in the
aim at bridging the gap between domain-expert knowledge and entire smart city, are full and need to be emptied. This infor-
CEP query technicalities. Their approach is similar to the one mation is useful to provide a more efficient and precise waste
proposed in this paper as it aims at defining more “effective” management service. Such an information is, furthermore, par-
and “easy-to-adopt” languages for CEP, with semantic-based ticularly important if we consider organic waste bins: they
definition of events. The proposed DFL moves, in fact, in the can generate a “Bad Smell” even if they are not totally full.
same direction and foresees the adoption of SPARQL-based Therefore, a city officer could express the following processing
identification of device tuples, in background, to speed-up the need: define a processing pipeline that generates alerts when
process of instantiating CEP pipelines (chains). In the work of organic waste bins in the entire city might generate unpleasant
Taylor and Leidinger [23] ontologies are used as a basis for the smell in the roads.
definition of contextualized complex events of interest which The city officer, obviously, needs to better formalize her
are translated to selections and temporal combinations of need in a series of conditions to be checked. For the purpose
streamed messages. Supported by description logic reasoning, of this paper, the city officers might define the rule to generate
the event descriptions defined by Taylor and Leidinger [23] are Bad Smell alerts if a given waste bin is nearly full (e.g., its
translated to the native language of a commercial CEP engine, fill level is greater than 80% of its capacity) and the outside
and executed under the control of the CEP. This approach temperature is higher than 15 ◦ C.
shares with the DFL the underlying idea of hiding the com-
plexity of CEP under a more suitable language, exploiting
IV. BACKGROUND
semantics for achieving stream format interoperability and
stream matching. However, it targets a different community Before diving in the details of the block-based approach and
of experts able to successfully understand, and master descrip- the proposed methodology and workflow, some background
tion logic specification of event processing patterns. The data information could be useful to better understand the previous
fusion language (DFL) exploited by the block-based approach, and related works employed in this paper. In particular, the
on the contrary, targets persons which are not skilled in CEP spChains framework, the DFL adopted by the ALMANAC
or Big Data analysis but in city administration and organi- project, and a reference ontology will be introduced.
zation. As such, its main goal is to tradeoff expressiveness
and flexibility of CEP languages with easier composition and A. ALMANAC Project
understandability by nonexperts. Stream matching in large The approach presented in this paper is contextualized
scale scenarios is a widely recognized issue, also shared by and exemplified within the pilot held in Turin, Italy, of the
the DFL. Hasan et al. [24] examined the requirement of ALMANAC project. ALMANAC is an EU-funded project
event semantic decoupling and discuss approximate seman- which aims at designing and developing a smart city plat-
tic event matching and the consequences it implies for event form [25] that integrates technologies and paradigms typical
processing systems. They, in particular define a semantic of the IoT with edge networks, by exploiting a cloud-based,
event matcher and evaluate the suitability of an approximate federated services approach. The project tackles the full stack
hybrid matcher based on both thesauri-based and distribu- of challenges involving smart city platforms, from low-level
tional semantics-based similarity and relatedness measures. sensor interfacing and data capture, to high-level support to
This approach might be considered for semantic stream match- city processes and policies.
ing required by the DFL for wild-card instantiation of chains
involving multiple devices.
B. SpChains
SpChains [26] is a block-based stream processing frame-
III. BAD S MELL U SE C ASE work, which represents monitoring (and alerting) tasks as
To demonstrate the functionality and test the feasibility reusable and modular “processing chains” built atop of a set of
of the block-based and visual approach for data processing 14 standard, and extensible, stream processing blocks (Fig. 1
pipelines, we present a use case named Bad Smell. This use reports a sample “smell-detection” chain).
BONINO AND DE RUSSIS: CEP FOR CITY OFFICERS: FILTER AND PIPE VISUAL APPROACH 777
Fig. 5. Wild-card template binding syntax example, only the “bindings” sec-
tion is affected. The “_genid” subfix identifies runtime-generated identifiers.
Source and stream types are referred to the ALMANAC smart city ontology.
TABLE I
N ODE RED C USTOM N ODES I MPLEMENTING
THE DFL P RIMITIVE B LOCKS
Fig. 10. Bad Smell chain test with real data from the ALMANAC Turin pilot.
approach is linear and easy to adopt for smart city platform [19] J. Maloney, M. Resnick, N. Rusk, B. Silverman, and E. Eastmond, “The
like ALMANAC. scratch programming language and environment,” ACM Trans. Comput.
Educ., vol. 10, no. 4, pp. 1–15, Nov. 2010.
[20] F. Buschmann, R. Meunier, H. Rohnert, P. Sommerlad, and M. Stal,
R EFERENCES Pattern-Oriented Software Architecture, vol. 1. Hoboken, NJ, USA:
Wiley, 1996.
[1] “State of world population 2007, unleashing the potential of [21] F. Ganz, D. Puschmann, P. Barnaghi, and F. Carrez, “A practical eval-
urban growth,” United Nat. Population Fund, New York, NY, uation of information processing and abstraction techniques for the
USA, Pub. no. 120478, Tech. Rep., 2007. [Online]. Available: Internet of Things,” IEEE Internet Things J., vol. 2, no. 4, pp. 340–354,
http://www.unfpa.org/public/ publications/pid/408 Aug. 2015.
[2] “Cities infrastructure—A report on sustainability,” KPMG Int., Tech. [22] D. Anicic, S. Rudolph, P. Fodor, and N. Stojanovic, “Stream reasoning
Rep., Zürich, Switzerland, Apr. 2012. and complex event processing in ETALIS,” Semantic Web, vol. 3, no. 4,
[3] R. Petrolo, V. Loscrì, and N. Mitton, “Towards a smart city based on pp. 397–407, 2012.
cloud of things, a survey on the smart city vision and paradigms,” Trans. [23] K. Taylor and L. Leidinger, “Ontology-driven complex event process-
Emerg. Telecommun. Technol., vol. 28, no. 1, 2015, Art. no. e2931. ing in heterogeneous sensor networks,” in Proc. 8th Extended Semantic
[4] D. Doran, S. Gokhale, and A. Dagnino, “Human sensing for Web Conf. Semantic Web Res. Appl. (ESWC), Heraklion, Greece, 2011,
smart cities,” in Proc. IEEE/ACM Int. Conf. Adv. Soc. Netw. pp. 285–299.
Anal. Min. (ASONAM), Niagara Falls, ON, Canada, Aug. 2013, [24] S. Hasan, S. O’Riain, and E. Curry, “Approximate semantic matching
pp. 1323–1330. of heterogeneous events,” in Proc. 6th ACM Int. Conf. Distrib. Event
[5] A. Medvedev, P. Fedchenkov, A. Zaslavsky, T. Anagnostopoulos, and Based Syst. (DEBS), Berlin, Germany, 2012, pp. 252–263.
S. Khoruzhnikov, “Waste management as an IoT-enabled service in [25] D. Bonino et al., “Block-based realtime big-data processing for smart
smart cities,” in Proc. 15th Int. Conf. Internet Things Smart Spaces cities,” in Proc. IEEE Int. Smart Cities Conf. (ISC2), Trento, Italy,
Next Gener. Netw. Syst. (NEW2AN) 8th Conf. ruSMART, St. Petersburg, Sep. 2016, pp. 1–6.
Russia, Aug. 2015, pp. 104–115. [26] D. Bonino and F. Corno, “spChains: A declarative framework
[6] I. Vilajosana et al., “Bootstrapping smart cities through a self-sustainable for data stream processing in pervasive applications,” Proc.
model based on big data flows,” IEEE Commun. Mag., vol. 51, no. 6, Comput. Sci., vol. 10, pp. 316–323, 2012. [Online]. Available:
pp. 128–134, Jun. 2013. http://www.sciencedirect.com/science/journal/18770509/10
[7] D. Bartlett, W. Harthoorn, J. Hogan, M. Kehoe, and R. J. Schloss, [27] D. Bonino et al., “ALMANAC: Internet of Things for smart cities,” in
“Enabling integrated city operations,” IBM J. Res. Develop., vol. 55, Proc. 3rd Int. Conf. Future Internet Things Cloud (FiCloud), Rome,
no. 1.2, pp. 1–10, Jan. 2011. Italy, Aug. 2015, pp. 309–316.
[8] A. Ojo, Z. Dzhusupova, and E. Curry, Exploring the Nature of the Smart
Cities Research Landscape (Public Admin. Inform. Technol.), vol. 11.
Cham, Switzerland: Springer, 2016, doi: 10.1007/978-3-319-17620-8_2.
[9] M. Batty et al., “Smart cities of the future,” UCL Centre Adv. Spatial
Anal., London, U.K., Tech. Rep. 188, Oct. 2012.
[10] “Smart cities. Smart technologies and infrastructure for energy, water, Dario Bonino received the master’s degree in
mobility, buildings, and government: Global market analysis and rore- electronics and Ph.D. degree in computer engineer-
casts,” Navigant Res., Boulder, CO, USA, Tech. Rep., p. 109, 2016. ing from the Politecnico di Torino, Turin, Italy, in
[11] A. Zanella, N. Bui, A. Castellani, L. Vangelista, and M. Zorzi, “Internet 2002 and 2006, respectively.
of Things for smart cities,” IEEE Internet Things J., vol. 1, no. 1, From 2006 to 2014, he was a Post-Doctoral
pp. 22–32, Feb. 2014. Researcher with the Politecnico di Torino. He pur-
[12] S. K. Datta and C. Bonnet, “Internet of Things and M2M communica- sued research and development on Semantic Web,
tions as enablers of smart city initiatives,” in Proc. 9th Int. Conf. Next complex event processing applied to home and
Gener. Mobile Appl. Services Technol., Cambridge, U.K., Sep. 2015, industrial automation systems, and on state chart
pp. 393–398. modeling and simulation of smart environments.
[13] A. Cenedese, A. Zanella, L. Vangelista, and M. Zorzi, “Padova smart Since 2014, he has been a Researcher with the
city: An urban Internet of Things experimentation,” in Proc. IEEE Pervasive Technologies Research Area, Istituto Superiore Mario Boella, Turin.
15th Int. Symp. World Wireless Mobile Multimedia Netw. (WoWMoM),
Sydney, NSW, Australia, Jun. 2014, pp. 1–6.
[14] M. D’Aquin, J. Davies, and E. Motta, “Smart cities’ data: Challenges
and opportunities for semantic technologies,” IEEE Internet Comput.,
vol. 19, no. 6, pp. 66–70, Nov./Dec. 2015. Luigi De Russis received the master’s degree in
[15] D. C. Luckham, The Power of Events: An Introduction to Complex computer engineering and Ph.D. degree in com-
Event Processing in Distributed Enterprise Systems. Boston, MA, USA: puter and control engineering from the Politecnico
Addison-Wesley, 2001. di Torino, Turin, Italy, in 2010 and 2014, respec-
[16] O. Etzion and P. Niblett, Event Processing in Action. Saintmpford, CT, tively.
USA: Manning, 2010. He is currently a Post-Doctoral Fellow with the
[17] B. Cheng, S. Longo, F. Cirillo, M. Bauer, and E. Kovacs, “Building a big e-Lite Research Group, Department of Control and
data platform for smart cities: Experience and lessons from Santander,” Computer Engineering, Politecnico di Torino. His
in Proc. IEEE Int. Congr. Big Data, New York, NY, USA, Jun. 2015, current research interest includes human computer
pp. 592–599. interaction with a particular interest on interaction
[18] Z. Khan, A. Anjum, and S. L. Kiani, “Cloud based big data analytics techniques applied to complex settings like Internet
for smart future cities,” in Proc. IEEE/ACM 6th Int. Conf. Utility Cloud of Things and smart environments.
Comput. (UCC), Dresden, Germany, Dec. 2013, pp. 381–386. Dr. De Russis is a member of the ACM.