This guide will help you to start using Deckard and consists of the following sections:
Deckard is a priority queue that uses gRPC to communicate with its clients.
To learn more about its components please check the components documentation.
To check the available configuration options please check the configuration section.
To learn the structure of this git project and its folders, check the contributing guide.
To learn how to integrate Deckard with your application please check consuming section.
To understand which services are exposed by Deckard and its message and types, please check the documentation of Deckard's protocol buffer definition.
The fastest way to start using deckard is by using Docker or downloading its binary.
If you want to execute it in a Kubernetes cluster you can use the Helm chart.
You can run deckard using docker by using the following command:
docker run --rm -p 8081:8081 blipai/deckard
By default it will use a memory storage and a memory cache engine.
To change the default configuration see the configuration section.
To install the Deckard chart, use the following commands:
helm repo add deckard https://takenet.github.io/deckard/
helm install deckard deckard/deckard
It will deploy a MongoDB for storage and a Redis for cache.
Check the chart values.yaml to see all available configurations.
You can download the latest version of deckard from the releases page or by using the following script:
Linux Bash
wget https://github.com/takenet/deckard/releases/latest/download/deckard-linux-amd64.tar.gz
tar -xzf deckard-linux-amd64.tar.gz
chmod +x deckard-linux-amd64
./deckard-linux-amd64
Windows PowerShell
Invoke-WebRequest -Uri "https://github.com/takenet/deckard/releases/latest/download/deckard-windows-amd64.exe.zip" -OutFile "deckard-windows-amd64.exe.zip"
Expand-Archive -Path "deckard-windows-amd64.exe.zip" -DestinationPath .
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force
.\deckard-windows-amd64.exe
Deckard exposes a gRPC service that can be consumed by any gRPC client. You can find a documentation of the exposed service, messages and types here. Deckard contains a single proto file and it is located here.
We suggest the usage of Postman to consume the gRPC service manually. You can follow the steps below to configure Postman to consume the gRPC service:
- Install Postman.
- Open Postman and click on the
New
button:
- Select
gRPC Request
:
- Fill the
gRPC Service URL
with the address of the Deckard instance and the methods will be disovered automatically using the reflection server:
- Select the
Add
method to add messages and clickGenerate Example Message
. Change the message body if wanted and clickInvoke
.
Validate fields before sending, Postman may generate negative numbers for
int
fields.Also, Postman will not generate valid fields for the
payload
field. It will generate invalidtype_url
values. Check the documentation to see howany
fields works and how to generate thetype_url
field.
You have now successfully added messages to the Deckard queue.
Now you can use the Pull
method to consume messages and Ack
or Nack
to acknowledge the message. Remember to use the same queue
when using Pull
and the same id
when using Ack
or Nack
.
To learn how to configure deckard please check the configuration section.
To learn how to use deckard in your application please check the usage section and enjoy Deckard in your favorite programming language.