CodeLionX / actordb

Actor Database System Framework using Akka
MIT License
0 stars 2 forks source link

Provide default empty start message for SequentialFunctor #120

Open CodeLionX opened 6 years ago

CodeLionX commented 6 years ago

Issue

Users have to define their own start messages. The framework could provide a singleton message for start messages without any data and create the type alias in the framework:

import de.up.hpi.informationsystems.adbms.function.SequentialFunctor.StartMessage

val functor = SequentialFunctor()
  .start( (_: StartMessage) => _, _ )
  .end(identity)

Problem Description

Creating an empty start message for a SequentialFunctor is tedious:

sealed trait StartMessageType extends RequestResponseProtocol.Message
case object StartMessage extends RequestResponseProtocol.Request[StartMessageType]
type StartMessage = StartMessage.type

val functor = SequentialFunctor()
  .start( (_: StartMessage) => _, _ )
  .end(identity)

Supporting Information

see above