Hi dear community,
i am python backend developer and i need to create quite simple product configurator. I read more similar topics in this forum, but I didn’t find question to main crucial question:
Is it a right approach to prepare this configurator with parametric objects on the server?
I mean to architecture: Babylonjs on frontend with GUI and after clicking / changing values of configurator BJS send POST request to server, server update parametric model (e.x. OpenSCAD) and export it to STL. BJS send GET request and update scene with this updated model.
I think that this model will work, but I am not sure if it is a good approach.
I mean performance question, smoothness of working with configurator and a lot of other aspects depending on the architecture described above.
As a backend developer I have limited experiences with frontend development and “client / server” approach is closer for me, but of course, it must be correct approach for my project.
Thank you for your opinions.
1 Like
So this is like, if I made a game, sending mouse move inputs to the server, the server sends the data to Blender, Blender moves around all objects, exports a glb, and the server sends back the new glb which Babylon has to load again.
Maybe if your “product configurator” is some sort of level editor and you want some sort of hot-reloading, sth like that. But this cannot be for realtime/production, can it?
Can you describe your product configurator in more detail?
2 Likes
As Joe_Kerr mentioned, if you’re going through an entire,
send to server → update/export model on server → send entire model back → display the model
It’s gonna take a lot of time for each update.
A common approach for this is: maintain a mirror of the parametric state on both your client and server.
Make some serializable commands that can modify that parametric state.
Make the changes according to user input on the client and send the command to server to change the parametric state there as well.
Sync your client + server from time to time in case the states diverge for whatever reason.
you’ll prolly need to make the parametric state → model function in the frontend too for that, in babylonjs, if you only have that in the backend.
this way you get instant updates on the frontend. and the server has a reproducible record of all that happened + an updated parametric state.
2 Likes
Guys, i really thanx for your point of views.
I felt that it isn’t good idea and now i have feedback from more experienced users 
(i forgot wrote fact, that output from order will be technical draft, but now i know that better way will be generate it after submitting order).
Thank you for your time, knoweledge and goodwill.
1 Like