AntTP - Serving Autonomi data over HTTP

It is about time there was a new release, so please welcome v0.4.1!

Github: Release v0.4.1 · traktion/AntTP · GitHub
Dockerhub: https://hub.docker.com/repository/docker/traktion/anttp/general

What does it add? Well, including 0.4.0, it now supports two substantial new features:

  • Streaming data download support
  • Multipart file uploads as async tasks

I’ll provide more documentation on how to use file uploads, but a quick example is:

POST http://localhost:8080/api/v1/archive
Content-Type: multipart/form-data; boundary=WebAppBoundary

--WebAppBoundary
Content-Disposition: form-data; name="testvideo.mp4"; filename="testvideo.mp4"

< /home/myhome/testvideo.mp4
--WebAppBoundary--

You can then check the status using the ID returned in the following format:

GET http://localhost:8080/api/v1/archive/status/<ID>

For streaming downloads, it happens automatically when your browser uses an embedded video player. It will ask AntTP if partial content is supported, then use it (as it is).

I’ve setup a quick test page here: http://d11e8cc28cefa6bd378248a2c99659de07bd136fab6fbcd662a70057226b0358/streaming.html

(obviously, you need your browser setup with AntTP as a proxy to access the above URL)

I’m still experimenting with supported file formats, but MP4 files should work well.

I also have a test video on my IMIM blog: http://62003e683b5a792f425a75c5d7d99d06e80f7047be8de8176b7d295e510b3b4c/blog/cec7a9eb2c644b9a5de58bbcdf2e893db9f0b2acd7fc563fc849e19d1f6bd872/article/streaming-on-autonomi.md#article

You can check out the improved performance with the latest Autonomi 0.4.3 libraries here too, with the website loading relatively quickly. Once a single page has loaded, the CSS, JS, fonts, etc, will all be cached indefinitely too, which makes it nice and quick after that point!

Lastly, you can also have some fun with VLC or your favourite video streamer. For VLC, you need to use localhost:8080, as it doesn’t like the URL format even with the proxy (annoyingly!)

E.g. http://localhost:8080/9bc691bb03f16936e3e6c5ddc7dd222d84c73aef714dad665bbdd4cd449451e4/newcastle-promenade-hq.mp4

So, please take a look and have a play. I hope you like it!

8 Likes