Commit Graph

262 Commits

Author SHA1 Message Date
Michael Bailey 3e475656f0
Removed Clinet tests. (#25)
removed all tests in client folder, as they arent used
2024-09-09 20:54:57 +01:00
Michael Bailey bf80015145
Updated github action files to better complete CI tasks. (#24)
Updated Dockerfile to build a more correct,
2024-09-09 20:36:50 +01:00
Michael Bailey b8c83e7853
Update create-docker-image.yml 2024-09-09 17:53:26 +01:00
Michael Bailey 25582d2e55
Update rust.yml 2024-09-09 17:51:49 +01:00
Michael Bailey 313b115537
Made other changes to GRPC implementation to clean it up (#23)
* added protocol crate for the program, also removed unused crates

* remove client code

* removed example plugin

* cleaned up foundation, added protocol crate to it

* removed lua scripts

* removed server ctl

* migrated tp prost instead of protobuf crate

* removed scripting code

* moved protocol crate to foundation, created helper functions for encoding and decoding

* Createde Cursive client for testing protocol stuff

* added docs?

* overriding server to remove actix, and simplify design

* linting the server

* moved network message handling into NetworkConnection struct

* linting

* cleaning up prints

* writing better log messages

* added better debug messages

* purged all axtix modules, to be replaced with new components

* ok, so i kind of got carried away here with the server and client.

But essentially, the server has been rewritten to follow protobug up untill the point of connecting a client.

the client can fetch info from the server, but cannot initiate a request to connect.

I am weorkibng on both in tandem, and there will be losts of big commits :D

* removing client stuff again, cause it's not going well

* added client networking structs to the foundation crate

* moved client stuff into foundation.

* created Json structures

* created protobuf structures

* revamped the connection and protocolm structure to allow addition of other protocols

* fixed issue with erronious request input from clients

* removed select statements

* Updated logging messages
2024-09-09 17:48:09 +01:00
Michael Bailey c1e4a22099
Update rust master merge action workflow 2024-09-09 17:44:10 +01:00
Michael Bailey 0bfbd9c747
Grpc-manager (#22)
* added protocol crate for the program, also removed unused crates

* remove client code

* removed example plugin

* cleaned up foundation, added protocol crate to it

* removed lua scripts

* removed server ctl

* migrated tp prost instead of protobuf crate

* removed scripting code

* moved protocol crate to foundation, created helper functions for encoding and decoding

* Createde Cursive client for testing protocol stuff

* added docs?

* overriding server to remove actix, and simplify design

* linting the server

* moved network message handling into NetworkConnection struct

* linting

* cleaning up prints

* writing better log messages

* added better debug messages

* purged all axtix modules, to be replaced with new components

* ok, so i kind of got carried away here with the server and client.

But essentially, the server has been rewritten to follow protobug up untill the point of connecting a client.

the client can fetch info from the server, but cannot initiate a request to connect.

I am weorkibng on both in tandem, and there will be losts of big commits :D

* removing client stuff again, cause it's not going well

* added client networking structs to the foundation crate

* moved client stuff into foundation.

* created Json structures

* created protobuf structures

* revamped the connection and protocolm structure to allow addition of other protocols

* fixed issue with erronious request input from clients

* removed select statements
2024-05-30 20:42:42 +01:00
michael bailey e6905cb6b2
Adding client updates on addition and removal (#21)
* adding user update support

* Adding public key storage

* replaced duplicate fields

* changed messaegs to include a type property

* added encryption example

* Moved threads to tokio async

* Moved threads to tokio async

* Created global message support

* created basic ui that counts

* Created connection abstraction

This abstracts a TcpStream await to use any serialisable types.

* exposed server as lib

+created lib output for server
+ added extra dependencies
+ added functions to retrieve the port of a server

* updated connection

+ added manager trait
+ updated connection to use more idomatic rust code converted enums to Strigns rather that &str
+

* added network Manager

tl;dr, as the title says

* Update network_manager.rs

Converted over to new messaging system.

* meant to add this earlier

* Right bare with me...

This doesnt work for now but i have a system that works.

After this commit i will be resuming the smaller changes.

I needed to do this to find a new approach.

God save my mind.

* Impl IManager for ClientManager

* Added client manager tests

* Stripped server of functinoality

This is temporary whilst the client manager is being tested.

* Update client_manager.rs

swapped lock type for tokio lock

* Update client_manager.rs

- Added type arguments to Client manager
- deprecated start method

* Update client_manager.rs

- implemented handle channel method from old start method.
- added notes to possible issues.

* Update client_manager.rs

+ updated lifetime bounds.

* Update client_manager.rs

+ created function to get the number of connected clients

* Update client_manager.rs

+ created function to add/remove clients to the client manager.

* Update server.rs

- refactored server to simplify message passing

* Update client.rs

meant to add this earlier

* Update messages.rs

formatting

* moved some messages around

* Update server.rs

- removed redundant messages

* Update client_manager.rs

bunch more changes

yes i know i'm rubbish at this plz don't say anything :(

* Added Message Broadcasting functionality

* cleared up warnings

* Update client.rs

- removed redundant fields

* Update client.rs

added global broadcasting

* Added the ability to disconnect from the server

* Update network_manager.rs

this protects the network manager from crashing when a erroneous message is sent

* implemented message sending between users

* Update client.rs

added tokio, to protect client connections.

* Added Lua dependency

* Made server, Lua scriptable.

* added basic scripting abilities to the server

* Update client.rs

fixed stray connection

* made client Lua scriptable

* Made client manager Lua scriptable

* Adde fields to server to get client manager

* Updated testing script

* added client indexing to client manager

* added basic callback support to ClientManager

* moved Lua structs to separate module

* added arbitrary self types

* Created example plugin crate

* Added libloading dependency

* Created plugin trait and create function type

* created basic PluginManager

* Added plugin manager to server

* added modules

* Updated example plugin

* added plugin manager to server

* modified plugin module visibility

* updated example plugin

* updated plagin interface

* created plugin interface

* updated plugin init process

* updated example plugin

* cleaned up lib folder

* fixed cloning issues with plugin manager

* updated plugin trait implementation

* updated module definitions

* upadted rust fmt rules for imports

* fixoing formatting and ther errors. This is a pain to look through. i'm sorry :(

* minor fix

* Fixed plugin not functioning with tokio

* Added plugin lifecycle events

added lifecycle events to the plugin entry.

This allows plugins to be in a stopped paused or running state

* Adjusted visibility modifiers

* added basics of an event system

* updated imports.

* added function to get plugin entry as interface to plugin

* updated plugin example

* fixing linting errors

* updated event architecture

* renamed responder module

* added documention

* created a event result builder

* renamed responder

* updated example with interface setting

* moved event system to foundation

* added back tokio to foundation

* modified visibility

* added functions for IResponder

* more module mess

* made event generic

* made responder generic

* added basic plugin event propogation.

* updated plugin event handler.

* same because vscode?

* made plugin event generic

* RIGHT I'M MOVING TO ACTIX

* Started work on actor conversion

* implemented GetInfo for actix server

* implementing clients using actors

* added ability to add and remove clients

* updated foundation with comments and better messages

* Update Cargo.toml

+ added tokio stream

* added auto connection closing to Connection

* Update actix_server.rs

+ added ClientConnection handlers

* added ability to get server updates

* added basic messaging functonality

* deleted old server version

* renamed files to match std structure

* reformatted project

* renamed old files

* renamed serverActor to server

* added proper prelude

* Update client.rs

minor bug fixes

* updated clap

* made server configurable

* added port configurability

~ moved components to seperate modules
~ added builder and config to network manager

* way too much happened here

+ added scriptable version of the server, networkManager and clientManager

+ added lua engine creation
+also added unfinished rhai support
+ also did some restructuring

* made client manager and clients scriptable

* added more scriptable objects

* Created config manager with path read functionality

* fixed network manager message result types

* added bootstrapper actor

* moved arg matcher funtion.

* created singleton config manager using once pattern.

* removed bootstrapper and created config builder

* fixed panic on file not existing

* ignoring config_file

* added config manager to network manager

* updated some docs

* added config support to network manager, changed lifecycle a bit as well

* removed redundant handlers

* added configuration through args support to config manager and network manager.

* added config manager support to server and removed old serverConfig references

* performed cleanup of network manager

* performed cleanup of server

* updated config manager api to use optionals. This leads to pre-configuration and easier readability and understanding.

* updated server and network manager to new style for setting config values

* cleaned up prelude linting errors

* cleaned up network listener

* cleaned up connection initator

* cleaned up connection actor

* cleaned up lua manager

* cleaned up rhai manager

* cleaned up config manager

* cleaned up client manager

* cleaned up client actor

* cleaned up scriptable interfaces

* updated client uuid version

* fixed client cargo toml

* undone previous change

* moved arg parser to folder as file

* uhh... changes and formatting

* created chat manager and added it to the client manager

* added global message spport to client manager

* refixed network manager (again again)

* added debug messages

* refactord client code

* refactored messages and added new message types

* refactord network manager module name

* resolved warning in connection

* refactored message into foundation, added get message support for clients

* Fixed messages being sent to sender

* fixed not implemented panic, and field misnaming

* turned some references into weak variaties, to prevent memory leaks.

* turned ref into weak ref

* removing  strong references from scriping managers

* fixing lints

* making moe things weak repferences

* refactored connection initiator into spereate files

* accedentally ran cargo fmt instead of on one file

* removed the read loop, and replaced it with a recurrent messages.

* added docker files and automated build scripts

* Added client updates for addition and removal of clients
2024-01-03 23:35:26 +00:00
michael bailey ddb886df03
merge develop into master (#20)
* adding user update support

* Adding public key storage

* replaced duplicate fields

* changed messaegs to include a type property

* added encryption example

* Moved threads to tokio async

* Moved threads to tokio async

* Created global message support

* created basic ui that counts

* Created connection abstraction

This abstracts a TcpStream await to use any serialisable types.

* exposed server as lib

+created lib output for server
+ added extra dependencies
+ added functions to retrieve the port of a server

* updated connection

+ added manager trait
+ updated connection to use more idomatic rust code converted enums to Strigns rather that &str
+

* added network Manager

tl;dr, as the title says

* Update network_manager.rs

Converted over to new messaging system.

* meant to add this earlier

* Right bare with me...

This doesnt work for now but i have a system that works.

After this commit i will be resuming the smaller changes.

I needed to do this to find a new approach.

God save my mind.

* Impl IManager for ClientManager

* Added client manager tests

* Stripped server of functinoality

This is temporary whilst the client manager is being tested.

* Update client_manager.rs

swapped lock type for tokio lock

* Update client_manager.rs

- Added type arguments to Client manager
- deprecated start method

* Update client_manager.rs

- implemented handle channel method from old start method.
- added notes to possible issues.

* Update client_manager.rs

+ updated lifetime bounds.

* Update client_manager.rs

+ created function to get the number of connected clients

* Update client_manager.rs

+ created function to add/remove clients to the client manager.

* Update server.rs

- refactored server to simplify message passing

* Update client.rs

meant to add this earlier

* Update messages.rs

formatting

* moved some messages around

* Update server.rs

- removed redundant messages

* Update client_manager.rs

bunch more changes

yes i know i'm rubbish at this plz don't say anything :(

* Added Message Broadcasting functionality

* cleared up warnings

* Update client.rs

- removed redundant fields

* Update client.rs

added global broadcasting

* Added the ability to disconnect from the server

* Update network_manager.rs

this protects the network manager from crashing when a erroneous message is sent

* implemented message sending between users

* Update client.rs

added tokio, to protect client connections.

* Added Lua dependency

* Made server, Lua scriptable.

* added basic scripting abilities to the server

* Update client.rs

fixed stray connection

* made client Lua scriptable

* Made client manager Lua scriptable

* Adde fields to server to get client manager

* Updated testing script

* added client indexing to client manager

* added basic callback support to ClientManager

* moved Lua structs to separate module

* added arbitrary self types

* Created example plugin crate

* Added libloading dependency

* Created plugin trait and create function type

* created basic PluginManager

* Added plugin manager to server

* added modules

* Updated example plugin

* added plugin manager to server

* modified plugin module visibility

* updated example plugin

* updated plagin interface

* created plugin interface

* updated plugin init process

* updated example plugin

* cleaned up lib folder

* fixed cloning issues with plugin manager

* updated plugin trait implementation

* updated module definitions

* upadted rust fmt rules for imports

* fixoing formatting and ther errors. This is a pain to look through. i'm sorry :(

* minor fix

* Fixed plugin not functioning with tokio

* Added plugin lifecycle events

added lifecycle events to the plugin entry.

This allows plugins to be in a stopped paused or running state

* Adjusted visibility modifiers

* added basics of an event system

* updated imports.

* added function to get plugin entry as interface to plugin

* updated plugin example

* fixing linting errors

* updated event architecture

* renamed responder module

* added documention

* created a event result builder

* renamed responder

* updated example with interface setting

* moved event system to foundation

* added back tokio to foundation

* modified visibility

* added functions for IResponder

* more module mess

* made event generic

* made responder generic

* added basic plugin event propogation.

* updated plugin event handler.

* same because vscode?

* made plugin event generic

* RIGHT I'M MOVING TO ACTIX

* Started work on actor conversion

* implemented GetInfo for actix server

* implementing clients using actors

* added ability to add and remove clients

* updated foundation with comments and better messages

* Update Cargo.toml

+ added tokio stream

* added auto connection closing to Connection

* Update actix_server.rs

+ added ClientConnection handlers

* added ability to get server updates

* added basic messaging functonality

* deleted old server version

* renamed files to match std structure

* reformatted project

* renamed old files

* renamed serverActor to server

* added proper prelude

* Update client.rs

minor bug fixes

* updated clap

* made server configurable

* added port configurability

~ moved components to seperate modules
~ added builder and config to network manager

* way too much happened here

+ added scriptable version of the server, networkManager and clientManager

+ added lua engine creation
+also added unfinished rhai support
+ also did some restructuring

* made client manager and clients scriptable

* added more scriptable objects

* Created config manager with path read functionality

* fixed network manager message result types

* added bootstrapper actor

* moved arg matcher funtion.

* created singleton config manager using once pattern.

* removed bootstrapper and created config builder

* fixed panic on file not existing

* ignoring config_file

* added config manager to network manager

* updated some docs

* added config support to network manager, changed lifecycle a bit as well

* removed redundant handlers

* added configuration through args support to config manager and network manager.

* added config manager support to server and removed old serverConfig references

* performed cleanup of network manager

* performed cleanup of server

* updated config manager api to use optionals. This leads to pre-configuration and easier readability and understanding.

* updated server and network manager to new style for setting config values

* cleaned up prelude linting errors

* cleaned up network listener

* cleaned up connection initator

* cleaned up connection actor

* cleaned up lua manager

* cleaned up rhai manager

* cleaned up config manager

* cleaned up client manager

* cleaned up client actor

* cleaned up scriptable interfaces

* updated client uuid version

* fixed client cargo toml

* undone previous change

* moved arg parser to folder as file

* uhh... changes and formatting

* created chat manager and added it to the client manager

* added global message spport to client manager

* refixed network manager (again again)

* added debug messages

* refactord client code

* refactored messages and added new message types

* refactord network manager module name

* resolved warning in connection

* refactored message into foundation, added get message support for clients

* Fixed messages being sent to sender

* fixed not implemented panic, and field misnaming

* turned some references into weak variaties, to prevent memory leaks.

* turned ref into weak ref

* removing  strong references from scriping managers

* fixing lints

* making moe things weak repferences

* refactored connection initiator into spereate files

* accedentally ran cargo fmt instead of on one file

* removed the read loop, and replaced it with a recurrent messages.

* added docker files and automated build scripts
2023-12-01 21:48:28 +00:00
michael bailey 596dd0db05
Update README.md (#16)
* Update README.md

+ added feature, todo and goals section.

* Update README.md
2021-08-03 21:54:04 +01:00
Mitch161 2caff23ff2
Merge pull request #10 from Mitch161/Development
Development into Master
2021-08-03 21:53:15 +01:00
michael bailey f43ceb07df
Create rust.yml (#3)
+ added a workflow file for CI
2021-04-13 21:54:20 +01:00
michael bailey 5aa4f8caf6
Pulling basic server functionality into development (#9)
* removed redundant files

* moved files to new foundation library

* added new foundation crate

* added new client program crate

* added new server program crate

* added new serverctl program crate

* change toml to be a workspace instead of a project

* implementing more connection to network functionality

* implementing more connection to network functionality

* Implemented IMessageable for client, client manager as well as basic commands in netmgr

* fixing blocking issues with componenets

* adding network stream queuefor handling connections in a non blocking way

* ffixing blocking calls in network manager

* adding threading support to prevent blocking calls

* running rust formatter

* Created Client threads and implemented connect command

* fixed client not disconnecting issue

* adding messaging support between clients

* Implemented client messaging through the server

* removing unnecessary prints and thread delays

* adding support for updating clients
2021-04-13 18:17:58 +01:00
michael bailey 0572d0d0e9
Merge pull request #8 from Mitch161:consolidation-branch
Consolidation branch -> development branch
2021-03-30 07:29:41 +01:00
michael-bailey cf16367d51 removing dead code 2021-03-20 12:38:42 +00:00
michael-bailey 8f3d1549ca fixed issue with channel blocking 2021-03-18 23:37:48 +00:00
michael-bailey 53ff1858f6 implemented client manager tick function 2021-03-18 23:24:48 +00:00
michael-bailey d6c4baf556 Implemented client add functionality in the server. 2021-03-18 20:02:56 +00:00
michael-bailey f3ab1f37da Added client connecting condition to network manager 2021-03-18 19:55:04 +00:00
michael-bailey 30d9e5ba2d modified client to multiple params instead of map 2021-03-18 17:03:15 +00:00
michael-bailey 7d749d0de0 Moved TcpListender form Server To NetworkManage. 2021-03-18 16:52:03 +00:00
michael-bailey 436975e3c5 Moved TcpListender form Server To NetworkManage. 2021-03-18 16:42:42 +00:00
michael-bailey a5eff0bd32 merge server implementation branch 2021-03-18 16:05:27 +00:00
michael-bailey bb5fbdc43b removed redundant function 2021-03-18 15:57:34 +00:00
michael-bailey b53a63fd54 setting up json based message protocol 2021-03-18 11:50:12 +00:00
michael-bailey 19832f0aa1 added basic server messages. 2021-03-18 10:39:11 +00:00
michael-bailey 232effad14 implemented basic connection handling in the server 2021-03-18 10:39:11 +00:00
michael-bailey a8c37225ae implemented basic client manager functions for new architecture 2021-03-18 10:39:11 +00:00
michael-bailey 22a0d68255 implemented basic messageing system for clients. 2021-03-18 10:38:46 +00:00
michael-bailey cd81b1e250 redesigned client for the new exec structure 2021-03-18 10:38:46 +00:00
michael-bailey db72977d2f fixing owner structure. 2021-03-18 10:38:46 +00:00
michael-bailey 3ff3e531a1 moving server changes to client manager 2021-03-18 10:38:46 +00:00
michael-bailey 5b9d91e44e implemented basic connection handling in the server 2021-03-18 10:38:46 +00:00
michael-bailey 1966f80bc6 moving server changes to client manager 2021-03-18 10:38:09 +00:00
michael-bailey 546e566c9b Fixed immediate warnings 2021-03-18 10:37:47 +00:00
michael-bailey 965231cde9 added basic network manager implementation 2021-03-18 10:36:18 +00:00
michael-bailey 042f7e1007 added basic server messages. 2021-03-18 09:42:53 +00:00
michael-bailey b1be92ed02 implemented basic connection handling in the server 2021-03-18 09:26:49 +00:00
michael-bailey b1b8107ce7 implemented basic client manager functions for new architecture 2021-03-18 09:20:39 +00:00
michael-bailey e92096b6ad implemented basic messageing system for clients. 2021-03-18 08:55:21 +00:00
michael-bailey a493eddd50 redesigned client for the new exec structure 2021-03-17 18:37:06 +00:00
michael-bailey 194e954733 fixing owner structure. 2021-03-17 10:54:51 +00:00
michael-bailey f00d8cc7f7 moving server changes to client manager 2021-03-17 10:54:51 +00:00
michael-bailey 5f6ecdd839 added implemetation of info command on te server 2021-03-17 10:54:51 +00:00
michael-bailey 14154ebd4e implemented basic connection handling in the server 2021-03-17 10:54:51 +00:00
michael-bailey 5b7258d3ab added from vector trait to commands 2021-03-17 10:53:43 +00:00
michael-bailey 9b5cb18693 moved commands into lib module 2021-03-17 10:53:43 +00:00
michael-bailey b66fdd62b3 added implemetation of info command on te server 2021-03-17 09:56:51 +00:00
michael-bailey 71fe467ca2 implemented basic connection handling in the server 2021-03-16 10:11:31 +00:00
michael-bailey 6c89f34151 added from vector trait to commands 2021-03-16 10:11:03 +00:00