3) Middleware Layer: The devices over the IoT implement different type of services. Each device connects and communicates with only those other devices which implement the same service type. This layer is responsible for the service management and has link to the database. It receives the information from Network layer and store in the database. It performs information processing and ubiquitous computation and takes automatic decision based on the results.