VOL 4 . NO 1 e-ISSN : 2549-9904 ISSN : 2549-9610 INTERNATIONAL JOURNAL ON INFORMATICS VISUALIZATION Design a Blockchain-Based Middleware Layer in The Internet of Things Architecture Tanweer Alam # # Department of Computer Science. Islamic University of Madinah. Madinah. Saudi Arabia E-mail: tanweer03@iu. AbstractAi In next-generation computing, the role of cloud, internet and smart devices will be capacious. Nowadays we all are familiar with the word smart. This word is used a number of times in our daily life. The Internet of Things (IoT) will produce remarkable different kinds of information from different resources. It can store big data in the cloud. The fog computing acts as an interface between cloud and IoT. The extension of fog in this framework works on physical things under IoT. The IoT devices are called fog nodes, they can have accessed anywhere within the range of the network. The blockchain is a novel approach to record the transactions in a sequence securely. Developing a new blockchains based middleware framework in the architecture of the Internet of Things is one of the critical issues of wireless networking where resolving such an issue would result in constant growth in the use and popularity of IoT. The proposed research creates a framework for providing the middleware framework in the internet of smart devices network for the internet of things using blockchains technology. Our main contribution links a new study that integrates blockchains to the Internet of things and provides communication security to the internet of smart devices. KeywordsAi Internet of Things. Wireless Communication. Middleware. Blockchain Technology. Fog Computing, cloud computing. facilitates users to interact each other without using wires. The Internet of Things is based on wireless networking at all. In the beginning of Internet. It was developed to communicate one device to another device using accessing the browsers . However, in the current era, high speed smart efficient devices with many advance technologies like low power consumption etc. available to communicate with each other. The extension of fog in this framework works on physical things under IoT . The IoT devices are called fog nodes, they can have accessed anywhere within the range of This study will useful in IoT framework. However, analytic framework is studied in literature review, the authors havenAot explained the full framework in this research. This research adds the enhanced blockchain and fog to develop efficient IoT framework for communication among smart devices . The comparison of this research with past investigations retransmission limits, affirmation, bundle length variety and worsen dissemination of packets generation are represented. The algorithm has been experimentally implemented. The proposed framework predicts well our comprehensive experiments. Further, validate the mathematical results. The objective of this research is to create the new model for the communication among internet of things and fog This research is based on blockchain technology with Middleware. Fog and IoT. The framework can provide QoS through reducing the traffic rate vacillation also the INTRODUCTION The proposed research entitled AuDesign a blockchain based middleware layer in Internet of Things (IoT)Ay is a step forward in wireless networking and IoT where we propose a new middleware framework based on blockchain technology. The Wireless communication is the key of Internet of things. It is expected to exceed 50 billion connected devices by 2020 and most of these nodes cannot be connected by wireline . In order to enable critical applications such as smart factories or smart buildings, the networking protocols have to deal with the non-deterministic nature of wireless The proposed research work in this project is an enhancement and implementation of middleware framework based on blockchain technology in the architecture of internet of things. The research outcome is to establish a new IoT framework. The proposed research uses the correct and efficient simulation of a desired study and can be implemented in a framework of Internet of Things. In the future, researchers can enhance this research and implement in the internet of everything framework . Developing a new blockchains based middleware framework in the architecture of Internet of Things can be a valuable framework to improve the performance of IoT framework in heterogenous environment. The wireless communication is the fastest growing research area that variety of the quantity of smart devices. In this research we consider idle state in order to makes our examination more efficient, at that point the general execution regarding the overall performance of the framework is evaluated. The IoTFog in this framework will monitor and analyse the real-time data collected from fog nodes and then taking the action. The following are the key points1. The research is primarily focused on IoT. It enables smart devices to communicate with another devices among internet of smart devices using blockchain The proposed framework for communication will access across the internet of smart devices. The results of proposed research will be compared with previous study in the same area. tremendous result. For example, it would result more than 139,000,000 matches in Google. In May 2014. Lihong Jiang et al published an article entitled AuAn IoT-Oriented Data Storage Framework in Cloud Computing PlatformAy, they focused on data storage framework that is not only enabling efficient storing of massive IoT data, but also integrating both structured and unstructured data. In this article, introduced the IoT ecosystem and key technologies to support IoT communications . In 2016. Maria Rita Palattella et al published an article entitled AuInternet of Things in the 5G Era: Enablers. Architecture and Business ModelsAy, in this article they presented 5G technologies for the IoT, by considering both the technological and standardization aspects . In 2018. Pradip Kumar Sharma. Mu-Yen Chen and Jong Hyuk Par published an article entitled. AuA Software Defined Fog Node Based Distributed Blockchain Cloud Architecture for IoTAy. They presented software defined node using blockchain cloud for IoT . II. LITERATURE SURVEY In 1991. Theodore S. Rappaport published an article entitles AuThe wireless revolutionAy, in this paper he presented the wireless communications is the emerging technology as a key for communication among human as well as devices . In 1994. Andy Harter and Andy Hopper published the article entitled AuA Distributed Location system for the active officeAy, in this paper, they presented infrared sensor arrangements using badges for communication among devices and workstations. In 1994. Tristan R Ichardson. FrazerbeNnett. Glenford Mapp. And Andy Hopper presented an article on AuA ubiquitous, personalized computing environment for all Telephony in an X Window System EnvironmentAy, in this article they presented X windows systems. X protocol for securing the communication between client and server. In the article, authors represented AuSystem Software for Ubiquitous ComputingAy for integration of different kinds of network, also create connection among the devices in different types of network . In 2002 researchers published an article entitled AuConnecting the Physical World with Pervasive NetworksAy, in this article they address the challenges and opportunities of instrumenting the physical world with pervasive networks of sensor-rich, embedded computation. The cloud computing came as a consequences of continues development of computing paradigms. The emergence of these technologies has established the appearance of (SaaS) software as a service which states that consumers are not required to purchase the software rather than baying according to their own demand . In the med of 2006. Amazon achieved a prominent milestone by testing elastic computing cloud (EC . which initialized the spark of cloud computing in it. However, the term cloud computing has not coned until March 2007. The following year brought even more rapid development of the newly emerged paradigm. Furthermore, the cloud computing infrastructure services have widened to include (SaaS) software as a service. In the mid of 2012, oracle cloud has been introduced, where it supports different deployment models. It is provisioned as the first unified collection of it solutions which is under continues developments. Nowadays, typing a cloud computing in any search engine will result in a i. CLOUD. FOG AND EMBEDDED DEVICES The smart devices are increasing exponentially day by day in the whole world. They provide much more facility to the end users . and also attach with their daily life. Smart devices can connect to the internet easily for sending and receiving data within the network. The smart devices are not just smart phones, it may be smart refrigerator. Smart home automation entry point, smart air conditioners. Smart hubs. Smart thermostat . Color changing smart LEDs. Smart Watches and smart Tablets etc. in internet of things framework they are connected to each other through internet . , . TABLE 1 IOT DEVICES INSTALLED CATEGORY AND YEAR WISE (IN MILLIONS) Category IoT Devices Business: Across Industries Business: Vertical Total The proposed research plan builds research on extending the communication in internet of things using fog and blockchain technology. The transfer data from one configuration to another using wireless networks starts from 1973 in the form of packets radio network . They were able to communicate with another same configuration Recent work is continuing on a project called the Serval Project . It provides networks facility to android devices for communication in infrastructure less network. Whereas our research is concerned about the communication in internet of things . The main contribution of this research is the creation of the communication framework and provides reliable and fast communication using fog and blockchain among the internet of smart devices. The previous studies have been focused on the creation and optimization the framework for communication, but such research doesnAot perform the full framework for IoT-Fog communication among internet of smart devices. the keys from key server, fetch the data from cloud. The figure 2 presents the components of the proposed framework. Fig. 2 Components of the framework Fig. 1 Cloud. Fog and embedded devices The following steps are used in the proposed framework. The smart contracts published by the modality servers, proxies and owners of fog in the authorized blockchains database. The smart device of IoT finds the smart contacts from the authorized blockchains database. The authorized blockchains database generates the token for the smart device of IoT. The smart device requests the keys from key server in middleware and send the token with request. The key server in middleware verify the token from authorized blockchain database and generates key for the smart device and response back to the smart Now the smart device of IoT is authorized to access the data from the cloud. IV. RESEARCH METHODOLOGY The main contribution of this research is designing a framework for communication in Internet of things using fog and blockchain technology . The proposed framework is specifically appropriate for applications in which data is periodically transmitted in internet of smart devices In these applications, on one hand, packets are being produced based on a certain periodic time pattern. the other hand, service time is always a random variable with general distribution. Therefore, service time might temporarily exceed the period time which, as an inevitable consequence some packets might encounter a busy channel and be dropped . , . , . We solve this problem by proposing the new middleware framework. We demonstrate that proposed IoT-Fog framework, not only increases the throughput, but also the direct connection between the generation . and communication packet systems are eliminated which make the system far more stable. Moreover, in order to enhance the proposed model, we have employed retransmission scheme, variable packet length, and saturated traffic condition. The solution of this research is summarized as follows. The implementation of IoT-Fog framework for communication among internet of smart devices in 5G will be programmed to execute on to the internet of things. The idea will implement into three-layer model, these layers are Fog. Blockchain and IoT. The proposed study supports the wireless networking technology to establish an IoT-Fog framework among internet of things devices . , . , . REFERENCES