What is the Mobilize.WebMAP.CoreServices.All?

Mobilize.WebMAP.CoreServices.All is a NuGet Packages. This Package depends on 5 specific packages which are related.

The intention of this NuGet is to encapsulate all the WebMAP Core packages into a single package, for an easy way to handle the version changing in the migrated solutions

The following packages compose the WebMAP Core Services. All of them are build together with the same version and depends on a specific version of the package Mobilize.WebMAP.Common

  1. Mobilize.WebMAP.Core

  2. Mobilize.WebMAP.Messaging

  3. Mobilize.WebMAP.Server

  4. Mobilize.WebMAP.Host

Mobilize.WebMAP.Core

This module is in charge of all task related to Observable objects. These tasks are:

  • Reference Management: Manage all references between Observables

  • Lazy Loading: Retrieve Observable objects from storage just when they are needed

  • Change Tracking and Report

  • Persistence of Observable objects

  • Manage of Non Observable objects (Observable Wrappers)

Many of these tasks are performed using a weaving mechanism. This Mechanism will apply changes to the objects marked as Observable, which allows these objects to be self-managed.

And basically, this module contains the following services:

  • IIdentifierService: Acts as the service who provides a source of unique identifiers across the servers. Actually, this is a Guid struct however is wrapped in this service to being able to change the implementation in the future.

  • IInstrumentationService: Acts as the service orchestrating multiple tasks like the Lazy Loading, Reference Management, Delta Tracking, and management of IObservable Wrappers. By acting as helper for weaved code, it is responsible of get/set operations required on intercepted properties.

  • IObservableWrapperCatalog: Acts as a service who holds the mappings of NonObservables types with its corresponding WrapperType.

  • IReferenceTraversalService: Acts as the service performing a traversal of memory graph (observables), recursively by expanding their references.

  • IReferenceService: Acts as the service who manages all the operations related with Reference Add or Remove and pushing this update to other dependencies.

  • IAssemblySharedStateLocator: Locator's for static class per assembly.

  • IObservableStorage: Acts as the service to load or store observable items in the storage.

  • IKeyValueStore: Acts as the service to store a key/value pair for any purpose.

  • ITransactionalStorageFactory: Acts as the service for creating a transactional storage.

  • ITrackingService: Acts as the service that tracks changes in all IObservable objects

Mobilize.WebMAP.Messaging

The Messaging Module is related to sending and receiving data between client and server.

It contains the MapperService and the MapperCatalog.

  • IMapperService: Acts as the service that manages the mapper mechanism for models. Specifically, it applies the deltas to be sent to the client side and it applies the deltas to be synchronized with back-end Observable Models.

  • IMapperCatalog: Acts as a catalog that keeps track of all the mappers registered during the start up of the application. It also verifies that there will not duplicate mappers.

In summary, the MapperService uses a catalog of mappers which are associated by Type. A DTO will be sent to the client when we need to synchronize state. All DTO's must implement the IDataTransfer interface. This allows us to specify Observable's references and grant a MapperId. As a restriction for the objects that we sent via DTO, every class must be a concrete class, since we don't allow inheritance due to the fact that we need to know for sure what we are sending and an abstract class won't tell us that.

Mobilize.WebMAP.Server

This module consists of a set of Middlewares that handles the processing of the web request, this includes:

  • Session Management

  • Security (Anti-forgery Token)

  • Routing for WebAPI

  • Create of the Response

  • Formatting of Message

This module contains the following services:

  • IAsyncService: Asynchronous Execution Service.

  • ICoreServices: Acts as the service locator for the Core Services of WebMAP such as: IInstrumentationService, IIdentifierService, IAsyncServices.

  • IDeliveryService: Acts as the service for creating the response to be sent to the client side.

  • IEntranceService: Acts as the service for processing the request coming from the client side.

  • IFormattingService: Acts as the service for formatting the data coming from the client side and formatting the data to be sent to the client side.

  • IRequestQueueService: Acts as the service that manages all request queue for each active session. WebMAP Request are transactional. So if a WebMAP request arrives while another WebMAP request has been received for the same session it must be queued.

  • ISharedDataService: Acts as the service that moves Core Context and Commands across threads.

  • IUnitOfWork: Acts as a service that keeps track of everything you do during a request that can affect the storage, and figures out everything that needs to be done to alter the database as a result of your work. At the end of each request, the unit of work should be closed in order to persist all the changes done during the processing of the request.

Mobilize.WebMAP.Host

This module provides extension methods that registers all the WebMAP back-end services described previously into the IServiceCollection and registers all the middlewares into the IApplicationBuilder.

Last updated