Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

232 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filter Server

Actions Status Coverage Status MPL-2.0 License

Description

The filter-server is a microservice of the GridSuite platform dedicated to storing and instantiating filters.

Filters are sets of network equipment elements and are used in many places across the platform: to configure network modifications, to provide contingency lists to security analysis, to select equipment in sensitivity analysis, and to filter data in the UI. The service provides the following capabilities:

  • Store and manage filters of two active types: identifier-list-based and expert-rule-based.
  • Evaluate filters against a specific network from the network-store, returning the matched equipment as FilterEquipments objects.
  • Export filter results ready to be consumed by other services (actions-server, sensitivity-analysis-server, network-modification-server, etc.).
  • Manage filters (create, read, update, duplicate, delete) individually or in batch.
  • Notify other microservices via RabbitMQ when a filter is modified.

The evaluation logic is provided by the gridsuite-filter library. The server is responsible for persistence, REST exposure, cycle detection in cross-filter references, and service orchestration.


Technical Stack

  • Spring Boot (Web, Data JPA, Actuator, Cloud Stream)
  • PostgreSQL
  • Liquibase
  • RabbitMQ via Spring Cloud Stream
  • API documentation: OpenAPI / Swagger (springdoc)
  • Micrometer / Prometheus
  • gridsuite-filter (core DTO and evaluation library)
  • powsybl-network-store-client

Filter Types

Identifier List (IDENTIFIER_LIST)

An explicit list of equipment IDs with an optional distributionKey per entry (used for example as weighting for sensitivity analysis). Evaluation looks up each ID directly in the network and reports which IDs were not found.

Expert (EXPERT)

A rule tree composed of logical combinators (AND, OR) and leaf rules comparing network equipment fields against values using a rich set of operators (EQUALS, IN, BETWEEN, GREATER_THAN, IS_PART_OF, ...).

Expert filters support all network equipment types and can reference other filter UUIDs via IS_PART_OF / IS_NOT_PART_OF operators. The server enforces cycle detection on every update to prevent circular references.


Development Scripts

Build Docker image:

mvn install -DskipTests -Dpowsybl.docker.install

Please read liquibase usage for instructions to automatically generate changesets. After you generated a changeset do not forget to add it to git and in src/main/resources/db/changelog/db.changelog-master.yml.


Interactions with Other Microservices

┌──────────────────────┐
│    filter-server     │──► network-store-server  (load network for filter evaluation)
└──────────────────────┘
         ▼
      RabbitMQ (element.update — emitted on single filter modification)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages