Control Blender from external application

Hello … I have been researching Blenders command line parameters, as well as the API and Python usability.

The main objective I’m trying to figure out is if/how I can control Blender from another application. Basically … repeated calls from external application to create and continuously modify the existing scene and its objects.

I know I can start Blender with command line arguments and pass a python script. If I make repeated command line calls, it seems that starts up a new instance of blender each time I run command line. If I use the -b background arg, them blender will close when the script is complete.

Is there an approach where I can activate blender with a script or expression or API call and create an object (cube). Then while keeping that instance of blender active (with its scene/contents) and then make a subsequent call, add another object (ball) to the existing scene. Then perhaps in another subsequent call, transpose the cubes position and/or balls position???

Appreciate any advice on a strategy or approach that might achieve the desired control I’m attempting to describe above.

Cheers!

When I tried to remote control Blender using a scene handler and a sqlite database, it crashed most of the time…