The id is set by the client, i.e you, and the engine will response with the same id to your request. That's how to link requests to responses.
Handles are pointers to objects on the server. The two standard ones, -1 is for the Global class and 1 for the App class. As you open new objects or create new objects the Engine will response with new handles as you keep opening / create objects.
Here is a full example on how to reload an app