Open social network (OSN network) Four: OSN network operating principle

  When the enterprise server to join the OSN network node to the form, the user how to communicate with users outside the enterprise server other?
Suppose there are two APP1 and APP2 APP joined the OSN network, we assume that in order to facilitate micro letter called APP1, APP2 called unfamiliar street, APP1 server is S_WX, APP2 server is S_MM.
  Now I'm (Alice) is a micro-channel users, I have a friend (Bob) using unfamiliar street.
  First, Alice sends a message to the terminal through S_WX, this message is sent to Bob.
  The second step, S_WX Bob will look inside the server is online, offline command is sent to find someone in the whole network (for the first time will be sent directly to send a message to Bob's second waits 10 minutes, 10 minutes after the news did not take it will take to find someone to send commands).
  The third step, after S_MM message is received, it will pick up a part of Bob's message list, and then tell Bob, who have sent a message to Bob.
  The fourth step, Bob screening their future message needs to delegate S_MM retrieve the message.
  The fifth step, after Bob has taken to obtain information to send a message of reply, so Alice and Bob to complete the cross-communication software.
If the message for a long time on the server is not removed, the server can set a retention time, it is recommended for seven days or a month.
  
  How users add friends?
  Since each account system APP systems differ, generate account designated by the server, is not conducive to the promotion of OSN network. Thus OSN network using the user terminal generates a random form survival account. For details, see the account generation method published on github. If present, enterprises already have their own system of accounts, two accounts can be a bind, you can complete compatibility.
  There are three ways to add a friend.
  The first is a mutual exchange account. This is similar to the way the two sides exchanged phone numbers. The two sides have been added in order to communicate with each other after the other two-dimensional code. We recommend that end-user for strange messages given to rejected.
  The second way is to send commands at the end of the account to know each other cases. To complete the case of this approach requires additional servers and endpoint policy receives join command.
  The third way is introduced by an acquaintance. Suppose there are three ABC, AB awareness, BC understanding. AC B wants to introduce become friends. B AC sides will send a recommendation of command. AC back to the B sides will agree a response, B forwards to AC. Add friends to complete the operation.
For details, see posted on github Add Friend command information.
  
  Whether to support voice and short video? OSN fragmented file transfer network supports voice and short video files belonging to the class. Short video and voice required depends on the format supported by different terminals.
  How secure communications across software solution? OSN network with the account ECC public key, and then transmitted after the message sent by the user will all be encrypted during transmission will not be intercepted.
  Suppose the user phone is lost, the case of the private key may be copied how to solve? Assume that the user's private key may feel lost, you can use the other to secure private communications private key updates and notify their friends replacement account. Secure private key is not stored locally, it requires the user to enter a password to use to use. Secure private key hash remain in the account number.
  
OSN network currently has only completed part of the basis functions, our team is currently very weak, look forward to more friends to participate in this open source project.

Guess you like

Origin www.cnblogs.com/osnw/p/12044127.html