Overview
This project aims at fulfilling the need for a service that will allow customer’s software to interface with livestock traceability services of various countries through a single interface.
This is accomplished through a standardised API, which provides a consistent interface to the various traceability services. Traditionally any software provider wishing to integrate with government livestock traceability services would need to connect to each one individually and know all the intricacies of each service and how to make that work with their software. This project makes this much easier, as it integrates all of the different services into a cohesive interface which enables consumers to more easily interact with the different services. The API allows consumers to:
- Manage applications that communicate with the API
- Manage Properties and their user credentials
- Send Transactions and receive their results
Solution Components
The solution is made up of the following components:
- An API
- Queue Processing (used to send the Transactions)
- The individual interactions with each service
- Polling used to check traceability services for responses
API
The API Provides the following:
- Management of Applications to use the service
- Management of Properties for an Application
- Manage user credentials for a property, by species and or service
- The ability to interrogate what services are available and what capabilities they provide
- The ability to submit transactions for a given property to the appropriate service for the species specified
Service providers – assuming it’s a hosted service:
- To be able to tell the system about the service providers and be able to change their details
Services (e.g. CTS/BCMS, ARAMS, etc):
- To list the services supported and then get a service and its capabilities and data requirements. These need to be defined in a systematic way (using regular expressions)
Applications:
- A service may operate more than one application
- Each application has its own authentication key which it uses to access the API
- The service will allow a service provider to manage applications (register/update/list/delete)
Properties:
- Manage Properties (list properties and add, update and remove properties)
- Manage the credentials for the properties to ensure that records can be sent to the appropriate services
Transactions:
- Transactions are for performing operations like registering tags, registering animals, animals arriving on a holding, animals being sent from a holding, deaths
- The base system has the general functions such as getting the available types of transactions, getting transactions and the status of the transaction and getting the animals included in a transaction
- Implementing the transactions is covered in the specific services
Queuing:
- All transactions are queued, and the queue will take care of ensuring that the status of each transaction is up to date and that errors are returned in a timely manner
- The queue handles the processing of transactions as well as ensuring that they are retried in the event of network or service failure.
UK sheep and cattle services
- This encompasses the services BCMS, DAERA, LIS (Holdings), EID Cymru, ScotEID
- Existing code from our pureFarming platform has been leveraged as much as possbile
- This covers the specific functionality to create, validate, update and delete transactions for each service
NLIS (Australia) and NAIT (New Zealand)
- Creation, validation, updating and deletion of transactions for NLIS and NAIT