In this post, I want to talk about an event-driven image processing pipeline
that I built recently using Knative Eventing.
Along the way, I’ll tell you about event sources, custom events and other
components provided by Knative that simply development of event-driven
architectures.
Requirements
Let’s first talk about the basic requirements I had for the image processing pipeline:
- Users upload files to an input bucket and get processed images in an output
bucket.
- Uploaded images are filtered (eg. no adult or violent images) before sending
through the pipeline.
- Pipeline can contain any number of processing services that can be added or
removed as needed. For the initial pipeline, I decided to go with 3 services:
resizer, watermarker, and labeler. The resizer will resize large images. The
watermarker will add a watermark to resized images and the labeler will
extract information about images (labels) and save it.
Requirement #3 is especially important. I wanted to be able to add services to
the pipeline as I need them or create multiple pipelines with different services
chained together.
Read More →