usdot-jpo-ode / jpo-ode

US Department of Transportation (USDOT) Intelligent Transportation Systems Operational Data Environment (ITS ODE). This is the main repository that integrates and coordinates ODE Submodules.
78 stars 44 forks source link

Non-proprietary code base (ASN.1) #29

Closed arielsgold closed 7 years ago

arielsgold commented 7 years ago

It is our intent to phase out any proprietary elements of the ODE code base so it is entirely non-proprietary. This will enhance user experience (one open code base - no pieces sitting behind a closed code repo that need to be integrated) and replicability (anyone can use the software regardless of their ability to purchase a particular license). The main obstacle right now is the ASN.1 encoder/compiler. I'd like to start a dialog about options for replacing the current proprietary solution with an open source one, while retaining the performance and modularity of the software. Is there existing code that can be modified to meet our needs? Does something need to be developed from scratch? Please discuss!

hmusavi commented 7 years ago

I use the following primary criteria in a quick search for ASN.1 compiler and runtime software:

  1. Java runtime
  2. Availability of a compiler/Java API code generator
  3. UPER encoding and decoding
  4. Free and Open Source

I was able to identify only one potentially viable candidate but have not tried to test and evaluate it. openASN.1 which is available on SourceForge (https://sourceforge.net/projects/openasn1/?source=typ_redirect) is developed by Clayton Hoss and Marc Weyland as their diploma thesis. This package needs to be evaluated to see if:

  1. The compiler implementation is up-to-date and complete to be able to parse J2735 ASN.1 schema file.
  2. The generated code compiles in Java 8 without any post compile modification
  3. The quality of the generated code is high
  4. The runtime library is robust and efficient
  5. The generated code correctly and efficiently implements ASN.1 specification, particularly J2735 schema
arielsgold commented 7 years ago

Thanks for looking into this, Hamid. Is there an established benchmark we need to hit for java runtime? If not, how do we establish a benchmark? (I assume, perhaps erroneously, that the rest of the criteria you describe are either subjective - e.g., code quality - or a yes/no determination - e.g., code compiles correctly.)

hmusavi commented 7 years ago

There is no externally established benchmark that I know of specifically designed for ASN.1 but there is an internal benchmark that we established as part of the SE MI ODE ASN.1 tool selection. Using that benchmark, we could compare the performance of any prospective ASN.1 library to four commercial ASN.1 libraries, including OSS.

The code quality metrics do not need to be subjective either. We could run the source code through a static analysis tool such as Sonarqube or even more sophisticated commercial tools which perform much deeper analysis.

Booz Allen development team has access to CAST AIP (http://www.castsoftware.com/products/code-analysis-tools) which assesses the quality of the software against the following Health Factors more thoroughly and deeply than SonarQube:

The following are Health Factors analyzed by CAST AIP Robustness Engineering flaws and practices that can have an impact on the runtime stability of the application. Efficiency Potential efficiency bottlenecks and potential future scalability issues linked to coding practices. Security Design flaws, likelihood of having application failures and application defects due to modifications. Changeability Difficulties to modify code in order to implement new features, correct errors, or change the applications environment. Transferability Difficulties to move code across teams, lock in to specific resources, or longer onboard time for new team members. Total Quality Index (TQI) An average of all the rules applicable to an application (based on technology) provided by CAST.

tonychen091 commented 7 years ago

Closing this topic now, as the team has a plan forward for an open source ASN1 compiler

onderson commented 7 years ago

Whats the forward plan for asn.1 support? Looking something to improve on this subject? Regards

mvs5465 commented 7 years ago

Hey @onders86, we are moving towards using the open source asn1c compiler by Lev Walkin.