Fuzzy concept
Insight:
The substratum upon which software applications run
Programming languages?
Runtimes
Software platform $\stackrel{\Delta}{=}$ anything having an API enabling the writing of applications, and the runtime supporting the execution of those applications
API $\equiv$ application programming interface(s) $\stackrel{\Delta}{=}$ a formal specification of the set of functionalities provided by a software (sub-)system for external usage, there including their input, outputs, and enviromental preconditions and effects
Runtime [system/environment] $\approx$ the set of computational resources backing the execution of a software (sub-)system
all possible public interfaces / classes / structures in an OOP module
all possible commands a CLI application accept as input
all possible paths a Web service may accept HTTP request onto
any virtual machine (JVM, CRL, CPython, V8)
any operative system (Win, Mac, Linux)
any Web service
The Java Virtual Machine (JVM)
.NET’s [pronunced “dot NET”] Common Language Runtime (CRL)
Python 3
NodeJS (V8)
Each browser may be considered as a platform per se
…
standard libraries
predefined design decisions
organizational, stylistic, technical conventions
packaging conventions, import mechanisms, and software repositories
user communities
Types from the java.*
and javax.*
packages are usable from any JVM language
Many nice functionalities covering:
Many functionalities are provided by community-driven third party libraries
Everything is (indirectly) a subclass/instance of Object
Every object is potentially a lock
Default methods inherited by Object
class
toString
, equals
, hashCode
All methods are virtual by default
…
Project should be organized according to the Maven’s standard directory layout
Official stylistic conventions for most JVM languages
PascalCase
, members names in camelCase
Many technical conventions:
Iterable
interfaceIterable
s as inputCode is organized into packages
Code archives (.jar
) are Zip files containing compiled classes
Basic import mechanism: the class path
Many third-party repositories for JVM libraries
Android developers
Back-end Web developers
Desktop applications developers
Researchers in the fields of: semantic Web, multi-agent systems, etc.
…
Notably, one the richest standard libraries ever
Many nice functionalities covering:
Many functionalities are provided by community-driven third party libraries
Everything is (indirectly) a subclass/instance of object
Global Interpreter Lock (GIL)
Magic methods supporting various language features
__str__
, __eq__
, __iter__
No support for overloading
Variadic and keywords arguments
…
Project should be organized according to Kenneth Reitz’s layout
Official stylistic conventions for Python (PEP8)
PascalCase
, members names in snake_case
Many technical conventions:
__iter__
methodCode is organized into packages and modules
Code archives (.whl
) are Zip files containing Python sources
Each Python installation has an internal folder where libraries are stored
pip
simply unzips modules/packages in thereimport
statements look for packages/modules in therePypi as the official repository for Python libraries
pip
as the official tool for dependency managementData-science community
Back-end Web developers
Desktop applications developers
System administrators
…
Very limited standard library from JavaScript
Many nice functionalities covering:
Many functionalities are provided by community-driven third party libraries
Object orientation based on prototypes
Single threaded design + event loop
Asynchronous programming via continuation-passing style
Project structure is somewhat arbitrary
package.json
fileMany conventions co-exist
Many technical conventions:
Code is organized into modules
Code archives (.tar.?z
) are compressed tarball files containing JS sources
Third party libraries can be installed via npm
NPM as the official repository for JS libraries
npm
as the official tool for dependency managementFront-end Web developers
Back-end Web developers
GUI developers
…
The choice of a platform impacts developers during:
the design phase
the implementation phase
the testing phase
the release phase
Abstraction gap $\approx$ the space among the problem and the prior functionalities offered by a platform. Ideally, the bigger the space the more effort is required to build the solution
Developers build solutions by leveraging the API of the platform
… as well as the API of any third-party library available for that platform
Test suites are a “project in the project”
One may test the system against as many versions as possible of the underlying platforms
One may test the system against as many OS as possible
Release $\approx$ publishing some packaged software system onto a repository, hence enabling its import and exploitation
Packaging systems are platform-specific…
Repositories are platform-specific…
… release is therefore platform specific
Choice is commonly driven by design / technical decisions
However, choosing the platform is a business decision as well
Business decision: which user communities to target?
Coherency is key for success in platform selection
The abstraction gap is likely lower
More third party libraries are likey available
The potential audience is wider
Easier to find support / help in case of issues
More likely that third-party issues are timely fixed
Researchers may act as software developers
to elaborate data
to create in-silico experiments
to study software system
to create software tools improving their research
to create software tools for the community
Research institutions are not software houses
Personnel can only dedicate a fraction of their time to development
Most software artifacts are disposable (1, 2, 4)
Development efforts are discontinuous
Development teams are small
Software is commonly a means, not an objective
Commitment to software development is:
Research-oriented software development should maximise audience and impact, while minimising development and maintenance effort
Science requires reproducibility
The wider the community, the wider the impact of community-driven research software
Minimising effort can be done by improving efficiency
Choosing the right community / platform is strategical for research-oriented software
The abstraction gap is likely lower
More third party libraries are likely available
The potential audience is wider
Easier to find support / help in case of issues
More likely that third-party issues are timely fixed
Silos (in IT) are software components / systems / ecosystems having poor external interoperability (i.e. software from silos A hardly interoperates with software from silos B)
Platforms are (pretty wide) software silos
Examples:
Research communities in CS / AI may overlap with platforms communities:
What about inter-community research efforts?
Multi-platform programming is an enabler for inter-community research
let the same software tool run on multiple platforms
Create multiple artifacts, one per each supported platform, sharing the same design and functioning
design and write the software once, then port it to several platforms
Write once, build anywhere
Write first, wrap elsewhere
Assumptions:
Workflow:
Design, implement, and test most of the project via the super-language
Complete, refine, or optimise platform-specific aspects via
Build platform-specific artifacts, following platform-specific rules
Upload platform-specific artifacts on platform-specific repositories
Let N
be the amount of supported platforms
Platform-agnostic functionalities require effort which is independent from N
Platform-specific functionalities require effort proportional to N
Better to minimise platform-specific code
Relevant questions:
The abstraction gap of the common code is as wide as the one of the platform having the widest abstraction gap
Whenever a new functionality needs to be developed:
Try to realise it with common std-lib only
If not possible, try to maximise the portion of platform-agnostic code
N
times, one per target platformAssumptions:
Workflow:
Fully implement, test, and deploy the software for the main platform
For all other platforms:
re-design and re-write platform-specific API code
implement platform-specific API by calling the main platform’s code
re-write test for API code
build platform-specific packages, wrapping the main platform’s package and runtime
Upload platform-specific artifacts on platform-specific repositories
Let N
be the amount of supported platforms
Clear separation of API code from implementation code is quintessential
The effort required for writing API code is virtually the same on all platforms
Global effort is sub-linearly dependent on N
N
timesThe i
-th platform’s wrapper code will only call the main platform’s API code
Relevant questions:
giovanni.ciatto@unibo.it
Compiled on: 2024-02-20