Is it possible for a Live Caller ID server to specify different datasets?

In the documentation for the example Live Caller ID server (https://swiftpackageindex.com/apple/live-caller-id-lookup-example/main/documentation/pirservice/testinginstructions) there is an example service-config.json. file shown (without thorough documentation).

That config file, and the whole of the instructions, center around there being two datasets of numbers: block and identity.

My question is - is it possible for more than one dataset to be specified i.e. for block1 and block2 to be specified?

The use case for this would be - suppose the Live Caller ID server has a set of numbers it has identified as being nuisance callers and so it lists these in the block section. However user A might want all these nuisance callers to be blocked but user B does not. Therefore the Live Caller ID extension on the handset would need to use a different dataset on the server so that user A's calls from a set of numbers is blocked, but user B's are not.

Note that I'm not suggesting that the Caller ID server should be capable of storing individual user's preferences. All that would be required would be two data sets: one where blocked content is none and and one where blocked content is some. Then a user/app could switch between them as indicated by the user.

Is that possible? If the database structure and service-config.json etc. is not configured to permit that, then could two different servers be set up to achieve this instead? i.e. so the server url specified in the app's extension can be set at run time and not at compile time?

Answered by Technology Evangelist in 798313022

It is not supported in the example service, but in general, one can route different requests to different datasets based on the "user tier". So this is still supported with one "service URL".

When a PIR request comes to a server: it has 3 fields that useful for routing to a different dataset.

  1. usecase name: this is pretty much fixed on device between identity and block.
  2. configurationHash: identifies what version of the configuration was used to construct the request. A service might choose to keep the previous version of the dataset available for a while, until all clients have had a chance to fetch the configuration for the new dataset.
  3. user tier: This can be used to provide different service. Like your example of blocking nuisance numbers or not. Another example how to use user tiers would be: provide names only vs provide names plus images.
Accepted Answer

It is not supported in the example service, but in general, one can route different requests to different datasets based on the "user tier". So this is still supported with one "service URL".

When a PIR request comes to a server: it has 3 fields that useful for routing to a different dataset.

  1. usecase name: this is pretty much fixed on device between identity and block.
  2. configurationHash: identifies what version of the configuration was used to construct the request. A service might choose to keep the previous version of the dataset available for a while, until all clients have had a chance to fetch the configuration for the new dataset.
  3. user tier: This can be used to provide different service. Like your example of blocking nuisance numbers or not. Another example how to use user tiers would be: provide names only vs provide names plus images.

@Technology Evangelist Thank you for the reply.

Is there some documentation or example on how to achieve using a different user tier to specify a different dataset in relation to the service-config.json of the example server?

Just looking at the structure of the service-config.json (and its description of a couple of things) I wasn't able to see what the connection is between the different user tiers and the use cases.

That isn't implemented in the example server, so I don't have an implementation of that which you can reference, but is good feedback for consideration. The general approach however could be used by your own implementation.

Is it possible for a Live Caller ID server to specify different datasets?
 
 
Q