-
Notifications
You must be signed in to change notification settings - Fork 2
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
Frontend <> Backend communication #20
Comments
Yes, building the AST in JS only made sense as long as the AST could immediately be executed there too. |
I vote for Option 1 too. I additionally vote for using JSON as the output as it's easier to use in the frontend than parsing some CSV output. We can live without progress reports, and if we need it later we can get hacky then. |
Do we drop the JS CSV parser? If yes, do we use the backend to figure out the shape when we load a file? |
Good point, @edongashi. We either need another parser for the GUI or need to extend the Reference with an endpoint that returns a schema... |
I say we do the CSV parsing only in the backend/reference tool. |
This seems settled (at least for now). |
We need to agree on the way the Frontend communicates with the Backend.
Since transpiling the reference code to JS resulted in poor performance, the anonymization code will stay in dotnet.
Furthermore, I don't think it is a good idea to manually build the query AST in JS land. It couples the Frontend and Backend internals too much. Sending a SQL statement feels cleaner.
As input we send: filename, query statement, anonymization settings.
As output we get: query result or an error.
Option 1: anonymize using the CLI.
We pass the input as command-line arguments , we get back the query result (as either CSV or JSON) in the stdout stream or we get an error in stderr stream.
PROs:
CONs:
Option 2: anonymize using IPC.
We will need an additional .NET project in this repository that loads the core reference library and dispatches anonymization requests to it. We pass the input as a JSON object and we get back a JSON object with the result or error. We need to decide if we use a socket or the process stdio streams for message exchange.
PROs:
CONs:
I am slightly in favor of Option 1 (I don't consider the drawbacks for it too big).
The text was updated successfully, but these errors were encountered: