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

Create HTTP API #69

Closed
epost opened this issue Oct 11, 2018 · 4 comments
Closed

Create HTTP API #69

epost opened this issue Oct 11, 2018 · 4 comments
Assignees

Comments

@epost
Copy link
Member

epost commented Oct 11, 2018

Let's stick a simple HTTP API on top of this.

Proposal: put this in a dir http/ in addition to cli/, doc/, etc.

(Let's also consider for a second doing this using a petrinet and typedefs, because it's such a simple use case, although we don't want it to hinder progress.)

Ryan comments:

Both Java AQL and Haskell AQL support reading an AQL file on stdin and emitting HTML/text out.

@marcosh
Copy link
Contributor

marcosh commented Oct 18, 2018

@epost which endpoints did you have in mind exactly? just one which exposes via HTTP the CLI behaviour?

Do you have in mind a specific web framework?

@wisnesky
Copy link
Contributor

wisnesky commented Oct 18, 2018 via email

@epost
Copy link
Member Author

epost commented Oct 18, 2018

@marcosh For now, a web version of the CLI seems like a decent place to start. I don't have any particular framework in mind yet; recommendations are welcome. We do work closely with Arian van Putten of Servant fame, and I'd be interested to look into that too, esp. considering our Typedefs work, but I'm not sure how suitable that is for this use case.

@marcosh
Copy link
Contributor

marcosh commented Oct 18, 2018

At the moment, if the signature of the endopoint is String -> String, Servant looks a bit too heavyweight for the task. But, if we would like to evolve to a more typed version, it could definitely be more future proof. Other pros for Servant: it is the the web framework I'm more used to and it gives you endpoint documentation almost for free, which is super cool for a public API.

On the other hand, if we want to start with something simpler, we could use https://hackage.haskell.org/package/scotty-0.11.1

@marcosh marcosh self-assigned this Oct 22, 2018
marcosh added a commit that referenced this issue Oct 23, 2018
marcosh added a commit that referenced this issue Oct 24, 2018
@wires wires added this to In progress in First Release Oct 29, 2018
@wires wires moved this from In progress to Reviewer approved in First Release Oct 29, 2018
@epost epost closed this as completed Oct 29, 2018
First Release automation moved this from Reviewer approved to Done Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
First Release
  
Done
Development

No branches or pull requests

3 participants