Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Merge commit '02cd04b62ddc980cb9bf298aafe9f4cd73eb0d3b' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Azure IoT Builder committed Jan 31, 2018
2 parents dfedee6 + 02cd04b commit 0895863
Show file tree
Hide file tree
Showing 26 changed files with 101 additions and 107 deletions.
14 changes: 7 additions & 7 deletions v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ V1 will continue to be supported. V1 documentation which used to live on docs.mi


# 5/10/2017
The Azure IoT Gateway SDK was our first step to enabling edge analytics in IoT solutions. Were doubling down on, and expanding, this vision as explained in Satyas Keynote at the Build conference and Sam Georges [blog post](http://blogs.microsoft.com/iot/?p=23040). As part of this evolution, the SDK is becoming an extensible product you can use instead of a set of code you build. To reflect this, were changing the name to Azure IoT Edge.
The Azure IoT Gateway SDK was our first step to enabling edge analytics in IoT solutions. We're doubling down on, and expanding, this vision as explained in Satya's Keynote at the Build conference and Sam George's [blog post](http://blogs.microsoft.com/iot/?p=23040). As part of this evolution, the SDK is becoming an extensible product you can use instead of a set of code you build. To reflect this, we're changing the name to Azure IoT Edge.

All the important developer concepts are maintained as we continue to improve Azure IoT Edge. Specifically
All the important developer concepts are maintained as we continue to improve Azure IoT Edge. Specifically:
- modules remain units compute which can be written in your programming language of choice.
- traditional cloud services and 3rd party business logic can run as a module.
- modules can communicate with each other via declarative message passing.
Expand Down Expand Up @@ -51,8 +51,8 @@ The following modules are available in this repository:
## Create Modules using Packages
The fastest way to setup your development environment to start writing modules is to leverage our packages for Java, C#, and Node.js. Our [sample apps repo](https://github.com/Azure-Samples/iot-edge-samples) has quick steps on getting started with these packages:
- [Azure IoT Edge Maven](https://mvnrepository.com/artifact/com.microsoft.azure.gateway/gateway-module-base): With this you will be able to run the Azure IoT Edge sample app and start writing Java modules. This package contains the Azure IoT Edge core and links to the module dependencies packages for Linux or Windows. Requires the [java binding package](https://mvnrepository.com/artifact/com.microsoft.azure.gateway/gateway-java-binding).
- [Azure IoT Edge npm](https://www.npmjs.com/package/azure-iot-gateway): With this you will be able to run the Azure IoT Edge sample app and start writing Node.js modules. This package contains the Azure IoT Edge core and auto-installs the module dependencies packages for Linux or Windows.
- [Azure IoT Edge Maven](https://mvnrepository.com/artifact/com.microsoft.azure.gateway/gateway-module-base): With this you will be able to run the Azure IoT Edge sample app and start writing Java modules. This package contains the Azure IoT Edge core and links to the module dependencies' packages for Linux or Windows. Requires the [java binding package](https://mvnrepository.com/artifact/com.microsoft.azure.gateway/gateway-java-binding).
- [Azure IoT Edge npm](https://www.npmjs.com/package/azure-iot-gateway): With this you will be able to run the Azure IoT Edge sample app and start writing Node.js modules. This package contains the Azure IoT Edge core and auto-installs the module dependencies' packages for Linux or Windows.
- [Azure IoT Edge NuGet .NET Standard](https://www.nuget.org/packages/Microsoft.Azure.Devices.Gateway.Module.NetStandard/): With this you will be able to run the Azure IoT Edge sample app and write .NET Standard modules on Windows ([IoT Edge Core for Windows](https://www.nuget.org/packages/Microsoft.Azure.Devices.Gateway.Native.Windows.x64/)) or Ubuntu ([IoT Edge Core for Ubuntu](https://www.nuget.org/packages/Microsoft.Azure.Devices.Gateway.Native.Ubuntu.x64/)).
- [Azure IoT Edge NuGet .NET Framework](https://www.nuget.org/packages/Microsoft.Azure.IoT.Gateway.Module): With this you will be able to run the Azure IoT Edge sample app and write .NET Framework modules on Windows, dependent on [IoT Edge Core for Windows](https://www.nuget.org/packages/Microsoft.Azure.Devices.Gateway.Native.Windows.x64/).

Expand All @@ -65,9 +65,9 @@ a module to find out how to get it, who supports it, etc.
>| OPC Proxy | https://github.com/Azure/iot-edge-opc-proxy | 2017-04-27 |
>| Modbus | https://github.com/Azure/iot-gateway-modbus | 2017-01-13 |
>| GZip Compression | https://github.com/Azure/iot-gateway-compression-gzip-nodejs | 2016-12-16 |
>| Proficy Historian | https://github.com/Azure-Samples/iot-edge-proficy-historian | 2017-04-27               |
>| SQLite        | https://github.com/Azure/iot-gateway-sqlite | 2017-01-13               |
>| Batch/Shred       | https://github.com/Azure/iot-gateway-batch-nodejs | 2017-01-13               |
>| Proficy Historian | https://github.com/Azure-Samples/iot-edge-proficy-historian | 2017-04-27 |
>| SQLite | https://github.com/Azure/iot-gateway-sqlite | 2017-01-13 |
>| Batch/Shred | https://github.com/Azure/iot-gateway-batch-nodejs | 2017-01-13 |
>| ZWave | https://github.com/MaxKhlupnov/SmartHive | 2017-04-27 |
We'd love to feature your module here! See our [Contribution guidelines](Contributing.md) for
Expand Down
4 changes: 2 additions & 2 deletions v1/ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Third Party Notices for the Azure IoT Edge Project
This Microsoft Open Source project is based on or incorporates material from the project(s) listed below (Third Party OSS). The original copyright notice and the license under which Microsoft received such Third Party OSS, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party OSS to you under the licensing terms for the Microsoft product or service. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.
This Microsoft Open Source project is based on or incorporates material from the project(s) listed below ("Third Party OSS"). The original copyright notice and the license under which Microsoft received such Third Party OSS, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party OSS to you under the licensing terms for the Microsoft product or service. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise.
#SensorTag (http://processors.wiki.ti.com/index.php/CC2650_SensorTag_User's_Guide#Data)
Creative Commons Attribution-ShareAlike 3.0
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
Expand Down Expand Up @@ -51,7 +51,7 @@ Microsoft Corporation
One Microsoft Way
Redmond, WA 98052 USA

Please write source for [Third Party IP] in the memo line of your payment.
Please write "source for [Third Party IP]" in the memo line of your payment.
-------------------------
#GDBus-Glib D-Bus (https://developer.gnome.org/glib/stable/glib.html)
GNU Lesser General Public License
Expand Down
8 changes: 4 additions & 4 deletions v1/bindings/dotnet/devdoc/dotnet_binding_hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The JSON configuration for .NET Module will be similar to the configuration for
##Native methods description
### Module\_Create

When the **.NET Module Host**s `Module_Create` function is invoked by the
When the **.NET Module Host**'s `Module_Create` function is invoked by the
gateway process, it:

- Creates a CLR instance;
Expand All @@ -68,22 +68,22 @@ gateway process, it:

### Module\_Start

When the **.NET Module Host**s `Module_Start` function is invoked by the
When the **.NET Module Host**'s `Module_Start` function is invoked by the
gateway, it:

- Checks to see if the .NET module has implemented the `Start` method.
- If defined, invokes the `Start` method implemented by the .NET module.

### Module\_Receive

When the **.NET Module Host**s `Module_Receive` function is invoked by the
When the **.NET Module Host**'s `Module_Receive` function is invoked by the
gateway process, it:

- Serializes (by calling `Message_ToByteArray` the message content and properties and invokes the `Receive` method implemented by the .NET module (`IGatewayInterface` below). The .NET module will deserialize this byte_array into a Message object.

### Module\_Destroy

When the **.NET Module Host**s `Module_Destroy` function is invoked by the
When the **.NET Module Host**'s `Module_Destroy` function is invoked by the
gateway, it:

- Releases resources allocated and calls the `Destroy` method implemented by the .NET Module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ public void Destroy()

public void Receive(Message received_message)
{
if (received_message != null)
if (received_message != null)
{
string messageData = System.Text.Encoding.UTF8.GetString(received_message.Content, 0, received_message.Content.Length);
Console.WriteLine("{0}> Printer module received message: {1}", DateTime.Now.ToLocalTime(), messageData);
string messageData = System.Text.Encoding.UTF8.GetString(received_message.Content, 0, received_message.Content.Length);
Console.WriteLine("{0}> Printer module received message: {1}", DateTime.Now.ToLocalTime(), messageData);

int propCount = 0;
foreach (var prop in received_message.Properties)
int propCount = 0;
foreach (var prop in received_message.Properties)
{
Console.WriteLine("\tProperty[{0}]> Key={1} : Value={2}", propCount++, prop.Key, prop.Value);
Console.WriteLine("\tProperty[{0}]> Key={1} : Value={2}", propCount++, prop.Key, prop.Value);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions v1/bindings/dotnetcore/devdoc/dotnet_core_binding_hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The JSON configuration for [.NET Core](https://github.com/dotnet/) Module will
##Native methods description
### Module\_Create

When the **.NET Core Module Host**s `Module_Create` function is invoked by the
When the **.NET Core Module Host**'s `Module_Create` function is invoked by the
gateway process, it:

- Checks if delegates have been created.
Expand All @@ -100,7 +100,7 @@ gateway process, it:

### Module\_Start

When the **.NET Core Module Host**s `Module_Start` function is invoked by the
When the **.NET Core Module Host**'s `Module_Start` function is invoked by the
gateway, it:

- Call the `Start` Delegate;
Expand All @@ -109,15 +109,15 @@ gateway, it:

### Module\_Receive

When the **.NET Core Module Host**s `Module_Receive` function is invoked by the
When the **.NET Core Module Host**'s `Module_Receive` function is invoked by the
gateway process, it:

- Serializes (by calling `Message_ToByteArray`) the message content and properties and invokes the `Receive` method implemented by the .NET module (`IGatewayInterface` below). The .NET module will deserialize this byte array into a Message object.
- Calls the `Receive` delegate;

### Module\_Destroy

When the **.NET Module Host**s `Module_Destroy` function is invoked by the
When the **.NET Module Host**'s `Module_Destroy` function is invoked by the
gateway, it:

- Calls the `Destroy` delegate (which is going to call `Destroy` method implemented by the [.NET Core](https://github.com/dotnet/) Module);
Expand Down
14 changes: 5 additions & 9 deletions v1/bindings/java/devdoc/java_binding_hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ where all necessary Java class files are located, `entrypoint.class.name` is the
of the class that implements the module code. `entrypoint.jvm.options` is
a JSON object containing any options to be passed to the JVM upon creation.

 

Gateway Module (Java)
---------------------

Expand Down Expand Up @@ -134,8 +132,6 @@ The implementaion of `IGatewayModule` should save the moduleAddr and broker argu
To simplify this, the Azure IoT Gateway SDK provides an abstract `GatewayModule` class which implements the `IGatewayModule` interface. Module-implementers
may extend this abstract class when creating a module. If the module extends the `GatewayModule` class the constructor calls `create` method.

 

Exactly like a standard gateway module written in C, the gateway will handle
making calls to `Module_Create`, `Module_Start`, `Module_Receive`, and
`Module_Destroy`. These three functions are implemented by the **Java Module Host**
Expand All @@ -144,15 +140,15 @@ a description of what the **Java Module Host** will do in each of these cases:

### Module\_Create

When the **Java Module Host**s `Module_Create` function is invoked by the
When the **Java Module Host**'s `Module_Create` function is invoked by the
gateway, it:

- Creates a JVM with the provided JVM configuration if this is the first Java
module added to the gateway.

- Constructs a `Broker` Java object using the `BROKER_HANDLE`.

- Finds the modules class with the name specified by the `entrypoint.class.name`,
- Finds the module's class with the name specified by the `entrypoint.class.name`,
finds the constructor that matches these three arguments: the native `MODULE_HANDLE` address,
the `Broker` object and the JSON args string for that module and invokes it.
If the constructor with three parameters is not found, finds no-argument constructor and invokes it and
Expand All @@ -163,7 +159,7 @@ gateway, it:

### Module\_Start

When the **Java Module Host**s `Module_Start` function is invoked by the
When the **Java Module Host**'s `Module_Start` function is invoked by the
gateway, it:

- Attaches the current thread to the JVM
Expand All @@ -172,15 +168,15 @@ gateway, it:

### Module\_Receive

When the **Java Module Host**s `Module_Receive` function is invoked by the
When the **Java Module Host**'s `Module_Receive` function is invoked by the
gateway, it:

- Serializes the `MESSAGE_HANDLE` content and properties and invokes the
`receive` method implemented by the Java module with the serialized message.

### Module\_Destroy

When the **Java Module Host**s `Module_Destroy` function is invoked by the
When the **Java Module Host**'s `Module_Destroy` function is invoked by the
gateway, it:

- Attaches the current thread to the JVM
Expand Down
18 changes: 9 additions & 9 deletions v1/bindings/nodejs/devdoc/nodejs_binding_hld.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ we modified the source in a fork of the Node.js project. We essentially added an
additional callback function as a parameter to `node::Start`. The changes that
have been done to Node.js to enable this can be seen in [this
commit](https://github.com/avranju/node/commit/fb272256ef7743c9b1882aff39fe7f1685fb7cba).
With this change in place we are able to intercept Node.jss event loop in the
With this change in place we are able to intercept Node.js's event loop in the
following manner:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -151,7 +151,7 @@ modules will however have their *destroy* callback invoked when it is time for
them to be unloaded.

The configuration for this module will include the path to the root JavaScript
file that is to be loaded and run when the module starts up. Heres a sample
file that is to be loaded and run when the module starts up. Here's a sample
configuration provided in JSON syntax:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ json
Expand All @@ -177,12 +177,12 @@ implementation and hands off control to it. In the sample above we are using the
default Node.js loader that the gateway SDK ships with.

The `main.path` property specifies the path to the root JavaScript file that
should be loaded and `args` is configuration thats specific to this gateway
should be loaded and `args` is configuration that's specific to this gateway
module.

The code on the JavaScript side of the implementation has access to an API
provided by the module host. It maybe useful to have the interface definitions
of this API handy while reviewing the work that the module hosts create,
of this API handy while reviewing the work that the module host's create,
receive and destroy functions do. The API definition is provided below using
TypeScript syntax for expository purposes:

Expand Down Expand Up @@ -240,14 +240,14 @@ following actions:
- If this is the first time that this API is being called, then it starts a
new thread to run the Node.js engine and starts up Node.js.

- It sets up a callback function to be called from Node.jss event loop.
- It sets up a callback function to be called from Node.js's event loop.

- When event loop callback is invoked, it creates an instance of a proxy
object for the message broker (conforming to the `Broker` interface defined
above).

- If this is the first time that a Node.js module is being loaded, then it
adds an object to V8s global context that implements the
adds an object to V8's global context that implements the
`GatewayModuleHost` interface (defined in the TypeScript snippet above).
This object is identified using the name `gatewayHost`.

Expand All @@ -265,7 +265,7 @@ following actions:
which now has a handle to the JavaScript object that implements
`GatewayModule`. The module then proceeds to invoke `GatewayModule.create`
passing the handle to the `Broker` object and the configuration that it has
read from the modules configuration
read from the module's configuration

### Module\_Receive

Expand All @@ -276,7 +276,7 @@ constructs an object that implements the `Message` interface and invokes
### Module\_Destroy

The call to `Module_Destroy` is simply forwarded on to `GatewayModule.destroy`.
It then removes the module reference from its internal list of modules.
It then removes the module reference from it's internal list of modules.

### Publishing of messages to the broker

Expand All @@ -300,7 +300,7 @@ this, the following is proposed:
module.

2. We provide a [Yeoman generator](http://yeoman.io/) that allows developers to
quickly scaffold out a project thats pre-configured with a gateway and a
quickly scaffold out a project that's pre-configured with a gateway and a
sample module implementation.

3. The gateway executable that we package in the NPM module will include
Expand Down
2 changes: 0 additions & 2 deletions v1/core/devdoc/dynamic_library_requirements.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# dynamic_library Requirements



## Overview
dynamic_library is a wrapper for OS system calls for loading, unloading and
finding a symbol in a dynamically linked library.
Expand Down
2 changes: 1 addition & 1 deletion v1/core/devdoc/message_broker_requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef struct BROKER_MODULEINFO_TAG
CONST MODULE_API* module_api;

/**
* Handle to the thread on which this modules message processing loop is
* Handle to the thread on which this module's message processing loop is
* running.
*/
THREAD_HANDLE thread;
Expand Down
Loading

0 comments on commit 0895863

Please sign in to comment.