-
Notifications
You must be signed in to change notification settings - Fork 109
Architecture overview
sergystepanov edited this page Feb 13, 2022
·
1 revision
- Cloud Morph spawns Windows applications on Linux using Wine.
- Windows is the most popular OS for gaming applications, Linux has a more development-friendly environment and provides more programming utilities.
- Wine is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems. Its performance for AAA games is proven in Steam PlayOnLinux, Lutris.
- Wine applications and their utilities are packaged into a Docker container, so it is possible to programmatically spawn new containers on demand.
- Headless server is a server without a display. When you acquire any cloud instances from AWS, Digital Ocean, GCloud..., it is headless because there is no display attached to it. Similar usage you can find in Chrome Selminium CI/CD pipeline.
- Being able to run the application in Headless will enable the ability to scale horizontally by provisioning more cloud machines.
- Graphic is captured in Virtual Frame Buffer (XVFB) and Audio is captured in Virtual Audio (PulseAudio). The encoding pipeline will fetch media from the virtual display and audio.
- Encoding Pipeline for Video and Audio relies on powerful FFMPEG.
- Web Service listens to the FFMPEG result and pipes it out to all users.
- Any user interaction will be sent to Web Service and then Web Service will talk to Windows Application inside Container. Even Web Service and Application is inside the same machine, they communicate with each other using Websocket over a specified shared network port. Other kinds of Inter-Process Communication are not applicable here.
- Inside the container, there is a "syncinput" utility that listens to user interaction over WebSocket and simulates Windows Application events over WindowsAPI.
- C++ is chosen because it has good support for WindowsAPI.