## 3 Proposed Methodology of Registration and Discovery  
The proposed network architecture is comprised of IoT devices, WSPs, RD server, publishing client and IoT clients. For the registration process, the IoT devices and publishing client send the RAML data to the RD server. Then, the information of IoT devices and WSPs can be discovered by IoT clients through the RD server. Using the discovered information, the IoT clients can access the services which are provided by the servers in the constrained network and the Internet. Figure 2 shows the proposed architecture of a consistent registration and discovery scheme. Each component represents the role of the entity in the proposed system. In the RD server, the RAML definitions are saved in the storage of the server. The data of RAML is published by devices and the publishing client. The information of saved RAML definitions can be retrieved by IoT clients. The RD server is comprised of resources and storage which provide a registration service and discovery service to the IoT client and service providers in the OCF network and Internet. The functions of the component write and read the service provider information from the service information storage. The registration service is a function that is used by devices and publishing client to publish service provider information. The discovery service is a function that is used by clients for obtaining the service provider information. The system includes the IoT client and publishing client for accessing the RD server. The IoT client is used for requesting to the RD server for discovering the registered information, and the publishing client is used for publishing the information of the HTTP service provider to register the provider's information that is deployed on the Internet. The discovery is a function that is a part of the client. Users can, through the discovery service, find the service provider information by requesting the RD server. The publishing client supports the publishing function. The HTTP service provider can be the application that is run by other organizations or companies. Therefore, we do not have permission to add some functions to their application such as a publishing function. The publishing client reads the profile of the service provider and sends it to the RD server for registration. In the service providers, the applications can be used for providing services to clients, e.g., sensing services, actuating services, and web services from the Internet. The OCF service provider is used for providing sensing and actuating services that are hosted on IoT devices to support IoT services. The HTTP service provider is used for providing web services such as weather services, social network system (SNS) services, stock market services, etc. For providing services to multiple clients, the RD server includes the handlers, which handle the requests from the client. In the proposed OCF network, the RD server supports the storage and retrieval functions for the information of IoT devices and WSPs. The server includes the OCF server functionality to provide OCF services using OCF resources. Figure 3 shows the functional architecture of the RD server. The server has the RD resource and RD list resource. The resource name of RD resource is/rd which has a GET handler and POST handler, and the resource name of the RD list resource is/rd/list which has a GET handler. Through these handlers, the OCF server handlers OCF requests. The handlers interact with the DB in the RD server which involves the information of the provider, resource, method, and parameter. In the RD resource, the GET handler is used for handling the discovering request from the IoT client. The response message includes the detailed information of a provider. The POST handler is used for handling the registration request from the publishing client and IoT device. The registration request includes the information of IoT device and WSP. Once the server received the registration request, the server parses the request message and stores to the DB.