Keesaco / KeesaFlo

A cloud-based flow cytometry web application
Other
6 stars 0 forks source link

PAL import improvement #172

Open McCrea opened 10 years ago

McCrea commented 10 years ago

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:

notchris1 commented 10 years ago

I like this, does this mean though that the calling api's import a specific pal ie .GAE. , .EC2., ect, or is there going to be a transitional layer, some pal genericiser, that gets changed when the app is configured, or will the API just be modified?

McCrea commented 10 years ago

Since the API doesn't need to know what's below it, I'd prefer to have a generic import interface. Ideally the import would look something like: from Platform import Files, Permissions And the logic under Platform would deal with looking up which PAL to actually import.

McCrea commented 10 years ago

I forgot to mention above, but I also think that we should define interfaces which PALs implement - basically as a way of defining what a PAL needs to look like for it to be compatible with the API layer. Since Python uses duck typing this isn't strictly necessary, and since Python is Python there are a few different ways of doing it. This means that some thought should be given to the approach taken.