Release 18 introduced API support for replicating public functions into private environments. UI support for this feature is planned for Release 19 or 20. Function replication enables users to create a copy of a function from one instance, tenant, or environment to another or from a public tenant into their tenant or environment.
Key Benefits
This feature addresses two primary use cases:
- Modification and Re-Training: If your system uses a different model than the one the function was trained on, replicating the function locally allows you to adjust it using the UI or re-train it to align schemas with your underlying APIs.
- Control and Compliance: Using public functions requires trusting the owner to avoid introducing breaking changes or malicious actions. In cases of compromise, there is a risk of harmful modifications, such as rerouting data to a different destination. For customers with strict compliance needs, replication offers the ability to explore APIs and implement use cases using public functions while transitioning to production with locally replicated functions. Customers can also periodically pull updates from public functions after careful inspection. While public function owners cannot see your function traffic, they could modify the function to redirect traffic. Replicating functions mitigates this risk.
Drawbacks
The main drawback of this feature is the added responsibility of administration. Once a function is copied, you assume responsibility for maintaining it. This responsibility can be minimal if the underlying API is stable but may require ongoing maintenance if the API is evolving.
How It Works
Currently, replication is available via the API, with UI support coming soon. Using the API, you can leverage the designated endpoint to replicate the function. The environment linked to your PolyAPI key determines the replication destination. When UI support becomes available, users can log in, navigate to /canopy/polyuria/collections/public-API-functions/{id}, and use the replication button on the details page for public functions.
Our Vision for Function Replication
We aim to make training and managing API functions in Poly simpler and more efficient. Future enhancements include:
- Update Alerts: Notifications about function changes and lifecycle transitions, such as moving from production to deprecated.
- Function Locks: Allowing public function owners to lock functions so that any changes create new versions. This provides users with stability and predictability.
- Drift Detection and Pull Requests: Automatically detecting runtime differences and generating pull requests to streamline administration.
- Tenant-Specific Schemas: A conceptual idea to allow the same function to display customized schemas for each tenant, ensuring a tailored view for every environment.
Learn More
Want to explore public functions further? Sign up for free to experience Poly firsthand. We’d love to hear from you if you have questions about our roadmap or platform. Contact us at hello@polyapi.io or fill out our contact form. Stay tuned for future updates by following us on LinkedIn or signing up for our Newsletter as we continue to innovate and refine our platform to meet your evolving needs.