Home > Net >  The OSGi specification implementation of c # open source
The OSGi specification implementation of c # open source

Time:09-20

This is about three to four years ago to complete a c # implementation of the OSGi framework, with reference to the process of implement the OSGi specification with some implementation approach (thank you for the reference of those materials and items), although this framework in only a few small projects had practical applications, but the OSGi specification implementation is relatively complete, includes some basic elements, due to personal project of center of gravity has shifted, going to open it now, for your reference:

OSGi.NET is a reference to the OSGi framework specification of modularization management framework, the framework for the application extension (component (bundle) provides a standard environment, the framework can be divided into some layers:

1. The running environment
2. The module (Bundle)
3. The life cycle management
4. The service registration
5. The extension point support
Currently, OSGi.NET has the following features:

1. Component pluggable sex: components can be loaded according to business needs at runtime, unload operations
2. The components of the dynamic update: components can be updated at runtime to replace the current version
3. The component version isolation: different component reference products different versions of the same assembly version can isolate
4. Components: the complete life cycle including installed, loaded, has been activated, start, stop, unloaded
5. Components of load order: according to the business component loading can set load levels to control the loading sequence
6. Components of communication support: between components through service-oriented programming model to achieve communication between components, the purpose of the call
7. The expansion of the components support: component provides extension points and its extension to satisfy a certain component extensibility support
Start a OSGi.NET application need only the following code

using System;

Using OSGi.NET.Core.Root;

The namespace ConsoleDemo
{
Class Program
{
The static void Main (string [] args)
{
//create frame factory
Var frameworkFactory=new frameworkFactory ();
//create the frame kernel
Var framework=frameworkFactory. CreateFramework ();
//initialize the framework
Framework. The Init ();
//start frame
Framework. The Start ();

Console.ReadLine();
}
}
}
Create a OSGi.NET project needs:
1. The frame of reference kernel assemblies OSGi.NET.dll
2. Add the frame kernel configuration file OSGi.NET.properties
3. If need support, add log4net. Config file and log4net. DLL assembly references

The OSGi.NET project default file directory structure is as follows
/application directory
/program/Bundles/
/procedures/Bundles/module A/
/procedures/Bundles A/Manifest/modules. The XML
/procedures/Bundles/modules/module a. d. a. ll
A/Libs/directory/Bundles/module/
A/Libs/directory/Bundles/module/*. DLL
/program/Bundles/modules/B
/program/Bundles/modules/C
/procedures/Libs/directory (optional)
/procedures/OSGi.NET.properties

Note:
The Libs folder in the directory for a Bundles of Shared assemblies (also can be in the configuration file configuration Shared list), such as interface contracts, public third-party libraries, such as
Modules in A Libs folder to store the private assemblies,
Manifest. XML as the program listing files to the description of module,
The framework of OSGi.NET.properties kernel configuration file

About the loading sequence:
Due to business needs, each module dependencies may exist, so the module loading also will have load order demand, at this time can Manifest through the listing file. The XML, the Bundle of node StartLevel attribute to set the loading sequence, the smaller the value, load ryoma,

About Bundle reference assemblies search principle:
1. According to the load bundles referenced assemblies, based on the assembly name, version number matching principle, the priority from/procedures/Libs/directory search or Shared lists,
2. If no match, the first step is based on the assembly name from [/procedures/Bundles/modules/Libs/A *. DLL] directory search, and to search the assembly corresponding version Bundle,
Libs directory under 3. Each Bundle assemblies do the isolation between the bundles in the loading, to ensure that different Bundle won't impact between referenced assemblies, namely: if there are Shared assemblies please place/procedures/Libs/directory or in a Shared list configuration,

Making address: https://github.com/FreezeSoul/OSGi.NET

CodePudding user response:

Recommended for open source behavior

CodePudding user response:

I just see architecture

CodePudding user response:

Support the open source, thanks for sharing

CodePudding user response:

refer to the second floor starfd response:
for open source behavior under the recommended


Wow, what time you into the webmaster
To curry favor with the first

CodePudding user response:

refer to 6th floor pengqian098 response:
Quote: refer to the second floor starfd response:

For open source behavior under the recommended


Wow, what time you into the webmaster
To curry favor with the

Have 1 years...

CodePudding user response:

Open source must support

CodePudding user response:

Open source must support

CodePudding user response:

Support for open source, lz

CodePudding user response:

Support the

CodePudding user response:

Support for open source, download the framework to see

CodePudding user response:

CodePudding user response:

Thanks for sharing, support for open source

CodePudding user response:

Very good, support open source

CodePudding user response:

Thanks for sharing
  •  Tags:  
  • C#
  • Related