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. It would for instance be possible to implement a blob provider that stores file in Azure blob storage.

Implementations

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

Configuration

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

<configuration>
    <weavy>
        <blob provider="Weavy.Core.Providers.SqlServerBlobProvider, Weavy.Core" />
    </weavy>
</configuration>

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 instance 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.

<configuration>
    <weavy>
        <cache provider="Weavy.Core.Providers.AspNetCacheProvider, Weavy.Core" />
    </weavy>
</configuration>

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.

<configuration>
    <weavy>
        <notification provider="Weavy.Core.Providers.AzureNotificationProvider, Weavy.Core" />
    </weavy>
</configuration>

Index provider

The IIndexProvider interface can be implemented to replace the default fulltext index and search feature.

Implementations

Weavy comes with one built-in index provider:

Configuration

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

<configuration>
    <weavy>
        <index provider="Weavy.Core.Providers.LuceneIndexProvider, Weavy.Core" />
    </weavy>
</configuration>

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.

<configuration>
    <weavy>
        <profile provider="Weavy.Core.Models.Profile, Weavy.Core" />
    </weavy>
</configuration>