Sign inSign up

internetofus/profile-manager

By internetofus

•Updated over 3 years ago

The component that mantains the information of the WeNet user profiles.

Image
0

1.6K

internetofus/profile-manager repository overview

⁠Profile manager

⁠Introduction

The profile manager component is responsible for storing and maintaining the WeNet user profiles. A user profile is a set of attributes that define the state of the user. Some of these attributes are filled in by the user, such as name, email, telephone,..., or by other components of the platform, such routines.

The social relationships of a user are not stored on the profile, because a user can have a relationship with all the playing applications of the user, and this could be a lot of relationships. For this reason, the profile manager provides web services to add/update/delete/get these relationships.

The profile manager has the capability to maintain a historic with the profile changes. By default, this behaviour is disabled and it can be enabled on the server configuration, or using a parameter on the update profile requests. This allows knowing, to the rest of the components, how the state of the user evolves in time.

Another responsibility of the profile manager is to evaluate the trust of one user over another when it is doing some action. The trust is dynamic and will be updated every time they collaborate to achieve a task. When a user has received some help it can rate the performance of the user that has helped it. For this, it has to post a performance rating event to the profile manager. These events are used by the profile manager when it has to provide the trust that has a user that another does a certain action. When you want to calculate the trust, you must specify some parameters that are used to select events that have to be aggregated to obtain the trust. Also, you must define the aggregation function, which can be:

  • RECENCY_BASED: the trust is the average of the last 'n' rating events. At the moment n=5.
  • AVERAGE: the trust is the average of all the rating events.
  • MEDIAN: the trust is the median of all the rating events.
  • MINIMUM: the trust is the minimum rating of all the events.
  • MAXIMUM: the trust is the maximum rating of all the events.

⁠Docker variables

  • API_HOST to define the host where the API has to bind. By default is 0.0.0.0.
  • API_PORT to define the port where the API has to bind. By default is 8080.
  • DB_HOST to define the mongo database server hostname. By default is localhost.
  • DB_PORT to define the mongo database server port. By default is 27017.
  • DB_NAME to define the mongo database name. By default is wenetProfileManagerDB.
  • DB_USER_NAME to define the mongo database user name. By default is wenetProfileManager.
  • DB_USER_PASSWORD to define the mongo database user password. By default is password.
  • WENET_PROFILE_DIVERSITY_MANAGER_API to define the path to the profile manager extension for the word net similarity component to use. By default is https://wenet.u-hopper.com/prod/profile_diversity_manager⁠.
  • WENET_TASK_MANAGER_API to define the path to the task manager component to use. By default is https://wenet.u-hopper.com/prod/task_manager⁠.
  • WENET_SERVICE_API to define the path to the service component to use. By default is https://wenet.u-hopper.com/prod/service⁠.
  • WENET_SOCIAL_CONTEXT_BUILDER_API to define the path to the social context builder component to use. By default is https://wenet.u-hopper.com/prod/social_context_builder⁠.
  • COMP_AUTH_KEY to define the authentication key that the component has to use to interact with the other WeNet components.
  • CACHE_TIMEOUT to define the time in seconds that a value can be on the cache. By default is 300.
  • CACHE_SIZE to define the maximum number of entries that can be on the cache. By default is 10000.
  • AUTOSTORE_PROFILE_CHANGES_IN_HISTORY this is true if every change on the profile has to provoke that the history is updated. By default is false.
  • MIGRATE_DB_ON_BACKGROUND this is true if the migration of the database has to be done independenly of the start process. By default is true.

When the container is started, it stores the log messages at /usr/wenet/profile-manager/var/log/profile-manager.log. This file is limited to 10 MB and rolled every day using the pattern profile-manager.log.X (where X is a number between 1 and 99).

⁠Interaction with other WeNet components

⁠Social context builder
  • Notify every time a new user profile is created. (POST {{social_context_builder_api}}/social/relations/initialize/{{userId}})
  • Notify every time a user profile is updated. (POST {{social_context_builder_api}}/social/notification/profileUpdate/{{userId}})
⁠Task manager⁠
  • Used to validate that a task is defined (GET {{task_manager_api}}/tasks/{{appId}}).
⁠Service⁠
  • Used to validate that an application is defined (GET {{service_api}}/app/{{appId}}).

Tag summary

Content type

Image

Digest

sha256:5cd7fdb2a…

Size

145 MB

Last updated

over 3 years ago

docker pull internetofus/profile-manager