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

Web tester and protocol buffers api #33

Open
gedw99 opened this issue May 28, 2024 · 8 comments
Open

Web tester and protocol buffers api #33

gedw99 opened this issue May 28, 2024 · 8 comments

Comments

@gedw99
Copy link

gedw99 commented May 28, 2024

Would you like a web tester ( just a simple index.html and a protocol buffers ali server ?

it will make it easy for devs to see how this works.

we can then also do real world testing by rolling out golang clients to 26 locations with fly.io and then from a simple CLI call all of them and hence check they all get the correct answers using the global fly.io network.

@sapics
Copy link
Owner

sapics commented May 28, 2024

Thank you for your advice!
Sorry, I am not good at English, thus, I could not understand your advice well.
Could you please tell me, "what" we need to test?

@gedw99
Copy link
Author

gedw99 commented May 28, 2024

Hey @sapics

no problem. May English is pretty bad and I am English :)

At the moment everything is just CSV files, which are highly useful, but not easily usable yet.

I would like to extend this to provide a usable API using standard golang HTTP API. No complex dependencies.

There are many ways to do this, and I am just starting up the conversation around it.

@sapics
Copy link
Owner

sapics commented May 28, 2024

Looks great! As you noticed, HTTP API is much easier to use.
If such an API were created, many people would be very pleased!

@gedw99
Copy link
Author

gedw99 commented May 28, 2024

How about this ??

  1. First the data layer

this is just a CLI to get a feel for the query. works well.
go install github.com/mithrandie/csvq@latest

THIS is the golang driver: https://github.com/mithrandie/csvq-driver

It's slow but good enough for now.

  1. Then the REST API that uses the csvq-driver, and returns the data.

Just type with JSON Serialisation.

  1. Then Web Components GUI that uses no JS using the DSD Web Components.

maybe 10 lines of code that displays the forms variables, posts the form back, parses the values into the API layer, and then pushes a WebCompnent back from the Server with the results.

https://github.com/ryoid/go-streaming-html-ooo


Later add a SQLITE DB to replace the CSV. Can easily make a loader to load the CSV into the SQLIte.

@sapics
Copy link
Owner

sapics commented May 29, 2024

I know little about golang, thus, it is difficult to discuss whether that is a good approach or not.
Either way, the HTTP API is very useful, so it would be helpful if you could share a link to the HTTP API in this issue.
Also, if you could describe how to use the HTTP API, I would be happy to share it in a README or similar.

We also think it would be useful to create it in SQLite, so we would like to create a link to that as well, when you publish it.
However, we would like to keep the data in CSV format for existing users.

@gedw99
Copy link
Author

gedw99 commented May 29, 2024

Ok thanks for the reply and letting me know about your opinions about how useful this would be for other devs.

I could publish it on my repo and set it up so that it pulls the csv files from your repo.

does that sound like a good plan ?

@sapics
Copy link
Owner

sapics commented May 30, 2024

Thanks! Looks great!

@gedw99
Copy link
Author

gedw99 commented May 31, 2024

Ok let me get to it. A bit snowed under right now.

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