Remember Alex from our authentication story? Now that they’re connected, the cloud creates a UserSession - their personal command center. Think of it as a smart assistant that manages everything happening with their glasses.
// App requests a photophotoManager.requestPhoto();// Photo arrives from glassesphotoManager.on('photoReceived', (photoData) => { // Process and distribute to requesting app});
const session = new UserSession(userId, websocket);// All managers are initializedsession.appManager = new AppManager(session);session.audioManager = new AudioManager(session);// ... etc
Now that you understand UserSessions and their managers, let’s look at the messages that flow through the system. These messages are how all the components talk to each other!