energinet-datahub / archived-geh-post-office Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Call blobstorage with url from subdomain - retrieve and parse data.
Send data back to Actor.
Are the overall architecture correct and ready.
Vi forventer der kommer et idempodency check inden rammer PO. BLOCKED.
In some cases exceptions are thrown, and in other a bool, indicating success or failure, is returned.
This should be streamlined.
The bool result is returned all the way up to the DataAvailableInbox function and then discarded.
Undersøg problemet hvor der gemmes korrekt i idempotency men fejler ved DA save. Hvad kan der gøres, exceptions eller retry, deadletter ?
As Post Office I want to receive a notification about available data so that I can work with the data.
When a commit is done and code sent to repo, you need to document.
Should we send new data or old data / has Dequeue() been called since last Peek()?
Do we have data from previous Peek
If yes return data
If no send data request to sub domain
Test
Implementing use of Azure Table Storage
As a DB I want to be able to store data available-messages in a structured and efficient way.
Add content to domain road map (currently planned and perhaps future work if it makes sense).
If nothing is planned, use this text:
"No work planned in current program increment."
Currently the postoffice has a map of types -> container.
This map is defined in application settings through terraform.
We would like for this to be something that is generic, and can be reconfigured through a terraform created instance.
We need to setup the base solution for the post office to run from.
This includes
Rename IDocumentStore to something that doesn't describe the underlying DB tech e.g. Repository
Add the following files in root with reference to main repo docs:
Add docs folder in root and add the following files:
Move IDocumentStore to Energinet.DataHub.PostOffice.Domain to make it accessable from DomainServices etc.
Request dataset from sub domain.
Receive path to data.
Implementation
Session id
Architecture
Test
On failure - handling and logging (DatasetNotFound, DataSetNotAvailable, InternalServiceError)
Other domains need to be able to communicate with the post office, and automatically through terraform fetch and use connection strings and such as variables.
Therefor we need to add the inbound queue + schema storage connection strings to the core keyvault
Look into MS' IConfiguration.
Create and register config objects in ServiceCollectionExtensions
, and inject these where needed instead of using Environment.GetEnvironmentVariable()
directly.
Suggested config objects:
CosmosConfig
ServiceBusConfig
Use beta package for StyleCop.Analyzers. It supports record types. After, all record types should have their property names updated to Pascal case.
Microsoft.CodeAnalysis.FxCopAnalyzers is deprecated and should be removed.
Look in https://github.com/Energinet-DataHub/geh-metering-point/blob/main/Directory.Build.props for inspiration.
We need to calculate the message priority before saving to Cosmos database. This should help us read importing messages first.
Calculation is domain logic.
We need an api that exposes an endpoint that gives outside domains the possibility to communicate with the post office.
To grpc or not to grpc
Remove if (dataAvailableContract is null) throw new InvalidOperationException("Cannot parse bytes to document.");
. DataAvailable.Parser.ParseFrom never returns null.
We need to be able to support multiple outbound formats. EBIX, CIM and so on.
To do that we will expand the post office with the concept of schemas.
We will extend the function that peeks with the following functionallity.
type
and version
from the document, and combine that with the query parameter format
type/format/version
content-type
Change integration test for DataAvailable so we use a Cosmos Database and not Moq.
Test that a DataAvailable is save correctly to database.
Fields: uuid, recipient, messageType and origin are all nullable today.
Handle dequeue message from actor.
Mark saved data as dequeued.
Notify sub domain PO for dequeued data.
Following projects are missing Nullable attribute in .csproj: Energinet.DataHub.PostOffice.Inbound, Energinet.DataHub.PostOffice.Outbound
The PO solution has not been sufficiently covered with tests. Improve test coverage.
Deprecated package WindowsAzure.Storage
Use newer Azure.Storage.Blobs package
We need to set up Terraform.
Github Actions
DataAvailable function
Peek function
Cosmos db
Servicebus DataAvailable
Update project to .net5
...
Currently the documentation does not really have any perspective on HOW to get access to the queue (fetching the connection string from the keyvault).
This needs to be added.
We need to calculate the Priotity for DataAvailable before saving to DB.
Priority should be calculated with Domain, time .... in mind. This needs to be descripted by PO.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.