Bringing AUTOSAR Models to the Web
At itemis, designing and implementing domain specific engineering tools is part of our core business. These tools usually were rich-client applications that ran on a desktop and had a very complex user interface. But technologies and user expectations evolve and web-based technologies become more and more important for this kind of tools.
In terms of the domain specific languages tool chain, we are actively developing the next generation of collaborative domain specific tools with our current in-house project.
Since one of our main customer domains is automotive, we obviously also have been thinking about bringing AUTOSAR models to the web. Having a strong expertise in Artop and Eclipse, the question is - what role do those two still play when we move to new technology stacks for tooling?
AUTOSAR has a complex metamodel and creating a framework that deals with it correctly is quite an invest. Luckily, the Eclipse-based Artop (AUTOSAR tool platform) is available for free to all AUTOSAR members. We have been using Artop to create all kind of automotive software engineering tools, from small utilities to interactive editors and massive data integration backbones that create the AUTOSAR models for hundreds of ECUc in nightly CI/Devops workflows. We make use of the rich functionality, such as very efficient reference resolving, dynamic model loading, model version conversion, the validation framework, workspace management etc. etc. So any architecture that makes use of Artop will save itself a lot of work.
The basic architecture that comes to mind immediately, is to use some kind of server in the back end, that serves information about the AUTOSAR model through a REST API and any web client that consumes that information to create a viewer / edito in a browser.
Artop is based on the Eclipse Modeling Framework (EMF), which is also used by many tool projects as a basic framework and we are not the only group to bring models to the web based on EMF. The EMF cloud project provides a nice demo for an EMF based web editor at (https://www.eclipse.org/emfcloud/#coffeeeditoroverview).
However, since Artop also makes use of Sphinx model loading, the EMF.cloud (https://www.eclipse.org/emfcloud/) used in the demo above framework is not prepared to deal with this kind of model loading and other concepts relevant for Sphinx based models such as Artop. Extending EMF.cloud to deal with Artop resulted in the conclusion, that it would be less effort to create a REST-based model server from scratch that is based on Sphinx/Artop concepts.
Since Eclipse and other open source projects provide such rich functionality, setting up a prototypical REST model server for Artop is a matter of an hour - if you exclude getting class loading / class path management for OSGi and local libraries right. Once that was figured out, creating a server, that provides read access to a fully loaded Artop workspace.
Our server can be accessed through simple URI requests and serves (part of the) AUTOSAR model as JSON. Note that this is more efficient than dealing with AUTOSAR XML directly, since Artop takes a way a lot of the things that you would have to deal with when doing that.
These JSON results can now be used by any web-based viewer to create user-friendly viewing (and in future editing) functionalities that even could allow distributed collaboration.
Nice idea. I think I could be used in a DevOps environment as a Web Based AUTOSAR Model viewer. Instead of getting the sources on my local computer and open tools like AUTOSAR Builder, Vector DaVinci, .., I could view the AUTOSAR Model direct online.
Intresting , thank you for sharing
Nice thought Andreas Graf !! Good initiative and I really appreciate the idea of web based autosar configuration. Honestly, I think, the software component modelling could be best visualized in webpage rather than a standalone application. Have a couple of question to you : - how do you perform the M2M transform between autosar arxml and json? Do you use some script or is done in the server using a java application which could load artop model in headless mode? - how does the save action get triggered for the changed configuration? I mean, do you intend to provide some buttons to save? Or is it done automatically in some interval(say 2000ms). And, if the save happens very often, do you see any performance issues(especially for bigger autosar models) for M2M transform between arxml and json?