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

Build sample implementations to use for IEPD implementer training #129

Open
cdmgtri opened this issue Mar 8, 2021 · 1 comment
Open
Assignees

Comments

@cdmgtri
Copy link
Contributor

cdmgtri commented Mar 8, 2021

Using the example IEPD from the updated IEPD developer training, consider building some sample implementations:

  • Build a sample Java / Postgres or MySQL implementation. Demonstrate how to use the NIEM Java Binding library to marshal and unmarshal data, etc.

  • Build a sample NodeJS / MongoDB implementation. Demonstrate how to do NIEM JSON stuff like JSON normalization, deal with qualified names, etc.

@cdmgtri cdmgtri added the Content label Mar 8, 2021
@cdmgtri
Copy link
Contributor Author

cdmgtri commented Aug 5, 2021

Basic idea: Set up a couple of dummy implementations, all tied in with the crash IEPD from the upcoming training course.

We can set up a real API that doesn't do much and just works with dummy data, but it should allow people to actually hit it to submit a crash report and to look one up. That should cover the basics and demonstrate how and where NIEM fits in.

REST API from the data provider

Provide a tutorial and code that shows how to set up an API and process requests.

  • Build an OpenAPI file describing the endpoints, schemas, sample instances, etc. Demonstrate how IEPDs can be leveraged.
  • Set up a working REST API as described by the OpenAPI file.
  • Support GET requests and send clients dummy crash driver IEP messages (use a fake data generator for basic person and location info)
  • Support POST requests with clients submitting a crash driver message. (we don't need to keep the data, but we can send back an OK status response)
  • Support NIEM XML and JSON
  • Add support for other items of interest, like EXI for XML data compression (send back a bunch of fake data that's been compressed)

Client 1: XML, Java, PostgresDB

Provide a tutorial and code in Java and maybe a Docker container that demonstrates the following.

  • Get a crash report:
    • Make a GET request to the API and provide an incident ID
    • Receive a crash report response from the API in NIEM XML
    • Optional step: Demonstrate how to decompress multiple messages with EXI
    • Use the soon-to-be-updated NIEM Java Bindings library to take the NIEM XML and convert it into data objects that Java can work with
    • Save the data in a postgres database (a standard relational database)
  • Submit a crash report:
    • Put data into a crash report NIEM XML message
    • Demonstrate how to use Xerces to validate the message against the IEPD schemas
    • Demonstrate how to use Saxon to validate the message against Schematron business rules
    • Demonstrate how to compress multiple messages with EXI
    • Make a POST request to the API with the NIEM XML message
    • API sends back an OK status response (we don't need to do anything with the data, just send back the OK)

Client 2: JSON, JavaScript, MongoDB

Provide a tutorial and code in JavaScript and Docker that demonstrates the following.

  • Get a crash report:
    • Make a GET request to the API and provide an incident ID
    • Receive a crash report response from the API in NIEM JSON
    • Save the data in MongoDB (popular NoSQL database in JavaScript environments)
  • Submit a crash report:
    • Put data into a crash report NIEM JSON message
    • Demonstrate how to use Ajv to validate the message against NIEM JSON IEPD schemas
    • Demonstrate how to use JSON schemas for code hinting in IDEs, making responses easy to work with for IEPD implementers
    • Make a POST request to the API with the NIEM JSON message
    • API sends back an OK status response

This would hit some of the common getting-started implementation questions. We could add to this over time. Maybe show how to support multiple versions of an IEPD, etc.

@cdmgtri cdmgtri self-assigned this Aug 6, 2021
@cdmgtri cdmgtri added the blocked label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant