Many usage examples available in different programming languages
Cons
No clear use cases using BaseX
Versioning is not out-of-the-box available. Need to use a second database to create ‘versioning’, which creates an archive database and a current database. And by using RESTXQ is relatively easy to create a versioning mechanism. BaseX gave SirixDB as a good alternative in case we want a NoSQL database with versioning mechanism.
XML Processing
XML Validation
Schematron
SCL XSD is the base schema for the SCL file validation. Even though, with XSD 1.1, it’s somehow possible to define co-occurrence constraints with tags “key”, “keyref” (combined with xpath selector) and restriction rules with “assert” (within a type definition), that is not enough to expressed complex and custom business logics.
Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees. One doesn’t need heavy environment to use Schematron.
Schematron is XML, uses xml technologies (XPATH) and is very straightforward (less than seven basic elements)
It has features for XML processing that other schema validators don’t have:
inter-document constraints validation,
hint to fix file under validation.
Phase/Profile validation
Abstract rules definition that can be extended (inheritance)
Embeddable in XSD and Relax NG schema
etc.
It’s optimally used in combination with XML schema (XSD, RELAX NG).
Java frameworks for XML processing
Pros JAXB
JAXB (Java Architecture for XML Binding) is a framework that allow mapping Java classes to XML representations
Uses the XJC tool available in the JDK, that compiles an XML schema file into Java classes annotated with JAXB annotations suitable for (un)marshalling. This way, a XML file can be easily build by inserting data into the models.
Cons JAXB
JAXB was part of the Java language, but has been removed from the language since Java version 11. To use it, you have to add an extra dependency.
Dealing with large documents is not straightforward (cf. JAXB user guide.)
Not having to re invent the wheel of processing incoming IEC CIM configuration files
Cons RDF4J
If you don’t have experience with triples, it might take a while before understanding it all.
MapStruct
MapStruct is a Java framework to do bean mapping. MapStruct is for instance used in the CIM Mapping for mapping data
between CIM classes and IEC 61850 classes. More information can be found on https://mapstruct.org/.
Pros
Mapping done in a separate interface (Mapper interface) with annotations
Performance also seems to be fast, because no Reflection used, but a generated classes.
Baeldung Overview
Cons
Needs an annotation processor in Maven to generate the classes from the interface
Java framework - Quarkus
For the framework to be used with Java we choose Quarkus.
Pros
Java stack, and working experience is available in the community
Open Source
Hot reload for quick development
Less verbose code when developing REST API’s, compared to for example Java Spring
Tailored for GraalVM (universal VM), which is also very interesting for us (usage of resources)
Huge decrease of memory huge compared to traditional cloud-native stacks like Java Spring.
Huge decrease in response times compared to traditional cloud-native stacks like Java Spring.
Backed by RedHat
Quickly settings up microservices with REST APIs
When looking at the memory usage (and response times) of Quarkus, it’s definitely interesting for us. Also take a look at this comparison with Java Spring
Because CoMPAS is an application which also should run locally, memory usage is an important aspect. Together with being a modern microservice framework, backed by RedHat and being a Java framework (which we are having experience with) it’s the best choice for now!
Cons
Doesn’t support full set of some EE standards, like Enterprise JavaBeans. Expected is that it’s not a game breaker for us.
Relatively new technology, framework could contain some “rookie mistakes”. On the other hand, multiple researches are stating the maturity of the framework it achieved in this short time.
Not many developers are acquainted with Quarkus compared to e.g. the Spring framework.
Source control - GitHub
We choose GitHub for source control. This is good practice for open source development.
The CoMPAS repositories can be found at https://github.com/com-pas/