Upgraded software to use .NET 6.0
.NET 6.0
is an LTS release, previously .NET 5.0
was used.
In general the upgrade is around improved performance and you can read all about it here
Recommendations Using Environment variables In Docker
Due to changes in later versions of Docker we now recommend using “__” (double underscore) instead of “:” as hierarchy separator in environment variables, both when set from the command line and in docker-compose.yml
.
Feature - Use RelaxedJsonEscaping
The default escaping in .NET causes characters such as +
to be replaced with \u002b
(which is valid JSON). Since some implementations of the JSON specification does not follow this rule the result will still contain \u002b
. To avoid this the EdgeNode now use RelaxedJsonEscaping
.
Bugfix - IsNumeric Filter
As of version 2.5.0 the FlowMessage
can contain null values. The IsNumeric
filter did not handle the possibility of null values when comparing and this caused an error. This is now fixed and IsNumeric
can be now be used as a filter on properties with null values.
Feature - Queue Metrics Enabled
The Queue Metric
has previously been disabled due to some challenges in getting this metric correct. This has now been fixed and the Queue
can be seen in the EdgeNode UI
for flow (deployed or remote session). The metric can also be collected from the REST API.
Feature - No Restrictions For Property Names In FlowMessage
In previous versions of the EdgeNode
we restricted the property names in FlowMessages
to:
!#$%&()*+-/0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz
We now allow any characters as property names, however we still use .
as a delimiter so property names not matching a valid path
will get special treatment.
Example Valid Path
If the property name is a valid path
it will be set according to the normal rules where each .
is a new level in the FlowMessage
:
var msg = new FlowMessage();
msg.Set("a.b.c", "Hello World");
Console.WriteLine(msg.ToString());
The above code would output
{
"a":{
"b":{
"c": "Hello World"
}
}
}
Example Invalid Path
If the property name is NOT a valid path
it will be treated as is. In the example we have ..
which is not a valid path
:
var msg = new FlowMessage();
msg.Set("a..b..c", "Hello World");
Console.WriteLine(msg.ToString());
The above code would output
{
"a..b..c":"Hello World"
}
BugFix - PythonBridge Initialize Timeout
The Package installation timeout in seconds setting on the Python Bridge module was not used correctly when the flow initializes the module. This caused timeouts to occur when installing large libraries in the PythonBridge
module. As of 2.5.2
the timeout is properly set from the PythonBridge
module setting.
BugFix - Module Initialize/Start Timeout
Previous to 2.5.0 the Flow would wait forever if a module did not complete the initialize
or Start
operation. In 2.5+ the Flow will wait 30 seconds by default before terminating due to a timeout. Some modules are built in a way that can block the waiting thread and this has now been resolved so that the Flow will handle timeouts in a proper way.
BugFix - TcpConnection Crash
A bug in the core library for communication could at rare occations cause a infinite loop with socket exceptions. When this bug is triggered the log will be filled with repeated error like:
2021-11-29 13:25:35.514 [Error ] Failed to read from tcp connection, terminating connection: a708d9da-65be-4d2f-8e44-43ee8a152692
System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Crosser.EdgeNode.Core.Net.Tcp.TcpConnection.ReadAsync(Memory`1 buff, Int32 offset, Int32 count) in /edgenode/src/Core/Crosser.EdgeNode.Core/Net/Tcp/TcpConnection.cs:line 249
Feature - Run Startup Scripts In Container
Some users need to run scripts every time the container starts. This might be things like enabling BLE, CAN bus etc. You can now add custom scripts by mounting the folder /docker-entrypoint.d
in the docker-compose
and then all .sh
scripts will be executed before the EdgeNode
process is started.
Example in docker-compose
volumes:
- "./data:/application/data"
- "./docker-entrypoint:/docker-entrypoint.d"
You will also have to remove the entrypoint
if you have one in your docker-compose.yml
# entrypoint:
# - ./Crosser.EdgeNode.Server