Design document-tag classes with concurrency safety | Amazon Interview Question