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

Docker for api #53

Closed
katopz opened this issue Aug 27, 2022 · 4 comments
Closed

Docker for api #53

katopz opened this issue Aug 27, 2022 · 4 comments

Comments

@katopz
Copy link

katopz commented Aug 27, 2022

Did we have Docker for api for local implement?

I think we can add Run capability for simple client/helloworld.rs rust client that interact with program we already deploy.
I know this may be out of scope of this project but what we have here is pretty close to rust's playground+solana create already.

FYI: I just having fun playing around here so feel free to say no. :)

@acheroncrypto
Copy link
Member

Can you expand on this? Would love to hear how exactly this would work.

@katopz
Copy link
Author

katopz commented Aug 28, 2022

The title maybe mislead 🤔. It would be "Do api have Run endpoint for rust client? If not (it's not i guess), maybe you can provide current api Docker file so I can I help add that Run endpoint.

I expected something like rust playground + solana related create.
After that in ui should have separated section for both program and client side and run button something like...

image

and when click run it should call https://api.solpg.io/run and get the result back at cli.

Motivation

When user open the repos that contain both program and (simple) rust client. They should able to run both in playground.

Anyway JIT ts and lazy load module should be more suitable (widely used) than rs client example.
But I'm kinda bore to mess with ts so I propose to take care of rust client example instead. 😅

And again, nothing serious here, just itchy to having fun with the playground.

@acheroncrypto
Copy link
Member

Would love to have something like this but I think there are a few problems with this approach.

  1. The server would need the keypair of the user to make this work
  2. The server would need internet access
  3. The server would need premium RPC endpoints on all networks to serve all those requests. Any free RPC provider would block the IP since we are sending it from the same location
  4. This would also add lots of load to the server(trying to do as little as possible from the server, that's why we are using wasm for the CLI's even though it would have been much easier to just have a server for it)

TS/JS sounds good for this purpose to do everything in the client. For now though, the main goal is to do the tests from the UI to have a different value proposition.

This would be great to return back to when browser tooling for Rust improves and we can do most if not all of these from the client.

@katopz
Copy link
Author

katopz commented Aug 28, 2022

  1. i can see nearly most example and test use new KeyPair() in ts or embed byte keypair in rs which mean it should be fine for example purpose on devnet and maybe some serious warning (or blocking) for mainnet

2. 3. 4. Can be address with money or subscription (no joy), anyway I'm agree we should get back to this when things viable.

I will try POC ts way while wait. 👍

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

2 participants