SeaMist Update – External Storage

SeaMist Update

SeaMist – a .NET based library for the REST API. Available on GitHub

I haven’t updated SeaMist, .NET C# wrapper for the API, for a while and also wasn’t really planning to provide an updated version. However, after looking at the open issues / enhancements requests, I found out there was some demand for implementing External Storage support.

SeaMist Update explained

Within this section I just wanted to share some of the design and implementation decision I’ve made to make it all working. At the moment supports four types of external storage; Amazon S3, Rackspace Cloud Files, Microsoft Azure and SoftLayer Object Storage. Due to this I’ve decided to implement a pluggable DataStore model which contains all external storage related configuration settings.

Each external storage type also requires a custom OptimizeWaitRequest Model, here it’s possible to implement additional logic however, another reason for having this is to eliminate the need for dynamic JsonProperties. I’m thinking of changing this in the future because this saves a lot of code, on the other hand, I might want to move the logic within a base class (which I did after writing this paragraph).

Extending the client was simple, just accepting the IOptimizeRequest interface instead. The only problem was to determine which OptimizeWaitRequest to use when using the shorter Optimize client calls only expecting the Image URL and DataStore. For this case the OptimizeWaitRequest will be created dynamically using the FactoryOptimizeWaitRequest.

About the name: Naming projects always feels somewhat odd to say the least. I’m assuming that the name Kraken comes from the legendary sea monster that is said to dwell off the coasts of Norway and Greenland. And therefore have chosen a name closely related to the story.

Apart from this I’ve also work on the Amazon S3 and Microsoft Azure Blob storage implementations and some bugs. Code samples on how to use External Storage can be found in the section below.

Code samples:

Post Navigation