Use observer design pattern. Every user is a class, all the friends are member of the class as a vector/list. when the user update his status, he will send a message to the list of friends. when a user receives an update his friends status, he just updated it.
【在 d*******u 的大作中提到】 : Use observer design pattern. Every user is a class, all the friends : are member of the class as a vector/list. when the user update his status, : he will send a message to the list of friends. : when a user receives an update his friends status, he just updated it.