Skip to main content

Animal Image Downloader

About the Application

The animal image downloader is an example application that illustrates how to interact with NATS and connect multiple capabilities to a single actor. The application:

  1. Accepts requests over NATS
  2. Downloads a random image of an animal via HTTP
  3. Saves the image to a blobstore
Local Blobstore

In this example, we'll be using the local filesystem for our blob store, rather than remote object storage.

Architecture and Design

Animal image downloader design

This application consists of a single actor, the animal image downloader. It is bound to the NATS messaging provider, the HTTP client provider, and the Blobstore-FS provider. Upon receiving a request, the actor downloads a random image of the selected animal to the local filesystem.


ActorContractProvider Implementation
Animal Image Downloaderwasmcloud:messagingNATS Messaging Provider
Animal Image Downloaderwasmcloud:httpclientHTTP Client Provider
Animal Image Downloaderwasmcloud:blobstoreBlobstore-FS Provider

Source Code

The code for this actor can be found in the wasmCloud examples repository.

The code for the capability providers can be found in the wasmCloud capability providers repository.