-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
As it stands, we have one PAL its files live in the API directory under 'app' distinguished from the API layer only by filename prefixes. This situation needs to change in order to fully utilise the platform-abstracted architecture and make porting/configuring the application as simple as possible.
I suggest that two core modifications be made:
- Relocate PAL files: As the PAL is a separate layer to the API layer there should be a PAL directory within the 'app' directory. This PAL directory would contain a subdirectory per platform supported; if the application was packaged for a specific platform then there may only be a single subdirectory, but this would support disambiguation of 'PAL' within the directory structure and imports from code. e.g. the datastore PAL for Google App Engine would be located in app/PAL/GAE/Datastore.py and could be imported using 'import app.PAL.GAE.Datastore.py'.
- Provide a method for choosing which PAL to import. It may be preferable to allow granularity so that a particular PAL could be chosen for each API - whilst it is unlikely that a single deployment would run a single request across multiple platforms some platforms may provide multiple PALs for use by a single API - for instance two different Datastore PALs which utilised different underlying storage technologies. The method for selecting the PAL files to use should probably be in the form of a single configuration file to ease pre-deployment configuration.
Reactions are currently unavailable