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

Find out how to connect backend and frontend #7

Closed
eperinan opened this issue Sep 6, 2017 · 8 comments
Closed

Find out how to connect backend and frontend #7

eperinan opened this issue Sep 6, 2017 · 8 comments
Assignees
Labels
Milestone

Comments

@eperinan
Copy link
Contributor

eperinan commented Sep 6, 2017

The frontend will be written in Javascript and will consume metrics from "opscenter" backend written in Scala.

This backend would be able to export metrics while HTTP2 with websocket or RPC with protocol buffer.

In this issue we will have to decide what protocol we are going to use.

After it, we will have to define the structure of the data that we are going to export from backend and we will create a mock to work with it while the backend guys work on it.

Note: This "opscenter" backend is not implemented yet.

@eperinan
Copy link
Contributor Author

eperinan commented Sep 6, 2017

I will create a small PoC with a backend in Scala and Frontend in Angular to show the solution that I would choose.

When the sprint will be done, I will show it if all works fine

@juanpedromoreno
Copy link

Maybe I'm missing some parts, but let's simplify this investigation.

I'd suggest doing first the connection between frontend and the http layer (I'm afraid pure javascript only understand about http connections). The http layer, in this case, might be publishing some data through WebSockets or whatever fits better, something that javascript would understand. Later on, down the road, we could add more layers under it, using kafka, rpc, microservices, etc.

@eperinan @raulraja thoughts?

@eperinan
Copy link
Contributor Author

eperinan commented Sep 14, 2017

Totally agree with you @juanpedromoreno

I just created a new branch to implement this issue called ep-7-connect-backend-frontend.

Yesterday I pushed a couple of commits with a new module called freestyle-opscenter. I implemented a websocket through akka-http and I am exporting some metrics from a local file.

After migrate the current code to freestyle, I will send the PR

Commit: 0121666

@rafaparadela
Copy link
Member

Writing the client part in ScalaJS can be an option?

@juanpedromoreno
Copy link

Not at this moment, until this issue is solved: higherkindness/mu-scala#21

@eperinan
Copy link
Contributor Author

Apart from that, in this issue, we had the discussion about what we wanted to do with the client @rafaparadela #5

@eperinan
Copy link
Contributor Author

In this commit I have the first approach 78bfea2.

When I migrate that code to freestyle in these days, I will submit the PR

@eperinan
Copy link
Contributor Author

This issue was implementing using akka-http. As PoC it is cool but to continue with the development, we should to choose a framework purely functional.

The goal of this issue is done and @calvellido can work with a stream from the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants