-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to be compiled headlessly in a Docker container #105
base: develop
Are you sure you want to change the base?
Conversation
c3eb68a
to
981b9a3
Compare
981b9a3
to
a3767a5
Compare
* Run load_or_create_config on init * Document payload, debug statements * Add start and stop commands * Add script to get binaries * Invoke obtain_binaries from main compile script * Ensure that we can perform work on the input
* WIP * Fix build * Complete fix for remote build
Sorry, I think this got dropped into limbo, are you able to talk more about the usage of this? |
@fire, certainly. It has been some time since I looked at this, but the general idea was to allow Protongraph to be run as a Docker process, so that one could deploy it to the cloud, and then use event-based architecture in order to send messages indirectly to it, and then produce messages from it back to a separate Kafka topic. (Apologies if the following message is rather verbose, communication is not my strong suit. Hopefully this information provides sufficient context regarding the general intent of this contribution when I originally made it though, and is of use to you + other maintainers, as well as the founder HungryProton in setting potential future direction for the Protongraph project) In briefTo unpack this a little bit more, the general idea was to work towards the capability to have networked procedural generation, i.e. be able to have a networked Godot game where Protongraph could run as a background service and then produce procedurally generated content per Protongraph tpgn files on the fly. In more detailIn some more detail, to build this out, the general idea was:
After this, the idea was to
(The advantage of doing this is that each and every user connected to a networked experience can get the same procedurally generated information streamed to their game during runtime, which is potentially quite powerful.) I managed to get this all working in prototype code, I can search for it if you are interested. Limitations / follow up thoughts / miscellanyThe main limitation I ran into while looking into this was the lack of a natural API for working with the node hierarchy in Godot, so I ended up writing a lot of ugly hacked together code that didn't feel clean or particularly maintainable. One potential solution is to leverage something like Pixar's universal scene description, although I'm not sure exactly what would be involved in that and/or how it could interoperate with the Godot game engine / whether any modules might need to be built with GdExtension to facilitate that. I did come across a separate project called Blackjack which is built around the godot-rust ecosystem. The Blackjack project seems to follow the Unix philosophy of having small modules / services that focus on doing one thing really well. |
Here are some of my thoughts.
|
TLDR
This change allows for Protongraph to be compiled so as to run headlessly in a Docker container. Running Protongraph this way allows a user to produce to Kafka (should they provide within the
config
folder a validkafka.config
and valid secrets if applicable for their Kafka process).Detail
This change adds:
In particular, this should allow for one to be able to produce to Kafka when running this process locally.
To compile for Docker, run
./compile.sh
. Scripts to start, stop and debug the process are in thescripts
folder.To compile for OsX as per previous pull request, run
make osx
.Synopsis
After this change, one can run Protongraph in default responder mode (wherein it runs locally and responds to messages from a local Godot game with sync-godot added as a plugin) or in Kafka producer mode.
Default Responder mode is best if one plans to run Protongraph locally on a single machine along with eg a Godot game.
For the more advanced usecase for running in Kafka producer mode, one may wish to model things broadly as follows:
Basically, send messages to a Signalling server, produce to Kafka, and then consume from Kafka and send messages via websocket to Protongraph (this process), then produce back to Kafka again for a Signalling server consumer to process, before sending back to the Signalling server, and then back to any connected clients.
To take full advantage of the capabilities of Protongraph when running in this mode, each and every process (save for the user-defined Client process, e.g. Godot game) should be deployed to the cloud.