Difficulty: Basic Understanding of Data Schemas
Estimated Time: 15 minutes

Objective

The objectives of this scenario are to familiarize you with the concept of a schema registry and to get experience using one.

In this scenario we'll use the schema registry published by Apricurio.

What you need to know to start

In order to get full benefit from taking this scenario it helps to have a basic understanding of the usefulness of a schema registry and the pupose it serves when managing data in a distributed architecture.

Essentially a schema registry is a single source of truth for defining data schemas. Developers store schemas that describe the various data structures used by their services and APIs in a schema registry. Consumers query the schema registry to discover the schema(s) of the data that is to be submitted to and will be emitted from the given service or API.

using a schema registry

Server side developers and machine intelligence can use a schema registry to validate data coming into a service. Client side consumers can use a schema registry to ensure that data being submitted to a target conforms to the structure and types expected by the given service.

Contents

This scenario is divided into the following lessons.

  • Lesson 1 - Install Apicurio under Docker
  • Lesson 2 - Add schemas to the registry
  • Lesson 3 - Use the Apicurio web interface
  • Lesson 4 - Work with the Apicurio API at the command line

Executing command line instructions

This scenario is completely interactive. The instructions you'll be given will be executed directly in the terminal window that is embedded in the Katacoda interactive learning environment. In the steps to come, when you see a command line instruction with a black background and check mark at the end, like so:

Katacoda command line

just click on it and the command will execute in the interactive terminal window.

Click the START SCENARIO button to start.

Congratulations! You've completed the scenario, Working with a Schema Registry Using Apicurio.

This interactive scenario demonstrated how to:

  • Installed Apicurio under Docker
  • Added schemas to the registry
  • Used the Apicurio web page
  • Worked with the Apicurio API at the command line

Working with a Schema Registry Using Apicurio

Step 1 of 4

Installing Apicurio under Docker

Objective

The objective of this lesson is to install the Apicurio schema registry as a Docker container.

Steps

Step 1: Download the Docker image

docker pull apicurio/apicurio-registry-mem:1.3.2.Final

Step 2: Create the Docker container for Apicurio

docker run -d -p 8080:8080 apicurio/apicurio-registry-mem:1.3.2.Final

Step 3: Confirm that the Apicurio schema registry is up and running by making a curl call against it.

curl localhost:8080/api/artifacts

You'll get a response as follows because no schemas have been added to the schema registry:

[]

BEWARE: Sometimes it can take a minute or two for Apicurio to initialize in the Katacoda VM. Thus, you might have to click the curl command shown above in Step 3 a few times to get the expected response.


Next: Adding schemas to the registry