mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-01 08:48:46 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
30 lines
1.2 KiB
Scala
30 lines
1.2 KiB
Scala
package com.twitter.product_mixer.core.pipeline.recommendation
|
|
|
|
import com.twitter.product_mixer.core.model.common.UniversalNoun
|
|
import com.twitter.product_mixer.core.model.common.identifier.RecommendationPipelineIdentifier
|
|
import com.twitter.product_mixer.core.pipeline.Pipeline
|
|
import com.twitter.product_mixer.core.pipeline.PipelineQuery
|
|
import com.twitter.stitch.Arrow
|
|
|
|
/**
|
|
* A Recommendation Pipeline
|
|
*
|
|
* This is an abstract class, as we only construct these via the [[RecommendationPipelineBuilder]].
|
|
*
|
|
* A [[RecommendationPipeline]] is capable of processing requests (queries) and returning responses (results)
|
|
* in the correct format to directly send to users.
|
|
*
|
|
* @tparam Query the domain model for the query or request
|
|
* @tparam Candidate the type of the candidates
|
|
* @tparam Result the final marshalled result type
|
|
*/
|
|
abstract class RecommendationPipeline[
|
|
Query <: PipelineQuery,
|
|
Candidate <: UniversalNoun[Any],
|
|
Result]
|
|
extends Pipeline[Query, Result] {
|
|
override private[core] val config: RecommendationPipelineConfig[Query, Candidate, _, Result]
|
|
override val arrow: Arrow[Query, RecommendationPipelineResult[Candidate, Result]]
|
|
override val identifier: RecommendationPipelineIdentifier
|
|
}
|