watermark-service

module
v0.0.0-...-debbccd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2020 License: GPL-3.0

README

Serverless/Cloud-Native watermark-service

A global publishing company that publishes books and journals wants to develop a service to watermark their documents. Book publications include topics in business, science and media. Journals don’t include any specific topics. A document (books, journals) has a title, author and a watermark property. An empty watermark property indicates that the document has not been watermarked yet.

The watermark service has to be asynchronous. For a given content document the service should return a ticket, which can be used to poll the status of processing (e.g.: Status: Started, Pending, Finished). If the watermarking is finished the document can be retrieved with the ticket. The watermark of a book or a journal is identified by setting the watermark property of the object. For a book the watermark includes the properties content, title, author and topic. The journal watermark includes the content, title and author.

Examples for watermarks:

{content:”book”, title:”The Dark Code”, author:”Bruce Wayne”, topic:”Science”}

{content:”book”, title:”How to make money”, author:”Dr. Evil”, topic:”Business”}

{content:”journal”, title:”Journal of human flight routes”, author:”Clark Kent”}

Tasks

Implement the Watermark-Service using RESTful APIs in microservice-oriented model, meeting the above conditions.

  1. A microservice for watermarking and returning the ticket-id API and user authorization API. Users allowed: SuperAdmin, Default
  2. A microservice for retrieving a book by its ticket-id when finished.
  3. An API for retrieving the statuses by its ticket-id
Note

Provide sufficient Unit-Tests to ensure the functionality of the service by giving enough logging output monitoring various (10 books, 10 Journals) asynchronous watermark processes identified by a unique ticket-id.

Use Golang/gRPC stack, MongoDB

A test script wrapper in the root directory running the tests, like runWatermarkTests.sh

Setup a local development environment of your choice based on Kubernetes (Minikube, Docker for Desktop, OKD, K3s, microk8s, etc..)

Nice To Haves:

Create test scenarios for following typical microservice patterns:

  • Ambassador API Gateway (Facade Pattern)
  • Circuit Breaker
  • Mirroring
  • Canary Deployments
  • Alerting with Grafana
References and samples:

See impressive sample for some of these service mesh features here https://github.com/DerSalvador/demo-mesh-arena

Knative CloudEvents Sample here https://github.com/DerSalvador/eventing-contrib.git

Conribution:

Issue Tracker: https://trello.com/b/tuDO5DYR/watermark-service-application

Directories

Path Synopsis
api
v1/pb/db
Package db is a generated protocol buffer package.
Package db is a generated protocol buffer package.
v1/pb/watermark
Package pb is a generated protocol buffer package.
Package pb is a generated protocol buffer package.
cmd
authorization command
database command
watermark command
util
Package logrusutil implements some helpers for using logrus
Package logrusutil implements some helpers for using logrus
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL