Commit Graph

13 Commits

Author SHA1 Message Date
Maurice ONeal
f6ea7239a0 Further updated the documentation and a minor fix
fixed some errors found in the documentation and fully updated the internal
commands docs as well.

also updated the internal module to now respond to KILL_CMD so it can now be
signaled to terminate gracefully.
2019-11-18 19:20:30 -05:00
Maurice ONeal
e7ea316bc0 Full documentation update and minor changes
-the add_mod command now requires the -mod_path argument as it should.
-the session now filter out bad NEW_CMD frames based on bad command names and incorrect
 frame sizes.
-modules running in list mode can now send ERR frames to the session to log error
 messages to the host database.
2019-11-16 13:08:02 -05:00
Maurice ONeal
72d57a0b10 Major upgrade and module interface changes
Made some major changes to the project to facilitate a lighter code base and the
must flexible module interface possible.

-the mutli-process architecture now operate at the command object level so each
 command now operate in it's own process instead of a single process handling
 multiple command objects.

-each module is now an independent application that will now tell the session
 object all of the commands it can run via named pipe. during command execution,
 it will run the requested command object also running io with the session object
 via named pipe.

 with this change, it is now possible for modules to be developed in different
 versions or QT or entirely different languages. the only requirement is the need
 to support named pipes. shared memory segments is also a nice to have but not
 needed.

-clients can now run multiple instances of the same command via changes to the
 protocol. mrci frames will now include a branch id along with the command id.
 the branch id can be used by clients to differentiate the io between instances
 of the same command.

-the command states are longer controlled by a single object. it will now be up
 to the command object (internal/exterenal) to send an IDLE frame to the client
 to notify it that the command has finished. the session object will still track
 if the command is in idle state or not but not directly control it.

-must async commands now use binary formatted data instead of TEXT as a way to
 reduce overhead.

-all command objects can now send async commands. it is no longer limited to just
 internal commands, however; the data of these async commands are verified by
 session in some way to prevent host crashing due to malformed data.

-changed up the database structure to rely more on user ids, channel ids and
 removed all foreign keys pointing to user names, channel names and sub-channel
 names. also removed the groups table altogether. instead, the host rank is now
 directly attached to the user data in the users table.

-changed the query object to now support the INNER JOIN SQL clause. this change
 was needed to support the new database structure.

-version negotiation is now one-way via tcp connection or module interface.
 the host will make it's own verion numner known to the client connected via
 tcp or the module connected via named pipe. it will now be entirely up to the
 client or module to decide if they support the host. another change in this
 regard is the removal of the import rev for the modules. compatibility for
 modules shall now use just the host verion.

-removed ls_cmds and cmd_info. the NEW_CMD frame now carries all information
 about the command (cmd_id, cmd_name, summery, io and full_description) so it
 is now possible for the clients to display the command documentation instead
 of the host.

Documentation for the internal commands were updated to reflect the changes but
all other documentation will need to be updated in the near future.
2019-11-08 22:06:09 -05:00
Maurice ONeal
73409ca26e Updated the documentation
Updated all documentation related to the changes made in the previous
commit.
2019-09-26 22:00:51 -04:00
Maurice ONeal
364924c383 Added a new internal command.
Added a new fs_tree command that list all files and directories in a directory
tree. Just like fs_list, it has the option to output human readable text or
FILE_INFO frames. Also added the option to hide hidden files for both commands.

1.1.2 --> 1.1.3
2019-09-26 19:04:04 -04:00
Maurice O'Neal
124fb538fa
Update README.md
updated mrci-1.0.2.run to mrci-1.1.2.run
2019-09-22 22:54:21 -04:00
Maurice O'Neal
61c2f8b438 Updated the module interface to be less limiting
Moved away from QPluginLoader to C/C++ style QLibrary files for the
module interface. It's less limiting this way because the host can
be built statically and still beable to load non-statically built
modules. It's not tested but the i think it should now beable to
load modules built on a different version of Qt than the host but
the module would must likely need to be build statically.

Another change to the module interface makes it so the module can
can now also see the host version in CommandLoader::hostRevOk()
and decide if the host can continue loading it.

The host 'host_info' internal command now displays the version of
Qt it was built on.

All documentation related to the module interface has been
updated. No attempt will be made at the host side to support rev
2 modules so the new minimum rev is now 3.

1.0.2 --> 1.1.2
2019-09-22 22:01:07 -04:00
Maurice O'Neal
6c8867ad5c Minor changes to the linux build script
$qt_dir in the build script will now default to the hard coded standard
directory for Qt binaries '/usr/lib/x86_64-linux-gnu/qt5/bin' if a valid
path is not provided by the user. End users that have customized setups
of Qt might need to modify this script to make sure $qt_dir points to the
correct directory at all times.

Moved the LICENSE.md file to the root directory so github can read it.
2019-09-19 13:07:50 -04:00
Maurice O'Neal
139eabba6a Converted a Async command to client receivable
The ASYNC_USER_DELETED async command will now be forwarded to the client
if needed so clients can now be notified if the user account gets
deleted.

1.0.1 --> 1.0.2
2019-09-14 13:31:27 -04:00
Maurice O'Neal
04e5c23725 Updated the README.md to reflect the lastest version. 2019-09-13 01:27:47 -04:00
Maurice O'Neal
594e1d9812 Major bug fixes and a few minor changes
Fixed a bug that caused the host to not respond to any commands when a
module is present. CmdExecutor::loadMods() had a malformed 'for' loop
that caused the command executor to infinite loop.

Also re-formed the way the external command loaders (modules) are
constructed. Instead, the modules are also intialized at the same time
as the internal command loader.

The CmdExecutor::loadModFile() and CmdExecutor::unloadModFile()
functions now load and unload modules via the module name instead of the
path to the module main file. The documentation for ASYNC_ENABLE_MOD and
ASYNC_DISABLE_MOD updated to reflect this change.

Also part of the module contruction re-form, it fixed a bug that caused
the command loaders to operate in a thread different from the command
executor. CmdExecutor::loadMods() was refactored into
cmdExecutor::buildCmdLoaders(), added the internal command loader to it
and have it so this function gets called only when the command executor
successfully moves to it's own thread.

Fixed a bug that caused the session to crash only when a module is
present. It turns out the qobject_cast() function used in
CmdExecutor::loadModFile() only pulled the surface class
ModCommandLoader so any attempt to access the base class functions from
CommandLoader caused the session to crash so to fix this,
ModCommandLoader was merged into CommandLoader. The Command loader
documentation and test module were updated to reflect this change.

Fixed a bug that auto removed any modules that were installed when the
host is restarted. The issue was in TCPServer::syncModPath() that used
the modules's main file without a suffix when the file did indeed have
a suffix, causing the function to think the module no longer exists and
remove all of it's files from the host file system. The original intent
for this function was to keep the module database table in sync with
what was actually in the host file system. It was decided that this is
not necessary so the function was removed altogether.

Also changed up the way the module files are deleted. The TCPSever class
will now use the module name instead of the path to the module's main
library file and will use a single use ModDeleteTimer for each module
that was requested to be deleted instead of a single continuous timer
constantly checking for modules to delete.

The ls_cmds command will now list the commands in alphabetical order of
the command names and fixed a bug with the -find option that would
display nothing if an exact match to any text in the table could not be
found.

Fixed a bug found in the deployed application that would segmentation
fault on startup due to certain library files being included in the
deployed installation directory. Updated the linux_build.sh script to
include only libsqlite, libQT5, libssl and libicu files. It will no
longer blindly copy all library files from the dev machine and then
remove files the setup script thinks the application might or might not
need.

Any module built on import rev1 will simply not work and no attempt will
be made to make it work so the host new minimum import rev is now rev2.

this update is mustly just bug fixes; nothing that would require any
client behaviour changes so just the host patch is bumped.

1.0.0 --> 1.0.1
2019-09-12 01:29:46 -04:00
Maurice O'Neal
a72c4ed96b
Update README.md
fixed the way the documentation links are displayed in the README file.
2019-09-06 23:59:14 -04:00
Maurice O'Neal
beb59ec2ab Initial commit for the MRCI project. 2019-09-06 23:43:07 -04:00