## 2 Related Works  
### In-Vehicle Internet of Things (IoT) Gateway  
The CAN communication, which is the standard for most vehicles today, cannot process a large number of sensor data in real time [4]. Therefore, recent research has deployed FlexRay [5], which is a high speed protocol, or MOST [6], which is a high speed optical communication network of multimedia devices, to solve the sensor data problem. Figure 1a shows how these protocols are used with the CAN protocol. Other research improves upon the CAN protocol. Figure 1b shows that the Gateway uses the improved CAN protocol. For example, a fast gateway [7] using FlexRay and CAN was proposed using FlexRay and CAN. A CAN controller and a FlexRay controller are designed with software (SW) and hardware (HW), respectively. The study did not consider the MOST protocol, but it reduced the run time by up to 94.7%. A FlexRay-MOST gateway [8] using static segments and control messages was designed. The proposed gateway system is designed with Verilog hardware description language (HDL) and implemented using system-on-a-chip (SoC) kits. A reliable gateway [9] for communication between the local interconnect network (LIN), CAN, FlexRay protocols is presented. The main function of this gateway is translation. It proposes a reliable gateway based on OSEK OS and OSEK NM for In-Vehicle Networks (IVNs). However, this gateway does not include the fault-tolerant mechanism. It will improve the reliability and safety of the gateway by adding the fault-tolerant mechanism that is called OSEK FTCOM. A gateway framework for IVNs is proposed based on CAN, FlexRay, and Ethernet [10]. The gateway framework provides state-of-the-art functionalities that include parallel reprogramming, diagnostic routing, Network Management (NM), dynamic routing update, multiple routing configuration, and security. Ethernet can provide the required bandwidth, and it has several advantages for use in IVNs, including low cost, high bandwidth, and mature technology. Combined with the idea of mobile cloud services, a new network architecture and data transmission method is proposed [11]. The proposed method can obtain a shorter transmission delay and ensure a higher transmission success rate. The timing impact introduced by various CAN/Ethernet multiplexing strategies at the gateways is determined [12]. They present a formal analysis method to derive upper bounds on end-to-end latencies for complex multiplexing strategies, which is the key for the design of safety-critical real-time systems. A FlexRay-CAN gateway using a node-mapping method to overcome the message-mapping-based FlexRay-CAN gateway for a vehicle is presented [13]. A synchronization mechanism for FlexRay and Ethernet Audio Video Bridging (AVB) network that guarantees a high quality-of-service is proposed [14]. The synchronization mechanism provides timing guarantees for the FlexRay network that is similar to those of the Ethernet AVB network. [PERSON] proposes a novel gateway discovery algorithm for communication between VANETs and 3G, providing an efficient and adaptive Location-Aided and Prompt Gateway Discovery (LAPGD) mechanism [15]. Aljeri proposes a reliable QoS-aware and location aided gateway discovery protocol for vehicular networks by the name of fault tolerant location-based gateway advertisement and discovery. Their proposed protocol succeeded in balancing the load between gateways with the presence of gateway and road component failures [16]. A reliable gateway for in-vehicle networks is described. Such networks include local interconnect networks, controller area networks, and FlexRay. It is proposed a reliable gateway based on the OSEK/VDX components for in-vehicle networks [17]. The various actual arriving orders of gateway messages are examined in detail and then an explorative Worst-Case Response Time (WCRT) computation method is proposed. It is proved that the obtained WCRT results are safe WCRT bounds. The method proposed by this paper reduced WCRT by 24% [4].