I'm starting on a Discuss https://disqus.com like Spring Boot application.
- A user can create circles (Communities/Group)
- A user can subscribe/unsubscribe to/from a circle.
- User can post document/image/video to a circle or individual user
- Each user have an inbox feed
Designed for high user activities with high scalability requirement, I'm closing down to Activity Streams (W3C Activity Stream 2.0) with Kafka as the backbone.
I have a distributed cloud native Microservice architecture already set up (Spring config server, API gateway, Eureka Discovery) with Angular 2.0 frontend.
I'm researching on Kafka and would like your views on how I should go about the architecture and design to meet my requirements.
To be specific:
The Kafka producer is responsible for converting activities send via HTTP into POJO based on Activity 2.0 specification and publish it to Kafka. How should I design the publisher to handle, say a million of messages per second.
Consumers are different services, such as Circle Service, Recommendation Service, User service, and so on. My naive thinking is to make these services subscribe to a topic and pull out only those messages they are interested in. For example, if a user posts to a circle, the Circle Service will use it to make copies and distribute to all users of that circle. Another concern here. If a circle contains, say 1000 users, what will be the best approach to make the copies?
Thanks in Advance.