Skip to main content

this is the Halo Bian library

Project description

Halo Serverless

Halo Bian - Flask BIAN Python Reference Architecture Library

The Halo Bian library is based on the Halo library which is a python based library utilizing Serverless technology and microservices architecture

BIAN (Banking Industry Architecture Network) is a membership group committed to developing open standards around banking and financial services. A key deliverable of this group is the BIAN Service Landscape model which defines a comprehensive services architecture for financial transactions and facilities. This library is an implementation of the BIAN model leveraging the Flask framework and allows a developer to rapidly create BIAN-compliant services while hiding much of the underlying BIAN model details. See www.bian.org for more information on BIAN.

This library leverages not only the Flask framework, but a number of the Flask Cloud Services components as well to facilitate building robust and resilient cloud-native BIAN microservices. deploy your Service Domain to your local environment or use Serverless Framework and zappa to deploy your Service Domain to AWS.

BIAN Basics

Before diving into the library architecture, it helps to understand two key concepts within BIAN, service domains and control records.

Service Domain

The BIAN Service Landscape defines discrete areas of responsibility known as service domains. A Service Domain is a combination of a Functional Pattern and an Asset Type. For instance, using the functional pattern 'Registry' with the asset type 'Product' would yield a 'Product Registry' service domain, which could be used to manage a product catalog. If we instead changed the asset type to 'Device', we would have a 'Device Registry' service domain that could be used to authorize services on a mobile device.

Control Record

The Control Record is used to track the state of a service domain, and like the service domain is derived from the functional pattern and asset type. However, in a control record, the functional pattern is represented by the Generic Artifact Type. There is a one-to-one correlation between functional patterns and generic artifact types. The control record goes one step further in delineating between specific service domain operations by introducing an additional parameter called the Behavior Qualifier, which, like generic artifact types, have a one-to-one correlation with functional patterns.

In Addition

  • The commercial behaviors that are called Functional Patterns. Functional Patterns, Generic Artifacts and Behavior Qualifier Types are mapped and correlated:
    Flask BIAN Functional Patterns

    Image From Bian Manual

  • A Service Domain applies one of the 18 functional patterns to instances of one type of asset: Flask BIAN Asset Types

    Image From Bian Manual

  • The standard set of ‘action terms’ that characterize the range of service operation calls : Flask BIAN Action Items

    Image From Bian Manual

  • The Default Action Term By Functional Pattern matrix:

Flask BIAN Matrix

Image From Bian Manual

BIAN Summary

So to summarize the above:

Functional Pattern ==> Generic Artifact Type ==> Behavior Qualifier

Functional Pattern + Asset Type = Service Domain

Generic Artifact Type + Asset Type + (optional)Behavior Qualifier = Control Record

Functional Pattern is correlated with a set of Action Term = Service Domain Operations

Key Benefits of using BIAN API solutions:

  • Support for Emerging Industry Approaches – Two key technology approaches are considered: API development and the adoption of a Micro-service architecture
  • Support for Industry Standards – The BIAN Service Domains and service operations present an Industry standard definition for the componentization and service enablement of Banking
  • Support for Incremental Adoption/Migration – BIAN aligned solutions can be implemented and adopted incrementally enabling a prioritized migration from constraining legacy architectures

Architecture

The Flask BIAN library implements a BIAN service domain wrapper that acts as an API and data translator while hiding much of the BIAN model complexity from the developer.

Flask BIAN Service Domain

Halo Bian provides the following features:

  • Bian version 7 - API release competability
  • OAS ver. 2 support
  • BianRequest object provides bian parameters support
  • ServiceProperties object provides service status
  • AssetType, GenericArtifact, BehaviorQualifier support per service domain
  • BianServiceInfo object privides Bian details per service
  • Support for all Bian Service Operations
  • Support for all FunctionalPatterns

Halo provides the following features:

If you are building a Python web app running on AWS Lambda (Flask), use this library to manage api transactions:

            sagax = load_saga("test", jsonx, schema)
            payloads = {"BookHotel": {"abc": "def"}, "BookFlight": {"abc": "def"}, "BookRental": {"abc": "def"},
                        "CancelHotel": {"abc": "def"}, "CancelFlight": {"abc": "def"}, "CancelRental": {"abc": "def"}}
            apis = {"BookHotel": self.create_api1, "BookFlight": self.create_api2, "BookRental": self.create_api3,
                    "CancelHotel": self.create_api4, "CancelFlight": self.create_api5, "CancelRental": self.create_api6}
            try:
                self.context = Util.get_lambda_context(request)
                ret = sagax.execute(self.req_context, payloads, apis)
                return {"saga": "good"}, 200
            except SagaRollBack as e:
                return {"saga": "bad"}, 500

License

This project is licensed under the MIT License

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

halo-bian-0.12.54.tar.gz (42.4 kB view details)

Uploaded Source

File details

Details for the file halo-bian-0.12.54.tar.gz.

File metadata

  • Download URL: halo-bian-0.12.54.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.5

File hashes

Hashes for halo-bian-0.12.54.tar.gz
Algorithm Hash digest
SHA256 e63967ca214489b835e73501d7377a9673f3b64d989fedd4ca8a357a9b4ee8cb
MD5 a5b115ea7872e8cc2c15257c169b7506
BLAKE2b-256 8f2d122d3ec42f344b069d04d45e7804b797fea084fed71cf0c2efbc85fdc600

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page