Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype a contract that implements the reverse proxy pattern #11286

Open
nagisa opened this issue May 10, 2024 · 0 comments
Open

Prototype a contract that implements the reverse proxy pattern #11286

nagisa opened this issue May 10, 2024 · 0 comments

Comments

@nagisa
Copy link
Collaborator

nagisa commented May 10, 2024

In order to scale contracts horizontally it is necessary to split it and the state up between shards. However that also implies that the contract will need to be called in a special way depending on what shard(s) the state is in, and require an extra effort from the contract developer to implement necessary state sharing between shards through cross-contract calls.

For the user-facing interface at least this can still be unified to an extent by having a contract that acts just like an nginx reverse proxy, using arbitrary logic to redirect the requests to a contract shard according to e.g. account id. This introduces an overhead of a cross-function call to each call but keeps all the nice properties that we expect of a single shard contract today (from the user API standpoint.)

We should draft an sample demo/example contract that contract developers could use to draw inspiration on how to scale past the confines of a single shard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant