How to replace parallel async calls between micro services with event based communication

A service A needs to access services B, C and D to process a request. Currently this is implemented as parallel async calls from A to B, C and D. Once all of them has responded, service A follows some business logic to create a final result from partial results received from B, C and D. The final result is then written to a DB.

The async parallel communication scheme above has to be replaced by the event based communication shown below

I want to use a message broker (e.g. Kafka) and implement event based communication between the micro services. Upon arrival of a request, A should publish an event with appropriate payload. B, C and D being subscribers, will receive the event and start working on it in parallel. Each of them will publish their respective results with appropriate event codes. My question is, how to combine the partial results from events published by B, C and D?

In the previous approach, A had the luxury to accumulate partial results from each of async calls. But in the event based approach, A only publishes the request_arrived event. So locally accumulating inside the service is not an option.

Can Android device be used as USB webcam for full-HD, 30fps video source for Skype calls via PC?

Have found some apps that allow an Android device s.a. a Smartphone with good camera to be used as a USB webcam, when used of ADB over USB. However they seem to limit the video source to be fairly low quality i.e. mostly little better than VGA or if higher-resolution then at low fps.

Is there anyway to tether an Android device to a PC, over USB while using the device camera as a USB webcam working at FullHD (1080p) at 25-30fps, that could be used for doing Skype (or Skype for Business) calls ? I would like to use this setup for a live-demo. I know that I could go out and buy a dedicated webcam, but trying to avoid it if possible. My PC has an inbuilt cam, but it is 720p (not very good) and for the demo I need to be able to tilt, swivel, pan the camera – not very convenient when using inbuilt PC webcam, but fairly easy for an Android phone, mounted on a tripod.

If you have two recursive calls in a function and one terminates before the second how do you calculate the time complexity?

Suppose you have a function which calls to itself twice. So both go down recusively until they reach some condition. But one of them will go less times than the other. For example one would call itself n times until it terminates while the second calls itself merely n-5 times.

How do I go by, calculating the lower bound. I assume, for the upper bound you just go about calculating the bigger path of n levels. But how would you calculate the lower bound?

RPC and Command Calls OR Network messages for syncing variables across Server and Client?

I’m currently making a Unity Multiplayer game that relies on the synchronization of variables across the Server and the singular Client. I’m already able to use [SyncVar] to sync variables from the server with the client, but not the other way around. The thing is, I don’t have a player prefab that spawns in the game. Am I still able to make Command and RPC calls? I tried this code below which didn’t end up working when I played the game. Would Network messages work better for my situation?

bool officeBought = false;  void Update () {     if (!isServer)     {         CmdSendBuildingBought(officeBought);     } }  [Command] public void CmdSendBuildingBought(bool buildingBought) {     buildingBought = true; }