# Towards Marketing 4.0: Vision and Survey on the Role of IoT and Data Science
## 5 Blueprint Architecture
These data sources could produce data from first-person devices such as wearable devices and smartphones or third-person devices such as video cameras, interactive display screens, and voice shopping assistants (such as Amazon's Alexa). The produced data could be acquired via sensors (such as GPS, proximity, accelerometer, camera, microphones, etc. ), user input (such as mobile application, interactive displays, smart cards, QR/barcode readers, intelligent carts, etc. ), or third party data collectors (such as marketing databases, online reviews, product ratings, collaborated recommendations, etc.). The data sources can produce a wide variety of numerical, categorical, or multimedia data that contain a large number of datapoints about customers' personal, behavioural, interaction, and mobility data. However, customers must be explicitly and formally  
Figure 3: A blueprint layered architecture for IoT advertising applications. educated about the data collection and data handling policies to abstain from legal and ethical complications and enable a trustworthy interactive user experience [57]. * **Data communication layer**: Considering the heterogeneity of IoT devices and communication protocols, various communication technologies with varying frequency ranges could be enabled at the data communication layer. For low-frequency and short communications, the near field communication (NFC), Bluetooth low energy (BLE), low-power WiFi, and ZigBee technologies could be used. However, for long-range and high-frequency communication requiring high data throughput, the narrow band IoT technology coupled with cellular network technologies such as 4G/5G/5G NR could be used. However, the application designer needs to select from among various types of device-to-Device (D2D) and ad hoc communication protocols, such as the constrained application protocol (CoAP), message queue telemetry transport (MQTT), advanced message queue protocol (AMQP), and extensible messaging and presence protocol (XMPP), to name a few. * **Data storage, management, and processing layer**: The advertising applications need to maintain various states of the data for efficient data handling. Like other business applications, the advertising applications need to manage the data at rest, where the data are stored in centralised cloud servers for lateral data processing. This type of data normally uses traditional batch data stores such as relational database management systems (RDBMS) or key-value stores (KV-stores), and the data are iteratively processed using batch data processing techniques such as SQL queries or map-reduce algorithms. However, considering the information freshness and privacy compliance (i.e., the need to forget the customer data) requirements, the advertising applications can adopt the data at transit schemes, where the datapoints remain valid for a limited time and iterative batch data processing schemes are applied to uncover the maximum amount of useful patterns from customer data. Finally, a few application components can use data at processing strategies, where the customer data are completely managed and processed using in-memory databases and in-memory data stream processing architectures. These strategies help to efficiently manage the streaming data by enabling early data duplication and the maintenance of on-the-fly privacy-sensitive information, e.g., information capturing the time and locations of customers to uncover in-store movement patterns or tracking the customers' product browsing activities to find the correlated products and offer better on-the-fly promotions. * **Recommendation generation layer**: IoT-enabled business applications can explicitly collect contextual information by enabling customer interactions with in-store IoT devices. This explicit data collection helps to determine the right situations to recommend highly relevant products on-the-go.