Skip to content

Commit

Permalink
Add Endjin.RecommendedPractices
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardvanRooijen committed Mar 6, 2021
1 parent d4aa64d commit 2d6d94e
Show file tree
Hide file tree
Showing 47 changed files with 390 additions and 210 deletions.
98 changes: 53 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,68 +12,78 @@ This project contains a .NET Core console application that will reliably ingest

The purpose of this application is to provide sample data for [Ais.Net](https://github.com/ais-dotnet/Ais.Net) - the .NET Standard, high performance, zero allocation AIS decoder. The majority of raw AIS data is only available via commerical sources, and thus creating AIS datasets large enough to test / benchmark [Ais.Net](https://github.com/ais-dotnet/Ais.Net) is almost impossible.

The Norwegian Costal Administration TCP endpoint produces:
- ~2.2 KB per second
- ~8MB per hour
- ~190MB per day
- ~1.3 GB per week
- ~5.6 GB per month
- ~67 GB per year
The Norwegian Costal Administration TCP endpoint produces:

- ~2.9 KB per second
- ~10.3 MB per hour
- ~248 MB per day
- ~1.7 GB per week
- ~7 GB per month
- ~81.4 GB per year

## Azure Blob Storage Taxonomy

The AIS data is stored using the following taxonomy

`<USER DEFINED CONTAINER NAME>/raw/yyyyMMdd/yyyyMMddTHH.nm4`
`<USER DEFINED CONTAINER NAME>/raw/yyyy/MM/dd/yyyyMMddTHH.nm4`

An example directory listing, with a user defined container name of `nmea-ais` would look as follows:

```
\---nmea-ais
\---raw
+---20190712
| 20190712T00.nm4
| 20190712T01.nm4
| 20190712T02.nm4
| 20190712T03.nm4
| 20190712T04.nm4
| 20190712T05.nm4
| 20190712T06.nm4
| 20190712T07.nm4
| 20190712T08.nm4
| 20190712T09.nm4
| 20190712T10.nm4
| 20190712T11.nm4
| 20190712T12.nm4
| 20190712T13.nm4
| 20190712T14.nm4
| 20190712T15.nm4
| 20190712T16.nm4
| 20190712T17.nm4
| 20190712T18.nm4
| 20190712T19.nm4
| 20190712T20.nm4
| 20190712T21.nm4
| 20190712T22.nm4
| 20190712T23.nm4
+---20210712
| 20210712T00.nm4
| 20210712T01.nm4
| 20210712T02.nm4
| 20210712T03.nm4
| 20210712T04.nm4
| 20210712T05.nm4
| 20210712T06.nm4
| 20210712T07.nm4
| 20210712T08.nm4
| 20210712T09.nm4
| 20210712T10.nm4
| 20210712T11.nm4
| 20210712T12.nm4
| 20210712T13.nm4
| 20210712T14.nm4
| 20210712T15.nm4
| 20210712T16.nm4
| 20210712T17.nm4
| 20210712T18.nm4
| 20210712T19.nm4
| 20210712T20.nm4
| 20210712T21.nm4
| 20210712T22.nm4
| 20210712T23.nm4
|
+---20190713
| 20190713T00.nm4
| 20190713T01.nm4
+---20210713
| 20210713T00.nm4
| 20210713T01.nm4
```

## To Run

Update the values in the `settings.json` file:

```
```json
{
"connectionString": "<YOUR AZURE STORAGE CONNECTION STRING>",
"containerName": "<YOUR ROOT BLOB STORAGE CONTAINER NAME>"
}
"Ais": {
"host": "153.44.253.27",
"port": "5631",
"retryAttempts": 100,
"retryPeriodicity": "00:00:00:00.500"
},
"Storage": {
"connectionString": "<YOUR AZURE STORAGE CONNECTION STRING>",
"containerName": "nmea-ais",
"writeBatchSize": 500
}
}
```

From the command line: `dotnet Ais.Net.Receiver.dll`
From the command line: `dotnet Ais.Net.Receiver.Host.Console.exe`

## Licenses

Expand All @@ -85,7 +95,7 @@ The Data ingested by the AIS.Net.Receiver is licensed under the [Norwegian licen

## Project Sponsor

This project is sponsored by [endjin](https://endjin.com), a UK based Microsoft Gold Partner for Cloud Platform, Data Platform, Data Analytics, DevOps, and a Power BI Partner.
This project is sponsored by [endjin](https://endjin.com), a UK based Microsoft Gold Partner for Cloud Platform, Data Platform, Data Analytics, DevOps, Power BI Partner, and .NET Foundation Corporate Sponsor.

For more information about our products and services, or for commercial support of this project, please [contact us](https://endjin.com/contact-us).

Expand All @@ -99,9 +109,7 @@ Our other Open Source projects can be found on [GitHub](https://github.com/endji

This project has adopted a code of conduct adapted from the [Contributor Covenant](http://contributor-covenant.org/) to clarify expected behavior in our community. This code of conduct has been [adopted by many other projects](http://contributor-covenant.org/adopters/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [&#104;&#101;&#108;&#108;&#111;&#064;&#101;&#110;&#100;&#106;&#105;&#110;&#046;&#099;&#111;&#109;](&#109;&#097;&#105;&#108;&#116;&#111;:&#104;&#101;&#108;&#108;&#111;&#064;&#101;&#110;&#100;&#106;&#105;&#110;&#046;&#099;&#111;&#109;) with any additional questions or comments.

## IP Maturity Matrix (IMM)

The IMM is endjin's
## IP Maturity Model (IMM)

[![Shared Engineering Standards](https://endimmfuncdev.azurewebsites.net/api/imm/github/ais-dotnet/Ais.Net.Receiver/rule/74e29f9b-6dca-4161-8fdd-b468a1eb185d?nocache=true)](https://endimmfuncdev.azurewebsites.net/api/imm/github/ais-dotnet/Ais.Net.Receiver/rule/74e29f9b-6dca-4161-8fdd-b468a1eb185d?cache=false)

Expand Down
80 changes: 80 additions & 0 deletions Solutions/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Note: this file was added to your solution as a result of one or more projects using the Endjin.RecommendedPractices.Build.Common NuGet package.
# You can edit this file (e.g., to remove these comments), and it will not be updated - the package just checks for its presence, and copies
# this file. If you don't want this file (but you want to use the NuGet package that puts it here), add this setting to all projects
# using Endjin.RecommendedPractices.Build.Common:
# <EndjinDisableCodeAnalysis>true</EndjinDisableCodeAnalysis>
# and then delete this file. That setting will prevent the package from recreating this file.

# Code style rules for enforcing the endjin house style
# See: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.cs]

# Core editorconfig formatting - indentation

# use soft tabs (spaces) for indentation
indent_style = space

# Formatting - indentation options

csharp_indent_case_contents = true
csharp_indent_switch_labels = true

# Formatting - new line options

csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_open_brace = object_collection, object_collection_array_initalizers, accessors, lambdas, control_blocks, methods, properties, types

# Formatting - organize using options

dotnet_sort_system_directives_first = true

# Formatting - spacing options

csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_parameter_list_parentheses = false

# Formatting - wrapping options

csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true


# Style - expression bodied member options

csharp_style_expression_bodied_accessors = false:none
csharp_style_expression_bodied_constructors = false:none
csharp_style_expression_bodied_methods = false:none
csharp_style_expression_bodied_properties = false:none

# Style - expression level options

csharp_style_inlined_variable_declaration = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion

# Style - implicit and explicit types

csharp_style_var_for_built_in_types = false:warning
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = false:warning

# Style - language keyword and framework type options

dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion

# Style - qualification options

dotnet_style_qualification_for_field = true:suggestion
dotnet_style_qualification_for_method = true:suggestion
dotnet_style_qualification_for_property = true:suggestion
dotnet_style_qualification_for_event = true:suggestion

# Style - using
csharp_using_directive_placement = inside_namespace:warning
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisIsAssigned.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisIsAssigned.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisIsAssigned.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisIsDteNotReady.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisIsDteNotReady.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisIsDteNotReady.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisMessage.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMessage.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessage.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisMessageType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMessageType.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessageType.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
18 changes: 9 additions & 9 deletions Solutions/Ais.Net.Models/Abstractions/IAisMessageType18.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// <copyright file="IAisMessageType18.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessageType18.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
{
public interface IAisMessageType18
{
bool CanAcceptMessage22ChannelAssignment { get; }

bool CanSwitchBands { get; }

ClassBUnit CsUnit { get; }

bool HasDisplay { get; }

bool IsDscAttached { get; }

ClassBRadioStatusType RadioStatusType { get; }

int RegionalReserved139 { get; }

int RegionalReserved38 { get; }
}
}
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisMessageType19.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMessageType19.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessageType19.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisMessageType1to3.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMessageType1to3.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessageType1to3.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMessageType24Part0.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessageType24Part0.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMessageType24Part1.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMessageType24Part1.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
6 changes: 5 additions & 1 deletion Solutions/Ais.Net.Models/Abstractions/IAisMessageType5.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
namespace Ais.Net.Models.Abstractions
// <copyright file="IAisMessageType5.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
{
public interface IAisMessageType5
{
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisMultipartMessage.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisMultipartMessage.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisMultipartMessage.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IAisPositionFixType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IAisPositionFixType.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IAisPositionFixType.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/ICallSign.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="ICallSign.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="ICallSign.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IRaimFlag.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IRaimFlag.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IRaimFlag.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IRepeatIndicator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IRepeatIndicator.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IRepeatIndicator.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IShipType.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IShipType.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IShipType.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IVesselDimensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IVesselDimensions.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IVesselDimensions.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
4 changes: 2 additions & 2 deletions Solutions/Ais.Net.Models/Abstractions/IVesselIdentity.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// <copyright file="IVesselIdentity.cs" company="Endjin">
// Copyright (c) Endjin. All rights reserved.
// <copyright file="IVesselIdentity.cs" company="Endjin Limited">
// Copyright (c) Endjin Limited. All rights reserved.
// </copyright>

namespace Ais.Net.Models.Abstractions
Expand Down
Loading

0 comments on commit 2d6d94e

Please sign in to comment.