Friday, 8 May 2020

Any suggestion for improvements, or any better idea on how to use Kafka?

Ok, so I came up with this use case, but I am pretty sure there are some design issues and I was wondering if you could suggest some improvements or suggest a completely different thing:API #1: allows you to create, edit, delete and get user profiles (id, username, hashedPassword, firstName, lastName, preferedLocale (country, language), profilePicture(id, booleanPrivacy), numberOfImagesPosted)API #2: allows you to create, edit, delete and get images (id, binaryData, created, modified, description, category(id, fullName, shorthand)Kafka: updates numberOfImagesPosted every time the user posts.Now, some issues: I am not sure if category or tags are implemented as a many-to-many relationship between images and category; I am not sure how to implement the Provider and Subscriber to insure data integrity (if I implement it as a counter, but the server crashes, the counter won't be in sync); I am not sure about the field names; I am not sure if I should add more fields, I am wondering how PINTEREST implemented their image API.

Submitted May 09, 2020 at 05:45AM by jasonscript

No comments:

Post a Comment