TWTTALK Real-Time Chat System (1.0.1)

zhaozj2021-02-16  99

TWTTALK Real-Time Chat System (1.0.1)

By Mark

Preface:

The existing chat room in the sky can not meet the needs of the chat, now ready to replace this system.

First, systematic technical characteristics:

1. Cross-platform: client and server side can be used across platform [Windows, * Nix, Solaris ...]

2, cross-developed language: May use Java, C, C # development client and server

3, cross-use language: Chinese, English, Korean, etc.

4, unrelated to the database: do not use database characteristics related to a specific database.

5. Open development process: Any organization / individual can participate in the design and development process (but ownership is all outside the day).

6, open source: continuously publicly announce the latest design documentation and the latest code during the development process.

Second, system functional characteristics:

1, plain text to chat: There is no additional game function, no expression images. No audio, video features are available.

2. All members can establish a public group and private group.

3. According to the requirements, you can save your chat records permanently and provide applicable to various terminals and query services.

4. According to the communication protocol, you can develop the client itself.

5. For safety and performance, each IP only opens a thread (ie, can only chat with a group).

6. Provide offline messages for private groups, but not provided to the public group;

7. Administrators implement the management of users by the management of the group, and only by the consent of the creator can be implemented.

Third, system development characteristics:

1. Object-oriented, modular development.

2, must have a strong annotation, which is convenient for continuous maintenance and upgrade.

3, the complete test function function can also see detailed test information at the system.

Fourth, realize:

Now it is planned to implement Java (SWING, SOCKET) XML Oracle.

5. Development progress:

1, May: Detailed design, start recruiting.

2, 8- September: DESKTOP APP APP and Applet interface and test.

At the beginning of January, starting to use and maintain.

4, Description: Chat through agreement, other users, group management, etc. use JSP Javabean

6. Database design:

1. User table userinfo {@ means that the user can modify, "means that the user cannot modify}

Serial number field Data Type Description 1Useridinteger User ID {PK}! 2UsernameChar (20) User Name {Login} @ 3nicknameChar (20) User Nickname {Download} @ 4PasswordChar (64) Password {MD5 encrypted password} @ [To send it to the network] 5Passtipsvarchar (50) password prompt @ 6emailvarchar (40) User E-mail {pk} {send registration password} @ 7Userpicbinary custom user picture @ 8genderinteger user gender {1 Male 0 female} time when the last IP address when landing 12RegTimeDateTime registration @ 9DateOfBirthDateTime date of birth @ 10RegIPChar (15) IP address 11LastIPChar (15) at the time of registration 13LastTimeDateTime last landing time 14LogCountInteger landing times, the default is 015TalkPointsFloat online (Segregation), default is 016Userflaginteger user tag: 0 => Normal; 1 => Deleting a default is 017commentvarchar (255) Other instructions

2, GroupUserRelation Group / User Relations Table {Specification Each user can only create up to 5 groups} Serial number field Data Type Description 1GOUPID INTEGER User Group ID {fk} 2Useridinteger User ID {fk} 3Userflaginteger Tag 0: User Request to join but not Classified by the founder; 1: The founder has agreed to join; 2: Has been deleted / disabled by the creator; 3: The user exits {If the creator exits, groupinfo.groupflag = 1,}}}

3, group table GroupInfo

Serial number field Data Type Description 1GroupIDINTEGER User Group ID {PK} 2CreateUseridinteger Group Creator ID3GroupNameChar (50) User Group Name @ 4CreateTIMedateTime Create Time 5GroupFlaginteger Tag {0: Used; 1: Has committed; 2: Turn off by administrator) 6GroupTypeinteger group Category: 0: Public group => Anyone can log in, its member is all users, but there is no existence in the data table (GroupUserRelation), suitable for groups with a large number of users (> 50); 1: Private group => joining There is a need to have a creator, and its members exist in the GroupUserRelation, which is suitable for groups of small users (<= 50); 7CommentVarchar (255) Other description @

4, Message chat record (message table)

Serial number field Data Type Description 1IDINTEGER Sequence {PK} 2SrCIDINTEGER Messaging Transmitter ID4MESSIDINTEGER Message Retriever ID4MESSAGEBODYVARCHAR (255) Message 5TalkTimedateTime Chat Time (User Machine Time) 6Flaginteger Record Tag: 0: Successfully sent to the user; 1: Unsuccessful sent user;

7. Communication model:

8. Communication connection operation processes:

1, server / client interaction

2, server business processing process

Description:

1: If you are a group creator login, update group information in the memory space;

2: All users and their user tags corresponding to the group are loaded from the Group / User RelationsLATION;

3: If the send fails, place the message into the message table (Message), and FLAG = 1 (unseained to the user); 9, message: (example)

1. Port in this Agreement: 44302 (can be modified)

2, message structure:

Item Description Message Header Message (All Message Public Baotou) Message Body Message

3, message header (Message header)

Sequence Number Field Name Number Type Description 1 TOLLEngth4Unsigned Integer Message Total (Message Header and Message) 2SrcUserid4unsigned Integer Message The user ID. 3Password64String User MD5 encrypted password 4Desuserid4unsigned Integer message Receive user ID (for private chat) 5DESGROUPID4UNSIGNED INTEGER message Receive group ID6sequenceId4unsigned Integer message flow number, sequence accumulation, step size is 1, loop usage (a pair of requests and answers The flow number must be the same) 7commandid4unsigned integer command or response type 8flag4unsigned integer other parameters (reputation)

4, Message Body Connect_Request

Serial No. Field Name Number Properties Description 1Client_IpAddr4inetaddress (unsigned "user machine IP address. The version number of the 2Version4unSigned Integer (high 1byte represents the primary version number, the post 2byte represents the secondary version number, the last 1byte is the update version number). 3TimeStamp8unsigned Integerlong4flag4unsigned integer parameter

Note: The current version of Version is 1.0.

Connect_Response

Serial No.1 Name Number Properties Description 1ERRNO1UNSIGNED INTEGER Status 0: Correct 1: Message Structure Wrong 2: Illegal IP Address 3: Version Too High 4 ~: Other Error 2TimeStamp8unSigned Integer Timestamp's plaintext, generated by the client. LONG3VERSION4UNSIGNED INTEGER server supported the highest version number

Ten, people need:

1. Project management personnel;

2, the system detailed designer;

3, JSP JavaBean Developer {Developer / Group Management and Chat Record Query};

4, Oracle database management;

5, Applet Socket Developer {Only in the public group to chat.

6, Swing Socket Developer {Implement all functions};

XI, Conditions:

1, professional, grade, gender, height, color. . . Unlimited;

2, the sky and the world / non-sky days are even;

3, have strength, strong interest;

4, especially want to suffer from this;

5, willing to accept the guidance of senior people in the sky;

Twelve: Contact:

QQ: 297601

Email: mark_cui@126.com

转载请注明原文地址:https://www.9cbs.com/read-12010.html

New Post(0)