asp.net - Distributed networks with microservices -
i'm reading lot microservices , there use cases. azure service fabric great framework develope such services.
i found nice usage pattern service fabric:
in example there 1 microservice type representing user reliable stateful actor. each user instance of service.
so if have thousends of users, have thousends of actor instances. in facebook can update feed , feed of friends easy. example, state of user actor service stores social feed , social feed of friends entries of our social states. makes easy these informations fast low latency display , on.
that working well, because user hasn't thousends of friends. know store public feed entries of social states users available? e.g. iterate on user actor instances , alle states. would't fast, because have find actor instances , on. there pattern or best practice that? maybe stateful service type representing social states available public? when user updates social state, automatically update feed of friends in service fabric example , update "public" feed if new social state public. every user can (maybe filtered) public social states in addition own feed , friends feed.
would way implement such function? client (user) connect actor service instance , request whole feed. actor service instance connect public service instance , request filtered public feed entries. actor instance merge these entries own entries , give user display data. or should client connect each servcie (the public service instance , user actor service instance) directly , results merged on client side.
client --getfeed--> useractorservice --getfeed--> publicservice
or
--getfeed--> publicservice client| --getfeed--> useractorservice
if know best practices or trade offs such problems, please point me in right direction.
Comments
Post a Comment