CDIF: A JSON-based SOA software framework

Source: Internet
Author: User
Tags soap wsdl

The Universal Device Interconnect Framework (CDIF) is a Web-based connectivity framework, and some open source implementations are currently housed in the Github-out4b/cdif:common device Interconnect framework. CDIF is a JSON-based SOA software framework. CDIF provides the client app with the same abstraction capabilities as the XML-based WSDL language and the SOAP protocol, but a much simpler JSON-based implementation that is also well-suited for the API interface that describes the MicroServices architecture. CDIF provides complete service registration and discovery capabilities, and creates a concise, unified JSON model for all Web services and IoT devices, including rest, soap-type services, and IoT devices of various protocols, on the basis of which is provided on its rest interface, The unified RPC calling interface based on JSON text facilitates the development of API calling code based on this unified model for various front-end applications.

The overall architecture of the CDIF is as follows:

650) this.width=650; "Width=" 556 "height=" 282 "src=" https://static.oschina.net/uploads/space/2017/0331/232610_uYAn _3400779.png "/>

CDIF Overall architecture

Through the device abstraction layer provided by the framework, CDIF provides various types of rest or soap APIs from different vendors, or IoT devices into a variety of virtual devices, providing a unified virtual device Access rest interface for client use.

The CDIF framework code is written in node. js, so the underlying virtual device drivers are all managed using node. JS's NPM package. Each device driver can contain one or more virtual devices that are escalated to the CDIF framework when the driver is loaded. The internal implementations of virtual devices and their APIs managed by CDIF are encapsulated in the drive through the device abstraction layer, which can be implemented using any of the best third-party packages in the rich ecosystem of node. js, such as request, crypto, moment, etc. So it's very easy to develop and manage. With the help of peripheral development tools, the API managed by CDIF can have automatic document generation, automatic testing tools and other capabilities. The following are the specifications defined by the Cdif API for rest or soap APIs on the long-range technology API market, as well as API documentation and test pages that are automatically generated by the JSON schema form technology for various rest or soap APIs. At the same time, when the parameters of the API change, such as the new parameter fields, the documentation and testing tools for these APIs will be updated automatically.

650) this.width=650; "title=" CDIF: JSON-based SOA software framework 2.jpg "src=" https://s1.51cto.com/wyfs02/M00/8F/89/ Wkiol1jkiyqreuvpaajy7brhjgs598.jpg "alt=" Wkiol1jkiyqreuvpaajy7brhjgs598.jpg "/>

Automatic API Document Generation

650) this.width=650; "title=" CDIF: JSON-based SOA software framework 3.jpg "src=" https://s4.51cto.com/wyfs02/M01/8F/89/ Wkiol1jkidwiisrkaai915hxjle480.jpg "alt=" Wkiol1jkidwiisrkaai915hxjle480.jpg "/>

Automated API test Page generation

The unified model CDIF created for the cloud service API is inspired by UPnP. In addition to the API interfaces that support various cloud services, CDIF also has a unified model for all IoT devices, and it is easy to help clients create a variety of applications where IoT devices and network services are linked.

Due to its concise abstraction ability, based on strict contract loosely coupled architecture, state-independent and interchangeable service definition, the SOA technology system built on WSDL and soap is still widely used to include banks, exchanges, airlines, telecommunications, hospitals, e-commerce, Payment platform and other industries in large and medium-sized enterprises. According to Mulesoft estimates, the world spends more than $500 billion a year on enterprise IT infrastructure and system integration related to SOA technology. But because XML formats are too complex for data exchange, many of the best WS-* standards based on XML are gradually declining.

With the development of the mobile era, a variety of Web services and MicroServices architectures built on rest and JSON are becoming mainstream. JavaScript-based applications, such as various web apps, are based on rest and JSON as a connection. Emerging IT companies are also more inclined to use rest APIs rather than soap to connect the various underlying business components within the enterprise. However, due to the lack of effective schema constraints and management capabilities, the current internal and external use of a variety of rest API needs to rely on manual management of documents, data can only be described as "example", the lack of rigorous specifications also brings a lot of inconvenience to API integration. At the same time, deploying and upgrading the new API version is also inconvenient when the API interface needs to change. Cdif's common model for rest APIs helps fill the gap between the rest API and traditional SOA technologies, and provides a new direction for the integration and development of traditional SOA technologies and cloud services. CDIF-based SOA technology makes it easy to create new types of applications, such as rest service flow applications, seamless integration of Web services and IoT devices, and so on, which are not easily achievable by existing technologies.

Unlike API modelling language such as WSDL or swagger, the advantages of JSON schema form and server-side rendering are The client app that uses the JSON model and RPC interface provided by CDIF can provide a fully automated integration capability for client apps. In this case, the Cdif managed Rest API does not require offline client code generation and manual integration, and the API interfaces managed by CDIF can be dynamically reflected in the client UI for user use, eliminating the need for the client to rest API integration and API interface changes bring tedious manual client upgrade work. The rest API, managed by CDIF, can automatically display new additions or changes in the app UI for user consumption, simplifying the work of the app developer, while simultaneously promoting the new business capabilities that the vendor adds to the API.

If the client app does not want to use these advanced features, the rest interface provided by CDIF can be backwards compatible with the currently popular manual integration approach. User reference cdif The common model created for various cloud service APIs makes it easy to develop API calling code based on the model.

Due to the complete transparency of the access addresses and methods of the API, CDIF can also help the enterprise solve the problem of change management of REST API. CDIF internal to the API driver package JS code using dynamic loading technology, can support the eager exchange of driver code, the driver of the API access code changes, only need to install a new driver package on the CDIF framework, the change can take effect immediately. You can also do this without interrupting an older version of the API call that is executing on the line. These features can help organizations more easily manage their own API interfaces.

Further, CDIF also provides a flexible data cache and unique bidirectional data channel capabilities for the vendor's cloud service API interface, and the vendor only needs to tweak its API to provide the value of several fields on the unified JSON model provided by the CDIF framework to open these capabilities, API data cache time from 1 milliseconds to 10 can be specified by the API developer according to the actual situation, and adjust at any time. After the two-way data channel capability is turned on, the various data updates on the vendor cloud service can be obtained in real-time through the WEBSOCKET,APN channels such as CDIF, without the need for the user to proactively initiate API calls to update the data, resulting in additional API call overhead. These unique features provide a more powerful capability for all of the current one-way cloud service data channels based on API calls.


This article is from the "Apemesh" blog, make sure to keep this source http://12786355.blog.51cto.com/12776355/1913039

CDIF: A JSON-based SOA software framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.