https://github.com/uoregon-libraries/rais-image-server/wiki/Release-Notes#release-300

I posted about two years ago here about this project, but it's had some 
massive changes since then.

Briefy, RAIS is a IIIF-compliant image server (see iiif.io).  It conforms 
to level 2 of the IIIF Image API 2.1.  This means you can put images 
somewhere, tell RAIS how to find them, and serve them up in a variety of 
ways.  The primary use-case is hooking up OpenSeadragon (or a similar 
front-end application) to provide panning and zooming capabilities for 
images that are too big for effective downloading.  But the IIIF Image spec 
also has a few interesting image manipulation options for things like 
on-demand thumbnail generation, image rotation, and cropping.

A real-world example of RAIS in action can be seen at our Oregon Historic 
Newspapers website.  For instance, 
https://oregonnews.uoregon.edu/lccn/sn83008376/2016-10-17/ed-1/seq-1/ - the 
tiles for that pan-and-zoom window are served up by RAIS.  But RAIS (and 
most IIIF image servers) can do a lot more than just these pan-and-zoom 
views.  Say, if you wanted a close look at a particular old-timey ad: 
https://oregonnews.uoregon.edu/images/iiif/batch_oru_elk_ver01%2Fdata%2Fsn84022653%2F00000000018%2F1876122301%2F0190.jp2/2180,2600,1310,730/max/0/default.jpg.
  
Or maybe for some reason you want to reverse the headline of an article: 
https://oregonnews.uoregon.edu/images/iiif/batch_oru_20161212AggressiveStrudel_ver01%2Fdata%2Fsn85042482%2Fprint%2F2016090701%2F0009.jp2/1440,220,650,250/max/!0/default.jpg

IIIF doesn't allow us to do complex image manipulations, but for most 
purposes we serve images on the web, it's a great option.  And RAIS, 
written in Go with low-overhead C bindings to openjpeg, is quite possibly 
the fastest open-source IIIF server available for serving up JP2 images.  
It's also fast for other sources, but JP2 is where it truly shines.

(For those who aren't aware, JP2 images are a high-quality, low-filesize 
format that is extremely memory-friendly: decoding part of a JP2 is 
possible without loading the entire thing into memory.  They're slower to 
decode than any other image format we've considered, but they save us so 
much disk space that the performance costs are more than acceptable.  JP2s 
can be 50% to 25% the size of a comparable JPG image while also giving us 
the partial-decode properties JPGs don't have)

Though I don't love having system-level dependencies, the openjpeg bindings 
allow us to tout RAIS for its speed.  Other IIIF servers either shell out 
to command-line applications or use C bindings that simply aren't as 
performant as Go's.  Combine that with the high concurrency built right 
into the net/http package, and Go has turned out to be the perfect choice 
for this application.

The geeky details gophers might appreciate that end-users probably won't:

RAIS 3 now uses Go 1.11's modules.  I am enjoying this approach.  I miss 
"gb" some, but modules seem like a very acceptable compromise in the name 
of consistency.

RAIS includes plugin support and has example plugins that do things like 
enable pulling from S3 on demand or adding DataDog middleware.  Compile 
RAIS, compile your desired plugins, drop them into plugins/, and RAIS just 
runs them.  I'm really liking plugins.

RAIS includes a cache I found on hashicorp's github repo.  For systems with 
a lot of RAM or with a small exhibit of images, tile caching is a huge 
win.  But even on sites without so much RAM, the cache is fairly decent 
because it uses a 2Q LRU - which means it's not just throwing away the 
oldest items.  Popularity of cached items is a factor for what stays 
cached, which is very interesting to me.

As I mentioned two years ago, RAIS was my first Go project, and I had 
literally zero Go experience before being asked to look at it.  It was 
originally a proof of concept and I had no idea what to do with it.  Unlike 
every other "first project in a new tech/framework/language", RAIS has been 
easy to maintain and keep running since its inception.  RAIS has now been 
in production and gotten maintenance on and off for four years.  I think 
that speaks volumes to the power of simplicity, something Go offers that I 
just don't feel I can find anywhere else.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to