Some important changes to Known were merged in over the weekend.

Most notably, (most) external dependencies are now managed and installed via Composer, and not included natively in the repository itself.

This makes updates easier to manage, but it does mean that if you are installing from (or more importantly, upgrading from) the git repository directly, you will need to perform an extra step.

cd /path/to/known; composer install

This is particularly important if you’re upgrading, and your site is a checkout of the git repo.

Some other important changes

Composer was the big one, but there have been a number of other important changes you should probably be aware of, especially if you write code for Known:

Support for IdnoPlugins.local

You can now put your custom plugins in a separate IdnoPlugins.local directory. This works exactly like IdnoPlugins, but gives us a way of nicely separating custom code from package code.

FileSystem interface change

File systems now support storeContent() for storing content to a file from a variable in memory.

This must be implemented by any class that implements this interface, therefore if you maintain a FileSystem plugin, you’ll need to update your code.

SQLite is deprecated

SQLite is not widely used, and supporting it introduces a fair amount of technical debt.

Support is now deprecated, and will be removed in a future release.

The Interplanetary File System (IPFS) is a distributed, peer to peer, file system. It’s pretty cool. So, here’s an experimental plugin that adds backend file system support for this protocol for Known. 

Currently this functions as a drop in replacement for the Known file storage system, along the same lines as the S3 plugin. It’ll store photos, profile pictures, and any other stored data to IPFS instead of on the local file system, or in Mongo (if you’re using Mongo).

Usage 

You’ll need an IPFS server to talk to. For development I installed go-ipfs, so you can use that, or one of the public ones.

Next, copy the IPFS directory to your IdnoPlugins directory, and activate it.

By default, the plugin is set up to talk to localhost but you probably don’t want to do that forever, so update your config.ini as follows:

[IPFS]
host = 'servername'
port = 1234
apiport = 5678

Replace the values accordingly, but make sure you keep the [IPFS] section header.

Still to do

At the moment, this is a drop in functional replacement for file storage, and doesn’t go into some of the cooler things you can do with Content-Addressable storage.

As pointed out in this ticket, an obvious improvement would be to cache stuff from the image proxy to IPFS (which already takes place), but to directly reference them via their content hash (which doesn’t currently take place), as this should be more efficient.

Anyway, that’s future development and would require some core hooks. I’ll get to that next, I’m sure.

Anyway, kick the tires and let me know your thoughts. Pull requests more than welcome!

» Visit the project on Github...