Skip to content

Implementing known issue in first stage. #1

@smdmts

Description

@smdmts
  • remove Future's using monix [https://monix.io].

    • remove ExecutionContext as well.
  • using airframe more deeply insight [https://wvlet.org/airframe/docs/index.html]

    • The following lines might not be good.
    1. session.start
      val service = session.build[HttpService]
      // initialize db.
      // val dbConfig = inject[DBConf]
      // dbConfig.initialize()
      // refreshable after initialized db.
      // CacheModules.refresh()
      Http().bindAndHandle(service.routes, "127.0.0.1", 8080)
      } finally {
      session.shutdown
    2. class HttpModules(implicit ec: ExecutionContext) {
      val design: Design =
      newDesign
      .bind[HealthCheckPresenter]
      .toEagerSingleton
      .bind[DebugEchoPresenter]
      .toEagerSingleton
      .bind[EchoController]
      .toInstanceProvider {
      (a: HealthCheckPresenter,
      b: HealthCheckEchoUseCase,
      c: DebugEchoUseCase,
      d: DebugEchoPresenter) =>
      EchoController(a, b, c, d)
      }
      .bind[HttpService]
      .toInstanceProvider { a: EchoController =>
      HttpService(a)
    3. case class LoadCampaignUseCaseImpl() extends LoadCampaignUseCase with LogSupport {
      val aRepository: CampaignRepository = bind[CampaignRepository @@ String]
      val bRepository: CampaignRepository = bind[CampaignRepository @@ String]
  • implementing 2-phase commit using scalikejdbc

    • multi database with connection-pool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions