Add a region connector
Region connectors are an essential part of EDDIE for creating and managing permission requests for the eligible party. They connect to an MDA and PA, and in some cases, multiple regions at the same time can be supported by a single implementation if they implement the same processes and protocols. For example, the Green Button region connector supports both the US and Canada, since they both have MDAs and PAs that implement the Green Button. Region connectors have to process permission requests in a specific way, according to the permission process model. They have to emit specific messages and documents, when processing them.
How a permission request has to be processed is described in implementing the permission process model. A region connector has to follow a few conventions, but its internal architecture is up to the implementing party. Keep in mind that there are best practices for region connectors and their internal architecture.
A region connector is a Spring Boot application. Each region connector is executed in its own Spring Boot context, which is registered as a child context of the EDDIE Core context. EDDIE Core is the main module that initializes region and outbound connectors. The Core scans the classpath at the base package energy.eddie.regionconnector for region connectors and starts them if they are enabled.
Each region connector module has to have a class annotated with @SpringBootApplication at its base. Spring Boot uses this base class to initialize the Spring context. The following is a minimal example of this base class.
package energy.eddie.regionconnector.foo.bar;
import energy.eddie.api.agnostic.RegionConnector;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@RegionConnector(name = "foo-bar")
public class FluviusSpringConfig {
}In total, only two annotations are needed to declare a region connector. While the @RegionConnector annotation is needed by EDDIE Core to find the region connector during classpath scanning, the @SpringBootApplication to initialize the Spring context. Other Spring annotations can also be added to the base class, such as @EnableScheduling or @EnableWebMvc. Each region connector has its own dispatcher servlet, for web requests.
The EDDIE button will load the region connector custom element, when the correct region and permission administrator is selected. The custom element must be implemented by each region connector, which allows the final customer to give necessary information to create a permission request.
Since there are many parts to be implemented when creating a new region connector, here is a checklist of things that have to be considered and implemented. This checklist is also displayed when creating a new GitHub issue for implementing a region connector, so you can track everything in there too. Here the template itself.
- Create a permission request at the permission administrators side
- Implement custom element for region connector
- Implement permission market documents
- Request validated historical data and emit it to raw data stream
- Map validated historical data to validated historical data market documents
- Allow data needs for future data, and request the data once available
- Request accounting point data and emit it to raw data stream
- Map accounting point data to accounting point market document
- Ensure that data needs are enforced by region connector, such as only requesting the correct data. For example, not requesting gas metered data for data need that specifies electricity.
- React to revocation of permission request
- Allow termination of permission requests
- Remove credentials if possible
- Terminate on the permission administrators side if possible
- Allow retransmission of validated historical dat for a specific permission request
- Time out stale permission requests
- Implement health indicators for external APIs and services