IoTivity Services, which are built on the IoTivity base code, provide a common set of functionalities to application development. IoTivity Services are designed to provide easy and scalable access to applications and resources and are fully managed by themselves. There are six IoTivity Services in v1.0, each with its own unique functionality: Resource Encapsulation, Resource Container, Things Manager, Resource Hosting, Resource Directory and MultiPHY EasySetup.
If you want to know the necessary development environment and setup information to work with each of the services, see IoTivity Services: Programmer's Guide for Primitive Services PDF.
Each services are introduced in separated chapters including the explanations about running sample applications.
Resource Encapsulation abstracts common resource function modules. It provides functionalities for both the client and server side functions to IoTivity Service developers. For client side, it provides resource “Cache” and “Presence Monitoring” functions. On the other hands, for the server side, it provides the simple, direct way to create the resource and to set the properties, attributes of resources. Additionally, for handling the request from the client, it provides flexible method to developer either auto-control of request by itself or control in the application.
Resource Container provides a way to integrate non-OIC resources into OIC ecosystem by creating, registering, loading and unloading resource bundles. It also provides common resource templates and configuration mechanism for resource bundles. It deals with OIC specific communication features, and provides common functionalities in a generic way.
Scene Manager creates Groups, finds appropriate member things in the network, manages member presence, and makes group action easy. It benefits 3rd party application developers in three ways:
The goal of Resource Hosting is to off-load the request handling works from the resource server where original resource is located to reduce the power consumption of resource constrained devices.
Resource Hosting has three functional blocks over the Resource Encapsulation Layer. Resource Virtualization creates and registers the mirrored resources which reflects the status of the origin resource server. The resources between origin server and mirrored resource are synchronized via Resource Synchronization block and remote requests from resource clients are handled by the Remote Request Handler.
Resource directory comprises of three entities : thin-client, resource directory and query client.
A resource directory is a server that acts on behalf of the thin-client. The thin-client after it publishes their resources, resource-directory will respond on behalf of these devices. The device acting as a resource directory could itself hold resources. The operation resource directory provides are:
A thin-client is an OIC server which is a power constrained, resource constrained and has the limited resources. A thin-client will use resource directory service to publish its resource to be discoverable in the user network. Once resources are published at the resource directory, thin-client will stop participating in responding to the discovery queries (multicast communication will be stopped). It will only respond to direct unicast packets to access the resources. This device after it publishes its resource will be a resource directory client.
A querying client is an OIC client device which is looking for a resource. It will make a query at /oic/res by sending a multicast packet to discover a resource. Resource directory will respond on behalf of the thin-client. The response structure is based on the OIC /oic/res response. It will include an extra field in the tags field which is a baseURI. The baseURI indicates the IP address of the thin-client.
MultiPHY Easysetup is an IoTivity primitive service to enable different sensor devices(with different connectivity support) to be easily connected to the end user's IoTivity network seamlessly. Thus enabling Sensor devices to be part of the IoTivity network in a user friendly manner.
Using MultiPHY Easy Setup functionalities and its offering SDK APIs, developers can easily make different sensor devices supporting different connectivity technologies, for example, SoftAP to connect to the Smart Device (OnBoarding step) after UnBoxing. Post unboxing and onboarding steps, sensor will be provided with the WiFi provisioning information (Provisioning step) to enable sensor devices running on different transport to easily connect to the home IP network.