Skip to content

Commit

Permalink
feat: Extended the sdk-scheme-adapter documentation to be more comple…
Browse files Browse the repository at this point in the history
…te and include the bulk enhancements design and test implementation (#371)

* feat: Added sequence diagrams SDK Scheme adaptor usage and integration

* feat: updated the response object

* feat: added error codes for partylookup

* feat: changes after PR review

* fix: removed call hasSupportforbulk

* feat: add error codes for transfers

* fix: aligned the https status code to mojaloop

* feat: update http code as ML does not support 500

* feat: added quote error codes

* fix: few error code descriptions

* fix: fixed typos and data type

* fix: fixed typos and data type

* fix: rebuild the svg

* fix: rebuild the svg

* fix: rebuild the svg

* fix: rebuild the svg

* fix: added new error code

* refine the endpoints and payload

* refine the endpoints and payload

* feat: Added readme for SDK Scheme Adapter inc bulk

* feat: Scheme adapter docs added CQRS design

* feat:Updated sequence diagrams and design text

* chore: Merge master changes back into branch (#381)

* fix: misc docs fixes (#374)

* fix(link): edit page on github broken link

* feat(license): add license footers and text

* feat(license): add license footers and text

* fix(svg): images not rendering in api specification

* feat(mojaloop/#2743): documentation standards + contributors guide on node upgrade recommendations (#379)

feat(mojaloop/#2743): documentation standards + contributors guide on node upgrade recommendations - mojaloop/project#2743
- Updates to `standards/creating-new-features`
   - Added `Working on your Feature` section to include steps (Dependency Upgrades, Vulnerability Checks, Node LTS upgrade) required for PRs to be accepted
   - Fixed linting issues
- Updates to `standards/guide`
   - Updated LTS references to `Active LTS`
   - Added `Runtime Environment` section including NodeJS, Docker, CI
   - Added `Naming Conventions` section
   - Enhanced `Directory Structure` section to include standard generic files and include nvmrc for stipulating NODE LTS version

docs: fixes to the deployment guide
- Updated supported version for Mojaloop Helm releases v13 and v14
- Updated windows deployment guide to include `RECOMMENDATIONS` for Aug 2022

chore: maintenance
- Added lint NPM scripts
- Added `markdownlint.yaml` configuration file
- Updated `gitignore` with standard ignores
- Updates for the latest node LTS version
- Updated all dependencies
- Moved `Husky` git-hooks from package.json into Husky folder as per breaking changes introduced by upgraded dependency
- Updates to support ES-Module loader for latest `got` dependency lib
- Updated CI Config to use `.nvmrc` file
- Replaced all occurrences of `{% uml src=... %}{% enduml %}` with a direct link to pre-generated SVG versions
- Regenerated all PUML -> SVG files due to the updated dependency libs

Co-authored-by: Lewis Daly <[email protected]>
Co-authored-by: Miguel de Barros <[email protected]>

* docs: move bulk transaction api sequence diagram to sdk-scheme-adapter repo (#387)

* docs: move BulkTransactionsSequenceDiagramOverview to sdk-scheme-adapter repo

* Update docs/technical/sdk-scheme-adapter/SDKBulk-API-Design.md

Co-authored-by: Miguel de Barros <[email protected]>

Co-authored-by: Miguel de Barros <[email protected]>

* SDK Bulk- refactored; udated, add adoption & test (#390)

* SDK Bulk- refactored; udated, add adoption & test

* Update config.js

fixed config

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/BulkEnhancements/SDKBulk-EventSourcing-Design.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/assets/sequence/BULK-ERRORCODES.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/assets/sequence/BULK-ERRORCODES.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/assets/sequence/BULK-ERRORCODES.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

* Update docs/technical/sdk-scheme-adapter/README.md

Co-authored-by: Sam <[email protected]>

Co-authored-by: Shashikant Hirugade <[email protected]>
Co-authored-by: Juan Correa <[email protected]>
Co-authored-by: Vijay Kumar <[email protected]>
Co-authored-by: Lewis Daly <[email protected]>
Co-authored-by: Miguel de Barros <[email protected]>
Co-authored-by: Yevhen Kyriukha <[email protected]>
Co-authored-by: Sam <[email protected]>
  • Loading branch information
8 people authored Oct 20, 2022
1 parent ccc7132 commit 76b6763
Show file tree
Hide file tree
Showing 47 changed files with 21,691 additions and 15,407 deletions.
34 changes: 31 additions & 3 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module.exports = {
sidebarDepth: 2,
lastUpdated: true,
footerCopyright: 'Apache 2.0 Licensed | Copyright © 2022 Mojaloop Foundation',
// Ref: https://vuepress.vuejs.org/theme/default-theme-config.html#navbar
nav: [
{
text: 'Getting Started',
Expand Down Expand Up @@ -818,7 +817,7 @@ module.exports = {
"path": "central-event-processor/event-handler-placeholder"
},
{
"title": "Notiification Handler for Rejections",
"title": "Notification Handler for Rejections",
"path": "central-event-processor/notification-handler-for-rejections"
},
{
Expand Down Expand Up @@ -867,8 +866,37 @@ module.exports = {
"path": "sdk-scheme-adapter/"
},
{
"title": "Usage",
"title": "Integration Flow Patterns",
"path": "sdk-scheme-adapter/IntegrationFlowPatterns"
},
{
"title": "Bulk Integration Flow Patterns",
"path": "sdk-scheme-adapter/IntegrationBulkFlowPatterns"
},
{
"title": "Usage tests",
"path": "sdk-scheme-adapter/usage/"
},
{
"title": "Support for Bulk Transfers",
"collapsable": true,
"children": [
{
"title": "Overview",
"path": "sdk-scheme-adapter/BulkEnhancements/"
},
{
"title": "API",
"path": "sdk-scheme-adapter/BulkEnhancements/SDKBulk-API-Design"
}, {
"title": "DDD & Event Sourcing Design",
"path": "sdk-scheme-adapter/BulkEnhancements/SDKBulk-EventSourcing-Design"
}, {
"title": "Tests",
"path": "sdk-scheme-adapter/BulkEnhancements/SDKBulk-Tests"
}
],
"sidebarDepth": 2
}
],
"sidebarDepth": 2
Expand Down
1 change: 0 additions & 1 deletion docs/.vuepress/theme/styles/wrapper.styl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
$wrapper
max-width $contentWidth
margin 0 auto
padding 2rem 2.5rem
@media (max-width: $MQNarrow)
Expand Down
61 changes: 61 additions & 0 deletions docs/technical/sdk-scheme-adapter/BulkEnhancements/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# SDK Support for Bulk Transfers - Overview
This design document describes how the SDK Scheme Adapter has been enhanced to support the bulk transfers use case.

## Why? - Mojaloop bulk transfer limitations overcome
The implementation of bulk transfers within Mojaloop have the following limitations that this SDK bulk enhancement is designed to overcome.
1. Only individual transfers that are addressed to the same Payer DFSP may be included in a bulk quotes and bulk transfers call.
1. The number of individual quotes and transfers in each bulkQuotes and bulkTransfers respectively are limited to a maximum of 1000.
1. In order to allow bulk functionality, all Payee DFSP's need to create integration support for bulk messaging. I.e. If the bulk use case were to be introduced into an existing scheme, then all connecting DFSPs would need to upgrade their connections and integrations into their core banking systems.
1. There is currently no bulk discovery call.

## SDK Scheme Adapter bulk enhancement requirements
The enhancements enable:
1. Transfers where the discovery has not yet been called.
1. No limit on number of transfers (limited by infrastructure, network capabilities but > 1k that ML FSPIOP specifies)
1. Payee integration support for bulk being optional
1. Optionally support
- a single call that performs Discovery, Agreement and Transfer
- independently accepting of party lookups
- independently accepting of quotes
- setting a fee limit on the auto acceptance of quotes
- the skipping of the discovery phase
- running only the discovery phase
- setting an expiration for the bulk message
- home transaction IDs for both the bulk message and the individual transfers.
- both synchronous API calls and asynchronous API calls

## Features Implemented
The current implementation does not include all the features. All the features that have been completed are functional and can be used. Additional features and enhancements can be added to the existing functionality as prioritized by Mojaloop product and the community. This aligns with the MVP (Minimal Viable Product) agile concept.
These are the features that are currently implemented:

|Feature|Implementation Status|Release Version|
|---|---|---|
|Asynchronous Mode| released | v14.1.0 RC|
|Synchronous Mode| not started | |
|Auto Accept Party| not started | |
|Auto Accept Quote (with fee limit)| not started | |
|Only Validate Party| not started | |
|Skip Party Lookup| not started | |
|Bulk Expiration| not started | |

### Functional Diagram
![Functional Diagram](../assets/BulkSDKEnhancements.drawio.svg)

## Architectural Diagram
The Event Sourcing architecture has split the implementation into four components
1. **Backend API** :
The backend API receives API call and produces corresponding domain events, and monitors domain events to produce API callbacks.
1. **Domain Event Handler**:
The Domain Event Handler consumes Domain Events and produces Command events.
1. **Command Event Handler**:
The Command Event Handler consumes command events and produces domain events
1. **FSPIOP API**:
The FSPIOP API monitors domain events and produces corresponding FSPIOP calls, and monitors API Callbacks to produce corresponding domain events.

![Architectural Diagram](../assets/BulkSDKEnhancements-Architecture.drawio.svg)


## Overview Sequence Diagram
Here is a sequence diagram that outlines the role that the SDK Scheme Adapter will play in a bulk call, both for a Payer DFSP and a Payee DFSP.
![Bulk Transfer Sequence Diagram Overview](../assets/sequence/SDKBulkSequenceDiagram.svg)

Loading

0 comments on commit 76b6763

Please sign in to comment.