Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: User doc on packaging and plugins. Drafts #108

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbeckerle
Copy link
Contributor

(This PR replaces the PR #90 which was not on a named branch.)

At the moment no further review is necessary.

First draft of pages about packaging dfdl schemas, and about plugins.

All applications using Daffodil, at least via Runtime1 should, ideally, be taking advantage of packaging DFDL schemas in Jar files, using 'sbt publish' and managed-dependencies for inter-schema dependencies, etc.

First draft of pages about packaging dfdl schemas, and about plugins.

All applications using Daffodil, at least via Runtime1 should, ideally, be taking advantage of packaging DFDL schemas in Jar files, using 'sbt publish' and managed-dependencies for inter-schema dependencies, etc.
// ///////////////////////////////////////////////////////////////////////////
//
// This file is written in AsciiDoc.
//
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment #90 (comment)

:page-layout: page
:url-asciidoctor: http://asciidoctor.org
:keywords: plugins layering UDF charset
// ///////////////////////////////////////////////////////////////////////////
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment #90 (comment)

//
// //////////////////////////////////////////////////////////////////////////

= DFDL Language Extensions in Daffodil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- Layering Transformer (e.g., unzip/zip, verify/recompute checksums)
- User Defined Function (UDF) (e.g., convert mean-sea-level elevation to height-above-ellipsoid)

There is one additional kind of plugin that will be supported by Daffodil 3.4.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Configuring an application must put these jar files on the CLASSPATH so that the executing instance of Daffodil for a specific configured data processing flow finds them on the class path for the data format(s) that flow is processing.

For greater assurance/trust, the plugin jars could be digitally signed by their creators, and applications could verify these signatures (using public keys) as a startup condition.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=== Advance Summary

- The best way to use DFDL schemas is accessing them from Jar files
- Include pre-compiled binary DFDL schema files also in the same Jar file.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


The organization of the files into these directory structures is not arbitrary.
It can be needed to avoid file name clashes and serves the same role as the Java package-name directory structure does for Java programs.
The directory hierarchy defines a Java package-like namespace structure for DFDL schemas.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//
// //////////////////////////////////////////////////////////////////////////

= Packaging DFDL Schemas for use in Daffodil Applications
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


= DFDL Language Extensions in Daffodil

Daffodil contains numerous extensions to the DFDL v1.0 language.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Different DFDL schemas for different kinds of data will need their own such plugins.
Hence the plugins, like the DFDL schema files themselves, are used in applications as part of a specific data-processing flow.

Keeping in the spirit of DFDL in describing a format declaratively, plugins need to be very small pieces of code (ex: a character set definition should be 10 lines of code.)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tuxji
Copy link
Contributor

tuxji commented Mar 2, 2023

If I were to review this PR (I won't since you didn't ask for a review at this time), I would want the long lines in the file to be wrapped to at most 90 columns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants