Thursday, March 21, 2013

Basic Guide to Spotnab

Disclaimer: This guide assumes that your NN+ installation is completely up to date and functioning normally, but you have not yet enabled spotnab or simply don't understand the functionality.


What is Spotnab?

Spotnab is a way for NN sites to exchange information via usenet. Currently it is only used for the exchanging of user comments, but in theory could be used to handle much more.

Why use Spotnab?

Many NN+ users do not have a large user base, but still would like to have a human element verifying the contents and/or completion of releases.  Spotnab allows you to see comments on your releases even if you only have a single user on your site.


The importance of the Global ID (GID):

Spotnab requires some sort of universal method for matching a release on a particular site, with a release on a different site, so the concept of the Global ID was born.  However, because this is a brand new field in the releases database, the GIDs must be generated for every release currently in your database, and every future release.  

Before GIDs have been generated for all your releases, you may receive comments from Spotnab sources, but they won't necessarily be matched to releases.

During update_releases, 500 GIDs will be generated, starting with your newest releases and working backwards.  If you would like to generate the GIDs in a larger batch by hand, please see my post on Spotnab Command Line

The Basic Setup:

For users who only want to receive comments from other NN+ sites, the setup is quite simple. 

First, go to Admin/Edit Site, then scroll down to Spotnab.  Simply enable Autodiscovery, and leave everything else alone.

None of the other options are necessary if you only want to receive comments, and not share comments from your own site. This is what the vast majority of NN+ users will likely want to do.  For the sake of the other users, it would be best not to clog the Spotnab sources list with empty sources.

Once you have enabled Auto Discovery, on your next run of update_releases.php, Spotnab will look to see if any sources have been broadcast in the last 1 day, and then add them to your list of sources.  After a run or two of update_releases, you will most likely see at least a few sources in Admin/View Spotnab sources.


All sources will show 0 comments until you enable them, and comments are downloaded for that particular source.  Comments, much like sources, are refreshed during each run of update_releases.

In the console you will likely see something like this:


Once you have some comments rolling in, you should be able to view comments, even if they are not yet attached to releases, in Admin/View Comments.

If you see the comments "inserting" but no comments are actually showing up, ensure you do not have any strict modes enabled in MySQL.  You can check to see what SQL Modes you have enabled from a MySQL command prompt with the command "select @@sql_mode;" If you do see any strict modes enabled, you will need to remove them from your MySQL config, and restart the the service.


Posting:

In order to enable the posting of comments from your site, the only thing you should need to do is enable Posting and Broadcast Source under the Spotnab options in Admin/Edit Site. It may also be to the benefit of your users to enable privacy, which will ensure that comments are posted with a random nickname as opposed to their actual username on your site.

You may need to contact your Usenet Service Provider (USP) to enable posting permissions on your Usenet account, as several providers do not allow posting by default.


No other options need to be filled in. You can leave the username, email, public key and private key blank, as they will be automatically generated.

Once you have these options enabled and you have run update_releases a couple times, you should see the username, email, public and private key filled out.  If they are not, you likely have an issue with OpenSSL.  Make sure it is installed on your system, and that the OpenSSL extension for PHP is either compiled in directly, or enabled as a shared library. (Uncomment openssl.so on *nix systems, openssl.dll(?) on Windows systems)

As long as you can post via your USP, and your keys have generated properly, your output during update releases should look something like this, noting the "Spotnab: 1 posting..." output.


A quick explanation of broadcast source:

Broadcast source is what facilitates the Autodiscovery function of Spotnab.  With it enabled, your NN+ will send out a broadcast "packet" every 30 days to inform other users of the existence of your Spotnab source.  Without this broadcast, only people you privately exchange keys with will be able to read your posted comments, or even know that you exist as a Spotnab source.

-Thracky

1 comment:

  1. Thracky, thank you for this posting. It was more than helpful.

    ReplyDelete