Posts for: #Cats

Moving away from a legacy system using Scala and Kafka - Part 1

My team at Canal+ is building a new media asset management (MAM) platform. To put it simply, Mediahub, our platform, stores video files and information regarding these files:

  • Technical information (how many audio channels does this video have? what’s the video’s resolution?)
  • Editorial information (is it a movie? A show? A TV series episode? Who is speaking in the sequence? What about?)
  • Legal information (when can we air this content? When did we acquire this contract?)

On top of storing and exposing tools to manipulate video files and their related metadata, Mediahub allows third parties to send us new content that can be shipped to VOD platforms and TV channels. A built-in workflow orchestration engine takes care of receiving, quality-checking, assembling and shipping footage. The platform can execute hundreds of these workflows concurrently and treats more than 3000 workflows a day.

[Read more]

Functional error handling with monads, monad transformers and Cats MTL

The way we deal with failure in most OOP applications is itself a common source of unexpected behaviors. I believe exceptions and try/catch statements are overused. Most of the time, it isn’t obvious what a method might throw and when. Edge cases should be treated with the same amount of caution, if not more, than the rest of the code, yet they are rendered invisible by error-handling mechanisms that hide failures instead of highlighting them.

[Read more]