Skip to content

jsonBackup/MORYX-Framework

 
 

Repository files navigation

MORYX Logo

CI Coverage License Gitter

MORYX Framework

The MORYX Framework is a .NET based framework to quickly build three-tier applications. It aims to reduce boilerplate code as much as possible and provides modularity, flexibility and easy configuration with very little effort. It originates from the original MORYX project targeted to develop machines but has expanded to a much bigger field of use.

The MORYX Core defines a base namespace and set of interfaces used to develop modular applications.

The MORYX AbstractionLayer is the environment for the digital twins of resources and products. It defines the domain independent meta model and enables applications to model their physical system and product portfolio as typed objects. It thereby makes other modules hardware independent by encapsulating details of the underlying structure and devices.

The MORYX Factory contains the APIs, domain objects and developer documentation for the MORYX factory scope.

Links

Getting Started

If you want to start developing with or for MORYX, the easiest way is our template repository. It comes with two empty solutions, the necessary package feeds and preinstalled empty MORYX runtime. Add projects and packages to backend and frontend solutions depending on your specific requirements. Install stable releases via Nuget; development releases are available via MyGet.

Package Name Release (NuGet) CI (MyGet) Future (MyGet)
Moryx NuGet MyGet MyGet-Release
Moryx.Model NuGet MyGet MyGet-Release
Moryx.Model.InMemory NuGet MyGet MyGet-Release
Moryx.Model.PostgreSQL NuGet MyGet MyGet-Release
Moryx.Model.Sqlite NuGet MyGet MyGet-Release
Moryx.Container NuGet MyGet MyGet-Release
Moryx.Communication.Serial NuGet MyGet MyGet-Release
Moryx.Asp.Extensions NuGet MyGet MyGet-Release
Moryx.Runtime NuGet MyGet MyGet-Release
Moryx.Runtime.Kernel NuGet MyGet MyGet-Release
Moryx.Runtime.Endpoints NuGet MyGet MyGet-Release
Moryx.CommandCenter.Web NuGet MyGet MyGet-Release
Moryx.AbstractionLayer NuGet MyGet MyGet
Moryx.AbstractionLayer.TestTools NuGet MyGet MyGet
Moryx.TestTools.UnitTest NuGet MyGet MyGet-Release
Moryx.AbstractionLayer.Products.Endpoints NuGet MyGet MyGet
Moryx.AbstractionLayer.Resources.Endpoints NuGet MyGet MyGet
Moryx.Notifications NuGet MyGet MyGet
Moryx.Products.Management NuGet MyGet MyGet
Moryx.Products.Model NuGet MyGet MyGet
Moryx.Resources.Management NuGet MyGet MyGet

If you wish to contribute to this project, you simply need to clone the repository and open the solution with Visual Studio 2017 or above. The Debug target should be StartProject.

To build and run from the command line you need powershell and msbuild.

.\Build.ps1 -Build
.\src\StartProject\bin\Debug\StartProject.exe

Whether you want to debug and experiment with this repository or build an application based on the Abstraction Layers packages you need to follow a few simple steps to setup each of the modules. For both modules this requires the package Moryx.Runtime.Maintenance.Web and its database configuration.

Product Management:

  1. Create or configure the database for Moryx.Products.Model using the Maintenance
  2. Configure the storage mapping for your domain objects. This is necessary to store, load and use the objects within MORYX.

Resource Management:

  1. Create or configure the database for Moryx.Resources.Model
  2. Execute the ResourceInteractionInitializer from ResourceManager console to provide the endpoint for the resource configuration UI.

Architecture

The MORYX Core is a .NET based framework to quickly build three-tier applications. The core architecture is a modular monolith using the service and facade pattern to isolate and decouple functionality. It uses a 2-level Dependency Injection structure to isolate a modules composition and offer a per-module life-cycle with all instances hidden behind the previously mentioned facades. It also offers a range of tools and components to speed up development, increase stability and drastically reduce boilerplate code. To improve flexibility of modules and applications the core has built in support for configuration management as well as plugin loading.

Each modules composition is constructed by its own DI-container instance. This makes it possible to dispose the container in order to restart the module and reconstruct the composition with a different configuration or to recover from a fatal error. The ModuleController and Facade instances are preserved through the lifecycle of the application as part of the level 1 composition. The Components (always present) and plugins (configurable) are created when a module is started and disposed when the module stops. For each lifecycle the references of the facade are updated.

Resource Management

The Resource Management holds the object graph representing the physical system. It maintains the database entities for the object graph in the background and reconstructs the object graph upon boot. It also provides the API for other modules to interact with resources based on their implemented interfaces and supports resource look-up by various conditions or capabilities.

Product Management

The Product Management holds all product variants, created instances of those variants and recipes how to create an instance. It provides an API giving access to product types, instances, recipes and workplans.

Tutorials

To start using the MORYX for your own projects you can jump into these tutorials:

Maintenance

Part of the Framework is also the Maintenance module, which hosts a HTTP REST service and optionally a graphic web interface to control and configure a MORYX application. The Maintenance itself does not define that logic, but simply provides easy external access to APIs and features of the runtime kernel.

History

Starting with version 3.0 of the core we decided to open source it as a foundation for Industrial IoT (IIoT) applications. For this public version, the framework received an overhaul to replace commercial libraries and tools, remove specialized Phoenix Contact code and better comply with the .NET open source community.

Version 6 uses .net 6 with ASP.net Core and EntityFramework Core 6. All WPF UIs were replaced by WebUIs. In order to make debugging easier, we decided to merge the AbstractionLayer and Core repositories into one and name this one MORYX Framework. The AbstractionLayer will be archived.

A few examples of solutions build on MORYX are listed below:

  • Manufacturing Control System
  • Plastic Mold Tracking
  • Intralogistics
  • Home Automation

About

.NET based framework to quickly build three-tier applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 91.9%
  • TypeScript 6.5%
  • Other 1.6%