Chapter 6 - Building LiveLink Services

https://leanpub.com/grpc_3dgraphicshttps://leanpub.com/grpc_3dgraphics

Implementing the OpenStage Service

https://leanpub.com/grpc_3dgraphics

Object Lifetimes and RPC Design Choices

https://leanpub.com/grpc_3dgraphics

Why Object Lifetimes Matter in gRPC

https://leanpub.com/grpc_3dgraphics

Choosing Blocking RPCs for Opening a USD Stage

https://leanpub.com/grpc_3dgraphics

Defining the Protocol Buffers Interface

https://leanpub.com/grpc_3dgraphics

Server-Side OpenStage Implementation

https://leanpub.com/grpc_3dgraphics

UsdServer Class

https://leanpub.com/grpc_3dgraphics

MainWindow Integration

https://leanpub.com/grpc_3dgraphicshttps://leanpub.com/grpc_3dgraphics

Client-Side OpenStage Implementation

https://leanpub.com/grpc_3dgraphics

The Maya Plugin Structure

https://leanpub.com/grpc_3dgraphics

CMake Build Configuration

https://leanpub.com/grpc_3dgraphics

UsdClient Class

https://leanpub.com/grpc_3dgraphicshttps://leanpub.com/grpc_3dgraphicshttps://leanpub.com/grpc_3dgraphics

MayaUsd Stage Observer

https://leanpub.com/grpc_3dgraphics

Maya Scene Observer

https://leanpub.com/grpc_3dgraphics

Demo

https://leanpub.com/grpc_3dgraphics

Implementing the Selection Service

https://leanpub.com/grpc_3dgraphics

Proto Update

https://leanpub.com/grpc_3dgraphics

Server-Side Selection Implementation

https://leanpub.com/grpc_3dgraphics

Applying the Selection in the USDViewer

https://leanpub.com/grpc_3dgraphics

Client-Side Selection Implementation

https://leanpub.com/grpc_3dgraphics

MayaUsdSelectionObserver

https://leanpub.com/grpc_3dgraphics

Demo

https://leanpub.com/grpc_3dgraphics

Implementing a Naïve Attribute Streaming Service

https://leanpub.com/grpc_3dgraphics

Server-Side Implementation

https://leanpub.com/grpc_3dgraphics

SetAttributeStream

https://leanpub.com/grpc_3dgraphics

AttributeReaderReactor

https://leanpub.com/grpc_3dgraphics

Applying Updates in MainWindow

https://leanpub.com/grpc_3dgraphics

Client-Side Implementation

https://leanpub.com/grpc_3dgraphics

sendAttributeUpdate

https://leanpub.com/grpc_3dgraphics

serializeUsdAttributeAsync

https://leanpub.com/grpc_3dgraphics

Observing Attribute Changes in Maya

https://leanpub.com/grpc_3dgraphics

Creating a Simple USD Test Scene

https://leanpub.com/grpc_3dgraphics

Semantic Transform Support

https://leanpub.com/grpc_3dgraphics

Protobuf Changes

https://leanpub.com/grpc_3dgraphics

Client-Side Changes

https://leanpub.com/grpc_3dgraphics

Server-Side Changes

https://leanpub.com/grpc_3dgraphics

https://leanpub.com/grpc_3dgraphics

Improving Attribute Streaming Overhead

https://leanpub.com/grpc_3dgraphics

AttributeStreamManager

https://leanpub.com/grpc_3dgraphics

https://leanpub.com/grpc_3dgraphics

https://leanpub.com/grpc_3dgraphics

Implementing a Camera Service

https://leanpub.com/grpc_3dgraphics

Protobuf Changes

https://leanpub.com/grpc_3dgraphics

Client-Side Changes

https://leanpub.com/grpc_3dgraphics

To handle camera streaming, we introduce a CameraStreamManager class that maintains a persistent gRPC stream to the server. The manager initializes the streaming RPC connection in its constructor and provides an enqueue method for queuing camera matrix updates. The trySendNext method checks whether a write operation can proceed to ensure no write is currently in flight and the queue is not empty before sending the next message. Upon completion of each write operation, the OnWriteDone callback removes the sent message from the queue and attempts to send the next one. If a write fails or the stream completes, the manager marks itself as finished and closes the stream.

https://leanpub.com/grpc_3dgraphics

Server-Side Changes

https://leanpub.com/grpc_3dgraphics

Summary

https://leanpub.com/grpc_3dgraphics