The MDriven Architecture Simplified

A breakdown of how the MDriven Architecture works.

The key to understanding the MDriven architecture is hidden in understanding how a standalone application works. You must comprehend how MDriven replicates this basic would-be standalone application and its database connections.

  • The Sync Server and what role it plays.
  • The MDriven Server and how it fits in this puzzle.
  • The Turnkey Server is responsible for rendering and supporting thin clients.

A basic application consists of an SQL database and objects in memory, which, in MDriven, we refer to as an EcoSpace. With this basic setup, we can get things into memory and store the result in the database. How would this look with MDriven?

The Basic Standalone Application Setup

We simplify this setup further by introducing persistence mappers. These generate SQL queries for reading and writing data where the in-memory objects are transformed for storage. This basic application still operates as a single-user application – which introduces us to a challenge. What happens if we add more users? How do we handle data changes with a local executable running?

The Sync Server and its Role

With a direct connection to the Database Server, this implies the Persistence Mapper constantly queries the Database Server for any changes. This constant querying is complex and degrades the performance of our system. To address this, we introduce the EcoSpace Sync Server with new persistence mappers – Sync-Server Persistence Mapper. This mapper no longer speaks SQL Server language but Sync Server language. Thus, the EcoSpace Sync Server handles the communication to the Database. The Sync Server now begins to spy on the clients for any changes the clients make.

Introduction of the MDriven Server

Having addressed the multiuser challenge, we face another: for any changes you make to your model, you must recompile the executable. The ideal situation is to have the model stored and managed from the server side and availed to the clients centrally. This is where the MDriven Server comes into play. The MDriven Server is here to move administration from Visual Studio and compile code that needs to be in sync between your executable and the Database. An Admin database was introduced within the SQL Database with 3 application slots [A0-A2]. The architecture evolved such that now the Sync Servers are included in the MDriven Server, and these communicate with the app slots seated in the Database. The communication between your executable and the Sync Servers [EcoSpace Sync Servers] remains the same.

The MDriven Server also consists of an IIS engine and a Model Admin part communicating with the MDriven Designer. When you upload a model to the cloud, it uploads to the MDriven Server. The MDriven Server evolves the database for apps seated at app slots A0 – A2 and logs every activity performed in the Admin Database. Now that we have addressed our major challenges, we can put a web-based interface to this cloud-based database. This is where the Turnkey Server comes in.

The Connection to the Turnkey Server

Note: The Turnkey Server and MDriven Server are both IIS applications running alongside each other.

The Turnkey Server also contains an SQL-Server Compact Database to ensure it can run within a single Azure application. It only uses app slot A0. We need to generate a user interface (UI) in HTML to connect this setup with browsers. We achieve this by using the Turnkey Web renderer, which communicates directly with the Model Administration part of the MDriven Server. Here, the Turnkey Server can retrieve view models and their data through the Sync Server Interface—it runs many EcoSpaces.

Note: Now seated within the Turnkey Web renderer is the Model executer, a more generic version of your executable. It consists of the MDriven Framework, EcoSpaces, and the Sync-Server Persistence Mappers.

The Turnkey Web renderer consists of a basic MVC renderer capable of any basic rendering further enhanced by a Bootstrap layout. This HTML rendered on the web can then be data-bound either on the server using MVC Razor code. Or, the Turnkey Web renderer can output Angular JS commands, in which case the MVC page will contain Angular Typescript code that can talk to the streaming interface of the Turnkey Server.

Conclusion

Finally, the MDriven Architecture presents a new, streamlined approach to modern software development that simplifies application design, synchronization, and scaling. While streamlining complex procedures is remarkable, this architecture’s real potential lies in its ability to be deployed on multiple platforms, offering even greater power and portability. As we conclude this chapter, the next question is how to effortlessly deploy this architecture across cloud, online, and on-premises applications. Stay tuned as we take this exciting next step!

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *