Consolidation branch -> development branch #8

Merged
michael-bailey merged 43 commits from consolidation-branch into Development 2021-03-30 06:29:41 +00:00
michael-bailey commented 2021-03-20 12:30:43 +00:00 (Migrated from github.com)

Architecture change

In this diff i restructured how each component communicated to each other.
Basically it follows a modified flow architecture based on react where there is a root dispatcher
and events are passed down the tree of component until they arrive where they are executed.

To allow this each component has a channel sender to the server.
New events are passed as server messages to this channel.
when the server is given execution power again, the events are acted upon and passed to search child component (Like Client manager) if needed .

Each component should have it's own sender which is accessed in a send message function from the IMessageable trait.

As well as this each component that can execute messages should implement ICooperative.

Major Code changes

  • added new network manager struct that will handle new connections.
  • created new trait for cooperative multitasking, on a single thread.
  • modified Server to implement ICooperative.
  • modified Client Manager to implement ICooperative.
  • modified Client to implement ICooperative.
  • created enums to represent messages that each channel (including TcpStreams) can recieve

Command Changes

  • using serde with enums for the protocol as it simplifies serialising and deserialising.
    implemented info
  • probably going to remove the old command struct as this appeares to be easier to use (in rust) and has many configuration options if needed. (see: here)
# Architecture change In this diff i restructured how each component communicated to each other. Basically it follows a modified flow architecture based on react where there is a root dispatcher and events are passed down the tree of component until they arrive where they are executed. To allow this each component has a channel sender to the server. New events are passed as server messages to this channel. when the server is given execution power again, the events are acted upon and passed to search child component (Like Client manager) if needed . Each component should have it's own sender which is accessed in a send message function from the IMessageable trait. As well as this each component that can execute messages should implement ICooperative. ## Major Code changes + added new network manager struct that will handle new connections. + created new trait for cooperative multitasking, on a single thread. + modified Server to implement ICooperative. + modified Client Manager to implement ICooperative. + modified Client to implement ICooperative. + created enums to represent messages that each channel (including TcpStreams) can recieve ## Command Changes + using serde with enums for the protocol as it simplifies serialising and deserialising. implemented info - probably going to remove the old command struct as this appeares to be easier to use (in rust) and has many configuration options if needed. (see: [here](https://serde.rs/enum-representations.html))
Mitch161 (Migrated from github.com) approved these changes 2021-03-22 20:23:52 +00:00
Mitch161 (Migrated from github.com) left a comment

Nicest comments on a merge, looking good. Well done!

Nicest comments on a merge, looking good. Well done!
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: British-Information-Technologies/ChatKit-server#8
No description provided.