Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import sbt.Tests.{Group, SubProcess}
// java incompatibility is probably not an issue, hopefully we can cross build flink 1.17 & 1.18 without code changes

lazy val scala_2_12 = "2.12.18"
lazy val scala_2_13 = "2.13.14"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the simplicity of one scala version. But if it is not possible to be 2.12 with play, this is workable for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah 2.12 is not possible with play unless we go with a much older release. 2.9.x that is on the akka fork of the project. I think it might be better to use play 3.x and hence scala 2.13 here.


// spark deps: https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.12/3.5.0
// avro 1.11.2, jackson: 2.15.2
lazy val spark_3_5 = "3.5.1"
Expand Down Expand Up @@ -48,7 +50,7 @@ inThisBuild(
lazy val supportedVersions = List(scala_2_12) // List(scala211, scala212, scala213)

lazy val root = (project in file("."))
.aggregate(api, aggregator, online, spark, flink, cloud_gcp)
.aggregate(api, aggregator, online, spark, flink, cloud_gcp, webservice)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename to "hub"? That is likely also the name we will use when we market to end-users
hub is a place for job tracking, monitoring - data and system quality, fetcher playground, authoring etc.

I am imagining this folder will evolve to encompass all of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I like hub. Lets go with that

.settings(name := "chronon")

val spark_sql = Seq(
Expand Down Expand Up @@ -177,6 +179,18 @@ lazy val cloud_gcp = project
libraryDependencies ++= spark_all
)

lazy val webservice = (project in file("webservice"))
.enablePlugins(PlayScala)
.settings(
name := "webservice",
// play dropped support for Scala 2.12 in release 2.9
scalaVersion := scala_2_13,
libraryDependencies ++= Seq(
guice,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test
)
)

ThisBuild / assemblyMergeStrategy := {
case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
case PathList("META-INF", _*) => MergeStrategy.filterDistinctLines
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.5")
13 changes: 13 additions & 0 deletions webservice/app/controllers/FrontendController.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package controllers

import play.api.mvc._

import javax.inject._

@Singleton
class FrontendController @Inject() (val controllerComponents: ControllerComponents) extends BaseController {
def home(): Action[AnyContent] =
Action { implicit request: Request[AnyContent] =>
Ok(views.html.index("Welcome to the Zipline homepage!"))
}
}
12 changes: 12 additions & 0 deletions webservice/app/views/index.scala.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@(message: String)

<!DOCTYPE html>
<html lang="en">
<head>
<title>Chronon Home</title>
<link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")">
</head>
<body>
<h1>@message</h1>
</body>
</html>
21 changes: 21 additions & 0 deletions webservice/conf/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This is the main configuration file for the application.
# https://www.playframework.com/documentation/latest/ConfigFile

play.http.secret.key = ${?PLAY_HTTP_SECRET_KEY}
play.i18n.langs = ["en"]

# Database configuration
# ~~~~~
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
# db.default.driver=org.h2.Driver
# db.default.url="jdbc:h2:mem:play"

# Evolutions
# ~~~~~
# You can disable evolutions if needed
# play.evolutions.enabled=false

# You can disable evolutions for a specific datasource if necessary
# play.evolutions.db.default.enabled=false
4 changes: 4 additions & 0 deletions webservice/conf/routes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
GET / controllers.FrontendController.home()

# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset)
Binary file added webservice/public/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.