beckn / protocol-specifications

Core protocol specification for peer-to-peer consumer-provider interaction
Other
367 stars 100 forks source link

Enabling Pagination on Protocol #329

Open nitinmish opened 1 year ago

nitinmish commented 1 year ago

Name: Protocol Specifications Title: "Enabling Pagination on Protocol" Labels: C4GT Community


Description

Discussed in https://github.com/beckn/protocol-specifications/discussions/328

Originally posted by **nitinmish** November 28, 2022 BecKn works on stateless asynchronous APIs, whereby the search intent issued by a caller is responded with list of items matching the search intent and keywords. In context of ONDC, currently, a search intent is raised by a buyer platform, against a transaction ID. The Gateway assesses the search intent by domain and sub domain and broadcast the intent to relevant platforms to respond. Intent is further responded by respective seller platforms pushing catalogs on the same transaction ID to ensure session sticky ness for the search responses. We have observed that in some cases, the number of items in a search response array is significantly large leading to processing bottlenecks. Thus, a pagination feature is needed to enable seller platforms to respond against a single search intent. Following are inherent extension of the feature: Pagination shall ensure the API transmission stays light weight and performant. This will also ensure the buyer Apps to manage load on their side, leading to managing user experience better Inherently, the catalog becomes more current and optimised for application of TTLs as the new search requests will mandatorily have to go for network search Sellers will have more flexibility to order the catalog items basis their own requirements Responses to buyer can be more efficient. In B2B context, same flag can be used to issue action request on BAP side to expect a final quote against a search query at a later time. Following is a proposed flow with change in Context section of on_search payload: ## Goals - Introduction of a new flag in context with a booloen txn_open, on same transaction ID but distinct message ID { "context": { "domain": "string", "country": "string", "region": "string", "action": "on_search", "version": "string", "bap_id": "string", "bap_uri": "string", "bpp_id": "string", "bpp_uri": "string", "transaction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "message_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", “txn_open”: “Y” "timestamp": "2022-11-28T08:49:27.973Z", "key": "string", "ttl": "string" } ## Expected Outcome - Upon a search intent received by a buyer App, buyer app may keep the transaction open for a time specified in the API Specs contract. Buyer Apps can render the results on PDP as the search responses are received. Buyer App may extend the time-limit for closing the transaction if this flag is received in subsequent payload, capped at a maximum value. --- ### Project Beckn ### Organization Name: Beckn Open Collective ### Domain Others ### Tech Skills Needed: Open API 3.0 beckn protocol ### Mentor(s) Ravi Prakash ### Complexity Medium ### Category Feature ### Sub Category Research, Backend @core-wg-admin @pramodkvarma
c4gt-community-support[bot] commented 10 months ago

Hi! Mandatory Details - The following details essential to submit tickets to C4GT Community Program are missing. Please add them!

Without these details, the ticket cannot be listed on the C4GT Community Listing.

Important Details - These following details are helpful for contributors to effectively identify and contribute to tickets.

Please update the ticket

Shurtu-gal commented 8 months ago

@nitinmish Is this still relevant ?