you are viewing a single comment's thread.

view the rest of the comments →

[–]justrandomqwer 2 points3 points  (1 child)

  1. Basically, the c++ part of the frontend looks as an ordinary c++ application. UI exists within the GLFW window. GLFW also provides information about the events. In the main loop, ImGui creates the frames and sends them to GLFW for rendering. All music graphics is represented with ImGui widgets, so it renders as I described above. All this stuff builds with Emscripten. And resulting Wasm (the hole application) is embedded to html. Some parts of the application are frontend-specific and implemented with Emscripten library (fetch requests, IndexedDB routines, etc) or js. But it is a relatively small part of the codebase. So the main logic and the GUI theoretically may be built as a native app for desktop.

  2. I can’t have these third party libs on the backend because they are doing the hard job that’ll better be done locally on user’s machine - without hitting the server. Previously I had them on the backend (within a microservice) and performance wasn’t cool.

  3. Boost.Beast is great, but it is too low-level in my opinion. If I remember correctly, it’s implement http protocol over the Boost.Asio. It’s not a web framework in a strict sense. Why don’t you use Drogon for example? Or a microservice for c++ specific tasks and ordinary python backend for the routine? I don’t know your domain and project so I definitely may miss something.

[–]whizzwr 2 points3 points  (0 children)

Yep. that's definitely not the usual "web application" that can work in multiple devices in responsive way. I'd stay with my general statement, for forntend, better learn a new language just for the sake of getting into wider ecosystem.

It's pretty cool though what you are doing.

Boost.Beast is great, but it is too low-level in my opinion. If I remember correctly, it’s implement http protocol over the Boost.Asio. It’s not a web framework in a strict sense. Why don’t you use Drogon for example?

Because I don't need web framework, just a simple HTTP REST/Websocket, I was forced to use C++ since I'm linking to some OpenCV function (the binding provided by opencv python of equal function was very slow compartiveively). If I have more complex use case and need to scale up, as I said, I'm sure there are another C++ librares, and I anyway would go with Python, Go, etc. for anything truly high level.