Nils Diewald

Sojolicious

A Perl toolkit for the Federated Social Web

Sojolicious is a toolkit for the federated social web, containing plugins for the powerful web framework Mojolicious written in Perl.

Synopsis


  use Mojolicious::Lite;

  # Load Plugins
  plugin 'WebFinger';
  plugin 'PubSubHubbub';
  plugin 'Salmon';

  # Establish Salmon Endpoints:
  group {
    under '/salmon';
    any('/:acct/mentioned')->salmon('mentioned');
    any('/:acct/all-replies')->salmon('all-replies');
    any('/signer')->salmon('signer');
  };

  # Add PubSubHubbub callback url
  any('/pubsub')->pubsub;

  # Hooks for incoming notifications
  hook on_salmon_follow => sub {
    # ... You receive a follow request
  };

  hook on_pubsub_content => sub {
    my ($c, $type, $dom) = @_;
    # ... You receive feed information you subscribed to
  };

  app->start;
  

Goal

Sojolicious mainly focus on support for the OStatus meta protocol and aims for a straight forward implementation of all surrounding specifications.

The design goal is to make all plugins useful on their own, as separated building blocks of OStatus, while playing well with each other. All plugins are application (despite the fact that they are Mojolicious plugins) and storage agnostic, providing event driven hooks for usage.

Some plugins will become separated distributions, in case this is useful.

For the moment the following plugins were already seperated:

Sojolicious is still work in progress (though slowed down quite a bit). There are still missing parts currently developed and existing parts reworked and maintained. It is not (yet) available as a complete system! However, you can try out all separated distributions published on CPAN.

Plugins

There were plans to expand the scope to other social protocols later, for example OExchange. Beside Federated Social Web awareness, there are plans to use these building blogs for indieweb concepts, like WebMentions.

Acknowledgement

Participation on conferences was supported by the BMBF-project Linguistic Networks.