Working in process
Launch stateful/stateless service fabric applications anywhere. No service fabric cluster required.
Service Fabric provides many cloud features such as leader election (Primary role) and cloud storage (Reliable Collection). However, in order to use those amazing futures, a very heavy SDK and runtime have to be installed. It is extremely difficult for Service Fabric users to migrate to other clouds or even leverage from other technology not compatible with Service Fabric.
A better approach would be Dapr. But no one wants to pay the price of migrating from old school service fabric apps.
Service Fabric Emulator keeps your apps binary the same, no code change required. (good news to anyone who lost the source code)
The Emulator is like the emulator of NES on the PC. All be loved games should run smoothly with the Xbox controllers.
Components remain the same:
USER APP
: the application package built for service fabric clusterSF SDK
: the lib imported by the app. typically from nuget if .net app or maven if java appFabricRuntime.dll
: the runtime installed by service fabric. this is a native lib which exposes APIs and interop withSF SDK
. An alternative way to emulate service fabric is to replace this layer with a customized version runtime. however, the open source code of service fabric does not work well on Windows and a bit of outdate. This layer may subject to beemulated
in the future.
Components to be emulated:
Fabric.exe
->Emulator
: This layer listens on a tcp port and accepts connections fromSF SDK
that would send some commands via the connections. for example, save data to the could. TheEmulator
implements the commands fromSF SDK
and acts as the local agent to the cloud.Fabric Cluster
->Any Cloud
: TheEmulator
is designed to be a API layer to fit any cloud. This can be a kuberentes leader election or a storage engine backed by MySQL to emulate the reliable collection in the app.
+
|
Traditional SF APP | SF Emulator
|
|
|
|
+---------------------------------+ | +---------------------------------+
| | | | |
| USER APP | | | USER APP |
| | | | |
| | | | |
| | | | |
| +-------------------+ | | | +-------------------+ |
| | | | | | | | |
| | SF SDK | | | | | SF SDK | |
| | | | | | | | |
| +----------+--------+ | | | +----------+--------+ |
| | | | | | |
+---------------------------------+ | +---------------------------------+
| | |
| | |
| | |
+----------------v----------+ | +----------------v----------+
| | | | |
| FabricRuntime.dll | | | FabricRuntime.dll |
| | | | |
+------------+--------------+ | +------------+--------------+
| | |
+---------------------------------------------------------------------------------------------------------------+
| | |
+------------v--------------+ | +------------v--------------+
| | | | |
| | | | |
| | | | |
| Fabric.exe | | | Fabric Emulator |
| | | | |
| | | | |
| | | | |
+------------^--------------+ | +------------^--------------+
| | |
| | |
| | |
+---------------v------------------+ | +---------------v------------------+
| | | | |
| | | | |
| | | | |
| | | | Any cloud provider |
| Fabric Cluster | | | |
| | | | e.g. Kubernetes |
| | | | |
| | | | |
+----------------------------------+ | +----------------------------------+
|
|
|
+
- Change Role, see changerole
- Reliable Collections