Cross-platform Features
Cross-platform Features
Cross-platform Features
We highly recommend using our SDKs over calling our REST API directly. Our SDKs implement multiple performance enhancements that significantly improve reliability, reduce latency, and minimize network overhead. These optimizations are built into each SDK, so you get the benefits automatically without any additional configuration.
backend raw (non-data stream/replicator) SDK improvements
frontend SDK improvements
Our SDKs support persistent WebSocket connections that deliver ultra-fast request handling. Unlike traditional HTTP requests that require establishing a new connection for each API call, WebSocket connections minimize connection overhead, provide quicker flag evaluation times, and eliminate the need to re-establish connections for every API call.
The SDKs automatically handle network outages and connection drops by detecting disconnections and seamlessly re-establishing the WebSocket connection in the background. This ensures your application continues to operate reliably even when network conditions are unstable, with automatic reconnection happening transparently without any action required from your application code.
This persistent connection architecture significantly reduces latency and improves the overall performance of flag checks and other SDK operations.
Our SDKs implement intelligent event buffering to batch multiple events together before sending them to the Schematic service. This reduces the number of network requests, and allows for event tracking to be asynchronous from the standpoint of your application. All SDKs implement automatic retries on failure, flush events when the application is closed, and handle network interruptions gracefully.
Our backend SDKs cache data locally for a short time to improve performance in request handling. See the specific SDK for information on how to configure or disable this caching.
Additionally, local caching can be configured to use an external cache provider, such as Redis or Cloudflare KV (depending on the specific SDK). This is useful for distributed environments where you may want to share the cache across multiple instances of your application, especially for serverless architectures. See the specific SDK for information on how to configure this.
With WebSocket connections, updates can be pushed instantly from Schematic to your application as Schematic processes plan changes and feature usage. This allows your product to reflect changes in entitlement state in real time.
Automatic real-time updates are avaiable for all Schematic users, regardless of which tier they are on (including Free tier).
Schematic’s Frontend SDKs already implement this functionality, and you don’t need to do anything to enable it. When you call identify the user, the SDK automatically setups a listener to flag changes for the company and user over the WebSocket connection. For our Vue and React SDKs, this will propogate the change into your applciation state anutomatically through the appropriate mechanisms.
Schematic’s backend SDKs implement a similar system (called DataStream) that allows for real-time updates to be pushed from Schematic to your SDK. On load, the SDK will setup a WebSocket connection to improve performance and handle pushing updates to your SDK. Whenever a flag check is made, the SDK will pull the necessary company data from the Schematic API and subscribe to future updates for that company-flag pair. Going forward, this allows subsequent flag checks to be performed locally without an API call to Schematic.
This can be further enhanced by adding local caching so that multiple SDK instances can share cached data and avoid redundant API calls.
Schematic also supports Replicator, a service that will automatically replicate flag data into your infrastructure. This provides 3 key benefits:
To use Replicator, you will need to host a Schematic provided container in your infrastructure and supply a compatible local data store (currently Redis is supported). This container will manage the connection to Schematic and the local data store. You will then enable Replicator mode on your SDK and point it to your local data store. For documentation: