Closed vkuznet closed 5 years ago
what are the parts that you'd like to be able to reuse? and at what level?
root-srv/server.Server
application, change the default html page and call it a day?server
value and add new end points?server.PlotH1
, server.PlotH2
, ... ?I could imagine the following API:
package rsrv // import "go-hep.org/x/hep/groot/rsrv"
// PlotH1 returns a JSON payload of the 1-dim histogram extracted from
// the query in the request:
// - file: local/remote path to the ROOT file containing the 1-dim histogram
// to be plotted
// - path: path to the 1-dim histogram to be plotted
// - name: name of the 1-dim histogram to be plotted
func (*Server) PlotH1(w http.ResponseWriter, r *http.Request) { ... }
Sebastien, I think we need option 3 as shown in your example. The server part is trivial in Go and can be different in apps, e.g. someone can run http or https, use different auth layer, etc. The frontend JS libraries may be different among projects as well. Therefore, we need bare APIs to serve plots and/or stats about given list of files. Thanks, Valentin.
On 0, Sebastien Binet notifications@github.com wrote:
what are the parts that you'd like to be able to reuse? and at what level?
- do you want to be able to create a
root-srv/server.Server
application, change the default html page and call it a day?- create a
server
value and add new end points?- just be able to create end points in your own application and associate them with, say,
server.PlotH1
,server.PlotH2
, ... ?I could imagine the following API:
package srrv // import "go-hep.org/x/hep/groot/rsrv" // PlotH1 returns a JSON payload of the 1-dim histogram extracted from // the query in the request: // - file: local/remote path to the ROOT file containing the 1-dim histogram // to be plotted // - path: path to the 1-dim histogram to be plotted // - name: name of the 1-dim histogram to be plotted func (*Server) PlotH1(w http.ResponseWriter, r *http.Request) { ... }
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/go-hep/hep/issues/389#issuecomment-436968235
ok, I'll start something along these lines.
see:
still hugely WIP.
additional ideas/questions that popped up during this first stab:
Sebastien, in terms of additions. I would vote for JSON representation support first. The gRPC may not be required but in a future may pop-up. And, support for other display bakcends is not yet a table. Let's get things working in bare metal.
Do you mind to add all docs to public functions and structs that they will appear on godoc?
Thanks, Valentin
On 0, Sebastien Binet notifications@github.com wrote:
see:
still hugely WIP.
additional ideas/questions that popped up during this first stab:
- gRPC?
- interoperability with other (web) display backends? (e.g. https://github.com/HSF/Visualization)
- JSON representation of histograms for ROOT, YODA, ReAna, HepData, etc...
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/go-hep/hep/issues/389#issuecomment-437446562
Of course. It was really just a first stab to get a very first rough idea of where I was going :)
I'll properly document all of this (especially the upload/open distinction and call order.)
closed by #395
I'm interested in separation of root-srv from html (presentation) layer. The later can be application specific and use different html/css/js tools which will allow to embed root-srv into other web applications which by itself should be possible if root-srv will be served as package/library.