Providers

Some of the core components in Weavy can be replaced by implementing and/or configuring what we call Providers. This allows you as a developer to replace a large piece of functionality with your own implementation.

Blob provider

A blob provider is reponsible for storing and retrieving blobs (uploaded files) from storage. In order to add your own blob provider you must provide an implementation of the IBlobProvider interface.

The default implementation stores all uploaded files directly in the SQL database. While this is efficient and simplifies many things such as backing up a Weavy installation it can sometimes be beneficial to store files in other ways. When Weavy is deployed to Azure we recommend using the AzureBlobProvider instead.

Implementations

Weavy comes with a couple of built-in blob providers:

Configuration

Blob providers are configured via appSettings. If no configuration is provided, the default implementation is SqlServerBlobProvider.

<appSettings>
  <add key="weavy.blob-provider" value="Weavy.Core.Providers.SqlServerBlobProvider, Weavy.Core" />
</appSettings>

Cache provider

A cache provider is reponsible for caching data for fast access. In order to add your own cache provider you must provide an implementation of the ICacheProvider interface.

The default implementation caches data in memory on the web server. While this is optimal for performance it makes it difficult to add redundancy by scaling a Weavy tenant to multiple web servers. In order to do that you would have to implement a cache provider that uses a distributed cache such as Redis or similar.

Implementations

Weavy comes with one built-in cache provider:

Configuration

Cache providers are configured in the web.config file. If no configuration is provided, the default implementation is AspNetCacheProvider.

<appSettings>
  <add key="weavy.cache-provider" value="Weavy.Core.Providers.AspNetCacheProvider, Weavy.Core" />
</appSettings>

Notification provider

Weavy has an INotificationProvider interface that can be implemented to send push notifications.

Implementations

Weavy comes with one built-in notification provider:

Configuration

Notification providers are configured in the web.config file. If no configuration is provided, the default implementation is AzureNotificationProvider.

<appSettings>
  <add key="weavy.notification-provider" value="Weavy.Core.Providers.AzureNotificationProvider, Weavy.Core" />
</appSettings>

Profile provider

Is is possible to add custom user profile data by implementing a class that inherits from ProfileBase.

Implementations

Weavy comes with one built-in profile provider:

  • Profile – Inherits and adds profile properties such as Title, Department, Location, Bio etc.

Configuration

Profile providers are configured in the web.config file. If no configuration is provided, the default implementation is Profile.

<appSettings>
  <add key="weavy.profile-provider" value="Weavy.Core.Models.Profile, Weavy.Core" />
</appSettings>