The-Randalorian / Open-Assistant

An open source voice assistant
GNU General Public License v3.0
3 stars 1 forks source link

Server Mode #6

Open The-Randalorian opened 3 years ago

The-Randalorian commented 3 years ago

The voice assistant should be able to act in a server mode, answering queries from clients, giving appropriate responses. It should compartmentalize all user specific data to prevent security holes. It should be capable of working in either an anonymous mode, with users that are deleted after their interaction is complete or has been left idle for a long period of time (for use in web/dumb clients), or in personalized mode, where user info is remembered (for use in a multi user setting like a household or office).

The exact method of compartmentalization will probably consist of swapping out the Thing dictionary with different versions for different users, or by appending a user information tag

It may also make sense to pickle thing objects to allow them to be saved outside of a huge Thing dictionary, either in files or a database like MySQL. The Thing dictionary would probably be replaced with a class mirroring the dictionary interface, but that internally saved and gathered values from a dictionary. This should take place in a separate plugin, which will instruct the behavior module to replace the thing dictionary class with an object provided from the extra plugin. This would allow for different database or storage systems to be implemented.

This last point is particularly useful for servers, as multiple servers instances could grab data from a common database, allowing for better data protection, load balancing, and other issues associated with scaling up.

Server mode will also require different sound input and output plugins to receive sound data from the user.

Edit: Clarity

The-Randalorian commented 3 years ago

Some of this has been added in the serialization and SQL storage update. I think it will be simpler and better to disable the use of the Thing dictionary with a flag. The general knowledge objects can be stored under the root user for the database, which will effectively put them in a read only mode.

Edit: changed sql to SQL storage