project-m36 icon indicating copy to clipboard operation
project-m36 copied to clipboard

Pull query AST into separate library

Open 3noch opened this issue 8 years ago • 2 comments

I just realized that with very little work I could have my GHCJS front-end build up Project:M36 queries directly. It could then send them to a websocket on my server and get the results directly. All the serialization/deserialization would be done automatically. I know Project:M36 already has a websocket server, but this would allow me to do 2 key things:

  1. Generate the AST on the client directly.
  2. Rely on my application's authentication (which happens via JWT in a header).

However, GHCJS can't currently build Project:M36 because it has so many heavy server-side dependencies. If the AST types were in a separate library, I could share them between the back end and the front end.

3noch avatar Sep 16 '17 00:09 3noch

Indeed, some sort of GHCJS integration would likely be beneficial. It could even be possible to build the entire relational algebra engine in GHCJS (without persistence, of course).

However, for broad appeal, I chose to make a simple JS library. I was thinking that the JS library could be improved to allow the user to build up a JS-style ADT, in the short-term at least.

agentm avatar Sep 16 '17 16:09 agentm

Having the JS library is certainly valuable. I'm only advocating for yet another option, GHCJS.

3noch avatar Sep 16 '17 16:09 3noch