Process Engine Internals

Please help on below to understand internals of process engine.

1.) Please explain below piece of code? It it mean two processes communicate each other via HTTP and client polling server for a message ? Interesting know how this message piece work internally.

ExternalTaskClient client = ExternalTaskClient.create().baseUrl(“http://localhost:8080/engine-rest”)
.asyncResponseTimeout(10000)
.build();
client.subscribe(“AdlDMNOtherClient”).lockDuration(1000)…

2.) Can process start both sync and async mode ? If process instance started with POST /process-definition/{id}/start will it execute in sync mode ? Is it possible to set variables to above API response ?

3.) Are there any document explaining internals of process engine. Specially how thread management happened internally ?

4.) What are the steps can take to lower the perf bottleneck due to central DB ?