Navigation in the article
- Resolver and resolving
- Resolver in the context of GS1 Digital Link
- GS1-Conformant resolver
- Options for implementing the GS1 DL string resolver
- GS1 DL resolving methods used on this site
- GS1 SK resolver
Resolver and resolving
Resolver is not a concept associated only with GS1 standards. In the Internet environment, a resolver can refer to a service or process that accepts input data and responds with output data that it has generated by processing the input data.
An example is Domain Name Service (DNS) resolvers, which are responsible for redirection within the Internet. Addresses on the Internet are similar to those we use in the real world. When we want to send a letter to someone, e.g. to the GS1 Slovakia Secretariat, it is not enough to just write 'GS1 Slovakia, Secretariat' in the address field. You need to include the full address, i.e. the street, the postal code, the postcode and the city. If you have the address details stored in your contacts, you only need to type 'GS1 Slovakia, Secretariat' and the rest will be automatically filled in according to the stored details. On the internet it is similar and in browsers it is simplified. In web browsers, you only need to know the 'text-only address' of the page you want to visit, e.g. the GS1 SK website https://www.gs1sk.org/. The rest of the routing is done by your browser and other elements of the internet network. One of the operations is 'resolving' the text address https://www.gs1sk.org/ to an Internet IP address, e.g. 192.168.1.25. Your browser then connects to the retrieved IP address, from which it draws the data it displays to you for https://www.gs1sk.org/.
The following is a very simplified description of a dummy DNS resolver for https://www.gs1sk.org/
- The user enters https://www.gs1sk.org/ into the browser.
- The browser contacts the DNS resolver and requests the IP address for https://www.gs1sk.org/.
- Resolver will start solving the task for input: https://www.gs1sk.org/
- Checks the DNS cache memory to see if the result for the input is stored there.
- Answer: It is not.
- It contacts the root nameserver and asks for the IP address for https://www.gs1sk.org/.
- Answer: Root nameserver contains only references to level 1 domains. Look for the IP address for https://www.gs1sk.org/ in the .org nameservers.
- It contacts the .org nameserver and asks for the IP address for https://www.gs1sk.org/.
- Answer: The .org nameserver contains the nameserver references of .org domains. Look for the IP address for https://www.gs1sk.org/ in the speedweb.org nameservers.
- It contacts the speedweb.org nameserver and asks for the IP address for https://www.gs1sk.org/.
- Answer: The IP address for https://www.gs1sk.org/ is 192.168.1.25
- Checks the DNS cache memory to see if the result for the input is stored there.
- Resolver returns to the browser the result of the resolving process: IP address for https://www.gs1sk.org/ is 192.168.1.25
- The browser retrieves data from the IP address 192.168.1.25 and displays it to the user as https://www.gs1sk.org/.
In other words, from the input 'https://www.gs1sk.org/', the DNS resolver will return the output '192.168.1.25'.
Resolver in the context of GS1 Digital Link
In the context of the GS1 Digital Link (GS1 DL) standard, the resolver represents the link between GS1 identifiers and their associated online resources. In terms of GS1 identifiers, this can be, for example, a product identifier (GTIN) or a location identifier (GLN). In terms of associated online resources, it may be a web address or data obtained via an API interface based on a GS1 key.
So the principle remains the same: Resolver returns output data based on the processing of the input data.
Example for data processing in GS1 DL resolvers:
- The user enters HTTPS://ID.GS1SK.ORG/01/08580000000016 into the browser.
- The HTTPS://ID.GS1SK.ORG, website, which serves as our GS1 SK resolver, will start processing the input.
- From the input HTTPS://ID.GS1SK.ORG/01/08580000000016 it gets the URL path: /01/08580000000016
- Gets the GS1 identifiers from the URL path [GTIN (01) 08580000000016]
- Validates the retrieved identifiers (e.g. in terms of length and allowed characters)
- Determines whether data is available for the given identifier (e.g. in a database).
- Is not - returns redirection to error page: Data not found.
- Is - returns a redirect to the specified URL for the given identifier.
- Performs redirection according to the data returned from the previous step.
- The user is presented with the resolving result for the GS1 DL input data HTTPS://ID.GS1SK.ORG/01/08580000000016, which is the website https://dl.gs1sk.org/products/UdeneMasoPanenka
GS1-Conformant resolver
The GS1-Conformant resolver links an object or entity identified by a GS1 identifier to one or more online resources associated with it. The object or entity can be identified at any level of detail and the resource can be either human or machine readable. For example, such a resource may be a web page, an online manual, a drug package leaflet, product data, or an API service for providing data. By fulfilling all conditions, each GS1-Conformant resolver becomes part of a coherent, but distributed, network of links to information resources.
The GS1-Conformant resolver does not need to support all primary GS1 identification keys, it may only support a subset, e.g. only GTIN, or only GTIN and GLN. However, it is mandatory that for each supported primary identification key it must support all its key qualifiers and data attributes.
Basic functions of the GS1-Conformant resolver
The GS1-Conformant resolver must operate according to the standards rules defined in HTTP 1.1, or higher, for GET, HEAD and OPTIONS requests and must support HTTP over TLS. In addition to HTTP, the resolver must implement Cross-Origin Resource Sharing (CORS) to allow client-side JavaScript web applications to access the resolver across domains. GS1 identification keys are expressed as GS1 Digital Link URIs, which serve as resolver input.
In addition to the above, the GS1-Conformant resolver shall also include the following features:
- Decompression
- Basic validation
- Providing links
- Deep validation
Decompression is required if the URI in the request has been compressed, e.g. it has been stored in the RFID tag's EPC memory.
Basic validation means checking the specified URI and extracting GS1 Application Identifiers from the URI path.
The provision of links consists of several obligations:
- Provide links to resources related specifically to the entity identified by GS1 identification keys.
- One of the links for a particular value in the resolver must be set as the default and the resolver must redirect to it whenever it does not have more accurate data.
- If the value of the 'linkType' attribute is 'linkset', or the HTTP Accept header is set to 'application/linkset+json', then the resolver must not redirect the request, but must return a list of all available links according to the Linkset standard.
- When redirecting, the resolver must make available a direct link to the 'linkset' values in the HTTP Link header. The only exception is if the resolver redirects to another resolver.
Deep validation is a detailed check of the specified URI and GS1 Application Identifier properties in order to improve the analysis of the input data and provide better data for error reporting.
All requirements for the GS1-Conformant Resolver are specified in the Conformance statement section of the GS1-Conformant Resolver Standard document.
Options for implementing the GS1 DL string resolver
Unless we are talking about direct links where the GS1 DL string is identical to the URL, e.g. https://dl.gs1sk.org/01/08580000000009, i.e. no redirection takes place, it is necessary to have some service that will perform the role of a GS1 DL resolver that redirects the incoming GS1 DL string to the associated URL.
The GS1 DL resolver can be created and implemented in several ways. Below we have selected and described what we believe are the most likely options.
By provider:
- Third Party Services
- Custom Service
One option is to use the services of a third party that runs its own resolver, or a resolver together with the presentation part. Such a service is for example our EANonline platform which is available to our members. This offers the creation of a GS1 DL string for the data you enter. We have provided more detailed information in the article Resolver - EANonline.
Another option is to run your own GS1 DL resolver service. In this case, you have full control over the resolver and its functions.
By the development of your own service:
- Custom Solution
- Third Party Solution
When running your own service, you need to decide whether you want to develop your own GS1 DL resolver software solution or adopt an off-the-shelf software solution from a third party.
An example of an off-the-shelf third-party software solution is the GS1 Community Edition Resolver, which is freely available on the GitHub platform under the Apache 2.0 license.
By the domain of your own service:
- Main domain
- Subdomain
Another decision when running your own service is determining where it will be hosted within your domain. The two main options are a main domain, e.g. https://www.gs1sk.org/, or a subdomain, e.g. HTTPS://ID.GS1SK.ORG.
Using a main domain has the advantage that the customer sees your domain name, not another domain or subdomain, when they scan the GS1 DL QR code. Less technically knowledgeable customers may be put off or suspicious by the sub-domain name, e.g. 'id' in id.gs1sk.org. To separate the resolver from the rest of the page, it can be moved to a subfolder via a URL path, e.g. https://gs1sk.org/vyrobky/resolver/01/08580000000009 [the specified page does not exist, this is just an example].
A subdomain has the advantage over the main domain that it can be a completely separate and independent web application. If you were to make changes to the main site, whether changing the framework, programming language, design, or anything else, it would not affect the resolver located on the subdomain. If the URL paths of the products were preserved, the resolver and its data would not need to be modified.
Both of our websites dedicated to the GS1 Digital Link standard are hosted on subdomains of our main domain https://www.gs1sk.org/. The Resolver is hosted on the 'id' subdomain HTTPS://ID.GS1SK.ORG. The educational page with products and explanation of the standard is on the 'dl' subdomain https://dl.gs1sk.org.
GS1 DL resolving methods used on this site
Within the examples on this site we have used 4 ways to link GS1 DL strings to online content:
Each of the methods used is linked to its own page with an explanation of the basic functionality and some examples.
GS1 SK resolver
For our own needs, we have created our own GS1 SK resolver that manages the redirection of GS1 Digital Link strings from id.gs1sk.org (resolver) to dl.gs1sk.org (manufacturer/catalog). Our resolver is GS1 non-conformant. We plan to publish its schema and demo application in the future. A detailed description of our resolver is in the article Resolver - GS1 SK Resolver.