Build with Serverless
Oyster Serverless allows users to execute functions without having to go through the process of renting managing an Instance themselves. Users only pay for the time it takes to execute the function. The Serverless protocol requires a set of Instances to always be on standby, ensuring that Requests are served on-demand. These Instances function as shared resources, effectively being 'rented' by multiple users simultaneously.
Requests to execute serverless functions can be submitted via smart contracts or through Web2 APIs. Additionally, the protocol enables users to subscribe serverless requests via smart contracts by scheduling them at regular intervals. The guarantees provided vary depending on the execution mode, and as such, each scenario is addressed by a distinct protocol tailored to its specific requirements.
Web2 Requests
The Web2 solution is ideal for developers whose dApp includes an off-chain component and requires secure computation of serverless functions. With this approach, Web2 API responses can be verified off-chain to ensure that the computation was performed correctly by the designated secure enclave. If you are planning to use Web2 APIs to interact with Oyster Serverless, follow this quickstart guide for a step-by-step walkthrough. This guide simplifies the process, allowing you to quickly and efficiently get started with Web2 API-based interactions.
🗃️ Quickstart
4 items
Smart Contract Requests
Following is the overview of architecture allowing smart contracts to execute serverless function.
Here user smart contract has to be developed as part of dApp, which is going to use the Oyster Serverless. Also, User can directly place requests on the Relay Contract to execute the serverless function. Relay Contract is the complete protocol interface for the User. All the requests and payments are handled by this contract. Follow the quickstart guide to understand the usage.
📄️ Smart Contract Request Execution
Oyster serverless functions can also be executed on blockchain using smart contract methods. More details about the protocol are described here. Following are the instructions to start with an example.
Further, Oyster Serverless offers support for request subscriptions, allowing users to execute serverless functions periodically by initiating them just once at the beginning. The following guide provides a step-by-step walkthrough of a simple use case demonstration.
📄️ Serverless Subscriptions
Oyster Serverless Subscription allows Users to automate periodic serverless requests using smart contract methods. More details about the protocol are described here. Following are the instructions to start with an example.
Tutorial
Explore these tutorials that demonstrate various use cases of Oyster Serverless. Each guide offers step-by-step instructions and practical examples to help you effectively utilize the platform's features, from executing serverless functions to setting up subscriptions and integrating with Web2 APIs.
🗃️ Tutorials
7 items