You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the emergence of the Web 2.0, asynchronous-based web technologies are becoming mainstream mainly thanks to their ability to provide richer, faster and more interactive web experiences. For a long time, these applications have been using XML as interchange format, however, in the last years the JavaScript Object Notation (<ahref="http://json.org/>">JSON</a>) has been gaining in popularity since it provides a lightweigth data exchange format with a significant performance improvement.
21
+
With the emergence of the Web 2.0, asynchronous-based web technologies are becoming mainstream mainly thanks to their ability to provide richer, faster and more interactive web experiences. For a long time, these applications have been using XML as interchange format, however, in the last years the JavaScript Object Notation (<ahref="http://json.org/>">JSON</a>) has been gaining in popularity since it provides a lightweigth data exchange format with a significant performance improvement.
22
22
</p>
23
23
<p>
24
-
JSON consists in sets of objects described by name/value pairs. It is <strong>schemaless</strong>, i.e., there is no a structural definition of JSON objects, instead it is implicit. Schemaless data is particularly <ahref="http://martinfowler.com/articles/schemaless">interesting in cases dealing with non-uniform data or in schema migration</a>, however, it can become a burden in data integration scenarios (e.g., consuming JSONbased APIs) where it becomes necessary to discover at least partially the underlying structure in order to properly process the data.
24
+
JSON consists in sets of Object described by name/value pairs. It is <strong>schemaless</strong>, i.e., there is no a structural definition of JSON objects, instead it is implicit. Schemaless data is particularly <ahref="http://martinfowler.com/articles/schemaless">interesting in cases dealing with non-uniform data or in schema migration</a>, however, it can become a burden in data integration scenarios (e.g., consuming JSONbased APIs) where it becomes necessary to discover at least partially the underlying structure in order to properly process the data.
25
25
</p>
26
26
<p>
27
27
Nowadays, a considerable number of web applications provide an external API consisting in a set of JSON-based services where all services are interrelated. Indeed, each service gives access to a subset of the application domain and developers must combine them to build any kind of non-trivial functionality on top of that API. Since JSON data is a schemaless format, deducing the right way of combining those services is not a trivial task. JSONDiscoverer aims at discovering (and visualizing) the implicit schema of the JSON data as well as the possible composition links among JSON-based Web APIs.
<p>The figure on the right illustrates the typical development scenario where JSON-based Web APIs define a set of services, each one returning JSON documents when they are called.</p>
41
-
<<<<<<<HEAD
42
41
<p>To select and use these Web APIs, developers usually test each service and reverse engineering the implicit structure of the data they return. When developers want to compose Web APIs, they look for common elements among the Web APIs, which is not a trivial task and sometimes not possible (i.e., when the APIs cannot be composed).</p>
43
42
<p>Our tool applies a discovery process to uncover the data model (i.e., schema) behind JSON-based Web APIs and assist on the discovery of composition links among them. These are currently the main functionalities provided:</p>
44
43
<ul>
45
44
<li><strong><ahref="#/simple">Simple discovery</a></strong>, which discovers the schema of a given set of JSON documents returned by a single service.
46
45
<li><strong><ahref="#/advanced">Advanced discovery</a></strong>, which discovers the schema from a set of JSON-based services. First, the schema of each JSON-based service is discovered (by using the simple discoverer), then the resulting schemas are composed to obtain a general one.
47
46
<li><strong><ahref="#/composer">API Composer</a></strong>, which takes a set of API schemas, looks for composition links (i.e., common concepts or attributes) and generates a composition graph. The result is used to help developers to compose APIs. The tool currently incoporates a sequence diagram generator to visualize API compositions.
48
-
=======
49
-
<p>To select and use these Web APIs, developers usually test each service and reverse engineer the implicit structure of the data they return. When developers want to compose Web APIs, they look for common elements among the Web APIs, which is not a trivial task.</p>
50
-
<p>Our tool applies a discovery process to uncover the schema (i.e., schema) behind JSON-based Web APIs and assist on the discovery of composition links among them. These are currently the main functionalities provided:</p>
51
-
<ul>
52
-
<li><strong><ahref="#/simple">Simple discovery</a></strong>, which discovers the schema model from a JSON document.
53
-
<li><strong><ahref="#/advanced">Advanced discovery</a></strong>, which discovers the schema from a set of JSON-based services. First, the schema of each JSON-based service is discovered (by using the simple discoverer), then the resulting schemas are composed to obtain a global one.
54
-
<li><strong><ahref="#/composer">API Composer</a></strong>, which takes a set of API schemas, looks for composition links (i.e., common concepts or attributes) and generates a composition graph. The result is used to assist developers to compose APIs. The tool currently incoporates a sequence diagram generator to visualize API compositions.
<p>Our tool draws schema information as UML class diagrams, including concepts (i.e., classes) and their properties (i.e., attributes and associations linking the different concepts). Potential API compositions are represented by means of UML sequence diagrams showing the possible sequence of API calls.
63
-
=======
64
-
<p>Our tool represents schema information as class diagrams, including concepts (i.e., classes) and their properties (i.e., attributes/associations).The tool leverages on model-driven techniques to represent both the schema and composition information as models and model associations, respectively.
65
-
>>>>>>> 6bca0ef5776338e7c4c2d76e313398bbebe2d26b
66
53
</p>
67
54
</div>
68
55
</div>
69
56
70
57
<divclass="row">
71
58
<h2id="doc-simple">The Simple Discoverer</h2>
72
59
<divclass="col-md-12">
73
-
<<<<<<<HEAD
74
60
<p>JSON documents include both metadata (i.e., the name side of the name/value pair elements) and data (i.e., their value). Note that, however, two objects in the same (or different) JSON document(s) generated by a call to the same service do not necessarily have the same exact structure, e.g., it is possible that some of them include only a subset of the metadata/data, thus removing some name/value pairs (e.g., to reduce network traffic). Therefore, the accuracy of the simple discovery increases when a number of JSON objects to infer their common structure are analyzed.</p>
75
61
76
62
<p>The simple discovery process is therefore launched for each JSON object and has two execution modes: creation and refinement. The former creates a root class from an object representing a concept not yet existing in the service schema created so far whereas the latter enriches/refines an already existing class with information coming from new objects representing such concept. </p>
77
63
78
64
<p>When a JSON object representing a new concept is considered, the following creation rules are applied to build the corresponding elements in the schema (see figure on the left as example):</p>
79
-
=======
80
-
<p>JSON documents include both metadata (i.e., the name side of the object name/value pair elements) and data (i.e., their value). Note that, however, two objects in the same (or different) JSON document(s) generated by a call to the same service do not necessarily have the same exact structure, e.g., it is possible that some of them include only a subset of the metadata/data, thus removing some name/value pairs (e.g., to reduce network traffic). Therefore, the accuracy of the simple discovery increases when a number of JSON objects are provided for the analysis.</p>
81
-
82
-
<p>The simple discovery process is therefore launched for each JSON object and has two execution modes: creation and refinement. The former creates a root concept from an object representing a concept not yet existing in the service schema created so far whereas the latter enriches/refines an already existing concept with information coming from new objects of that concept appearing in other documents. </p>
83
-
84
-
<p>When a JSON object element representing a new concept is considered, the following creation rules are applied to build the corresponding elements in the schema (see figure on the left as example):</p>
0 commit comments