62
62
63
63
\newcommand {\python } {Python}
64
64
\newcommand {\pythonprogram } {Python program}
65
+ \newcommand {\pythonruntime } {Python runtime}
65
66
66
67
\newcommand {\apache } {Apache}
67
68
\newcommand {\spark } {Spark}
@@ -675,7 +676,7 @@ \subsubsection{Update options}
675
676
....
676
677
....
677
678
options:
678
- - type: "urn :enum-value-option"
679
+ - type: "uri :enum-value-option"
679
680
path: "state"
680
681
values:
681
682
- "ACCEPTED"
@@ -694,7 +695,7 @@ \subsubsection{Update options}
694
695
....
695
696
....
696
697
options:
697
- - type: "urn :enum-value-option"
698
+ - type: "uri :enum-value-option"
698
699
path: "state"
699
700
values:
700
701
- "CANCELLED"
@@ -770,7 +771,7 @@ \subsection{Session lifecycle}
770
771
\section {The data model }
771
772
\label {data-model }
772
773
773
- \subsection {Data curation roles }
774
+ \subsection {Metadata roles }
774
775
\label {metadata-roles }
775
776
776
777
The full description of an \executablething {} will include several layers of metadata
@@ -790,15 +791,16 @@ \subsection{Data curation roles}
790
791
\subsubsection {The developer }
791
792
\label {software-developer }
792
793
793
- The first layer of metadata comes from the person who wrote the \pythonprogram {} .
794
+ The first layer of metadata comes from the person who wrote the software .
794
795
They have detailed knowledge of what the software does, what execution environment it needs,
795
796
and what the inputs and outputs are.
796
797
797
- For the square root example, it is a \pythonprogram {} which needs a platform with the \python {} runtime installed,
798
+ For our square root example, it is a \pythonprogram {} which needs a platform with the \python {} runtime installed,
798
799
and a list of the \python {} libraries that the program relies on.
799
800
800
801
\ begin{lstlisting} []
801
802
executable:
803
+ name: Newton-Raphson example
802
804
type: uri:python-program
803
805
requirements:
804
806
- numpi: ""
@@ -811,27 +813,30 @@ \subsubsection{The developer}
811
813
\ begin{lstlisting} []
812
814
resources:
813
815
compute:
814
- - type: uri:generic-compute
815
- cores:
816
- requested:
817
- min: 4
818
- memory:
819
- requested:
820
- min: 16
821
- units: GiB
822
- ....
816
+ - type: uri:generic-compute
817
+ cores:
818
+ requested:
819
+ min: 4
820
+ memory:
821
+ requested:
822
+ min: 16
823
+ units: GiB
824
+ ....
823
825
\end {lstlisting }
824
826
825
827
The developers also know about what inputs and outputs the program expects and what file
826
828
formats can it can handle.
829
+ % needs work
830
+ % https://github.com/ivoa-std/ExecutionBroker/issues/89
827
831
828
832
\ begin{lstlisting} []
829
833
executable:
834
+ name: Newton-Raphson example
830
835
type: uri:python-program
831
836
....
832
837
parameters:
833
- - type: uri:param-file
834
- name: "input data"
838
+ - name: input data
839
+ type: uri:param-file
835
840
mode: readonly
836
841
description:
837
842
A table containing a list of numbers to be processed, formatted as
@@ -841,9 +846,8 @@ \subsubsection{The developer}
841
846
....
842
847
- type: uri:votable
843
848
....
844
- - type: uri:param-value
845
- name: "input column name"
846
- type: string
849
+ - name: input column
850
+ type: uri:param-value
847
851
description:
848
852
The column name within the 'input data' to use.
849
853
\end {lstlisting }
@@ -862,31 +866,40 @@ \subsubsection{The packager}
862
866
step that could be implemented by a different person.
863
867
To make this distinction clear we can refer to this person, or role, as 'the packager' .
864
868
865
- In terms of the \metadoc {}, the packager changes the description of the \executablething {}
866
- from a \pythonprogram {} to a \dockercontainer {}.
869
+ This step packages the \pythonprogram {} along with any \python {} modules it requires,
870
+ the \pythonruntime {}, and any operating system components it requires, into a single
871
+ standard format binary file, making it much easier to deploy.
872
+
873
+ To represent the new type of \executablething {} in the \metadoc {}, the packager
874
+ would change the description of the \executablething {} from a \pythonprogram {}
875
+ to a \dockercontainer {}.
867
876
868
877
\ begin{lstlisting} []
869
878
executable:
870
- type: uri:docker-container
879
+ name: Newton-Raphson example
880
+ type: uri:docker-container-1.0
871
881
repository: ghcr.io
872
- image: ivoa/calycopis/java-builder
882
+ image: ivoa/analytics/Newton-Raphson-albert
873
883
tag: 2024.08.30
874
884
....
875
885
\end {lstlisting }
876
886
877
887
Depending on how the software is packaged in the container they may also need to update
878
- the description of the inputs and outputs,
879
- and link them to specific locations in the filesystem.
888
+ the description of the inputs and outputs, and link them to specific locations in the
889
+ filesystem.
890
+ % needs work
891
+ % https://github.com/ivoa-std/ExecutionBroker/issues/89
880
892
881
893
\ begin{lstlisting} []
882
894
executable:
883
- type: uri:docker-container
895
+ name: Newton-Raphson example
896
+ type: uri:docker-container-1.0
884
897
....
885
898
parameters:
886
- - type: uri:data-file
887
- name: "input data"
899
+ - name: input-data
900
+ type: uri: data-file
888
901
format:
889
- - type: urn :ivoa-votable
902
+ - type: uri :ivoa-votable
890
903
filename: input-data.vot
891
904
....
892
905
@@ -895,7 +908,7 @@ \subsubsection{The packager}
895
908
- type: uri:generic-compute
896
909
volumes:
897
910
- type: uri:file-mount
898
- parameter: " input data"
911
+ parameter: input- data
899
912
filepath: /data
900
913
mode: readonly
901
914
....
@@ -916,52 +929,66 @@ \subsubsection{The publisher}
916
929
\item A project specific discovery service that only includes software vetted by the project.
917
930
Execution platforms within the project would only accept curated \metadoc {s}
918
931
from that discovery service.
919
- \item A domain specific discovery service that modifies the execution environment, optimising
920
- the software for analysing a particular type of data.
932
+ \item A domain specific discovery service that modifies the execution environment, configuring
933
+ the software to analyse a particular type of data.
921
934
\item A catalog of \metadoc {s} maintained as part of a university teaching course, modifying the
922
935
execution environment to integrate the software into the university system and setting
923
- parameters to configure the software to match the course notes.
936
+ parameters to configure it to match the course notes.
924
937
\end {itemize }
925
938
926
939
\subsubsection {The user }
927
940
\label {software-user }
928
941
929
- The user, or the user's client agent, starts with an initial \metadoc {} from the
930
- software discovery service and adds additional information describing how the user
931
- wants to use the software.
942
+ The user starts with an initial \metadoc {} from the
943
+ software discovery service and adds additional information describing how they
944
+ want to use the software.
932
945
933
- Adding details of the data resources the user wants to use enables the \execbrokerservice {}
934
- to transfer the data to local storage before the \execsession {} is started.
935
-
936
- Including a value for the filesize enables the \execbrokerservice {} to estimate
937
- how much local storage it will need to allocate
938
- and how much time will be needed to transfer the data.
939
- The \execbrokerservice {} can take this into account when calculating the start time of
940
- the \execoffer {s} it makes, allowing enough time for the data transfers to complete
941
- before the \execsession {} starts.
946
+ This would include selecting the data resources that they want to use
947
+ and adding them to the metadata.
942
948
943
949
\ begin{lstlisting} []
950
+ executable:
951
+ ....
952
+
944
953
resources:
954
+
945
955
data:
946
- - type: uri:simple- data-resource
947
- name: "input data"
956
+ - name: input data
957
+ type: uri:simple- data-resource
948
958
location: http:data.example.org/....
949
959
filesize:
950
960
value: 145
951
961
units: MiB
952
962
....
963
+
964
+ compute:
965
+ ....
953
966
\end {lstlisting }
954
967
968
+ Including details of the data resources in the \metadoc {} means the \execbrokerservice {}
969
+ will include the time needed to transfer the data to local storage before the
970
+ \execsession {} is begins.
971
+
972
+ Including a value for the data size enables the \execbrokerservice {} to estimate
973
+ how much local storage it will need to allocate
974
+ and how much time will be needed to transfer the data.
975
+ The \execbrokerservice {} can take this into account when calculating the start time of
976
+ the \execoffer {s} it makes, allowing enough time for the data transfers to complete
977
+ before the \execsession {} starts.
978
+
955
979
Linking the data resources with volumes on the corresponding compute resources enables
956
980
the \execbrokerservice {} to mount the data resources at the correct location in
957
981
the compute resource's filesystem.
958
982
959
983
\ begin{lstlisting} []
960
984
resources:
985
+
961
986
data:
962
- - type: uri:simple-data-resource
963
- name: input-data
987
+ - name: input-data
988
+ type: uri:simple-data-resource
989
+ location: http:data.example.org/....
964
990
....
991
+
965
992
compute:
966
993
- type: uri:generic-compute
967
994
....
@@ -996,7 +1023,7 @@ \subsubsection{The user}
996
1023
units: GiB
997
1024
\end {lstlisting }
998
1025
999
- TODO user provides the schedule ... when they want to run it.
1026
+ TODO user provides the schedule to describe when they want to run it.
1000
1027
1001
1028
\subsection {The \executable {} }
1002
1029
\label {executable }
@@ -1012,26 +1039,89 @@ \subsection{The \executable{}}
1012
1039
Rather than try to model every possible type of \executable {} in one large \datamodel {},
1013
1040
the \datamodel {} for each type is described in an extension to the core \datamodel {}.
1014
1041
1015
- To support this, the core \datamodel {} defines two fields:
1016
- \begin {itemize }
1017
- \item \codeword {type} - a URI identifying the type of \executable {}.
1018
- \item \codeword {spec} - a place holder for type specific details.
1019
- \end {itemize }
1042
+ The \datamodel {} uses a common pattern for polymorphic types based on a discriminator
1043
+ value to indicate the type of thing it is describing, followed by the specific
1044
+ details for that type.
1045
+
1046
+ This is implemented in the \openapi {} specification as an abstract base class
1047
+ containing common fields like a name and uuid identifier, followed by a list
1048
+ of derived types and their type identifiers.
1020
1049
1021
- % Type URLs
1022
- % https://www.purl.org/ivoa.net/executable-types/example
1023
- % https://github.com/ivoa-std/ExecutionBroker/blob/main/types/executable-types/example-executable.md
1024
1050
\ begin{lstlisting} []
1025
- # ExecutionBroker client request.
1051
+ AbstractExecutable:
1052
+ type: object
1053
+ discriminator:
1054
+ propertyName: type
1055
+ mapping:
1056
+ "uri:docker-container-1.0": 'DockerContainer'
1057
+ "uri:jupyter-notebook-1.0": 'JupyterNotebook'
1058
+ ....
1059
+ properties:
1060
+ name:
1061
+ description: >
1062
+ A human readable name, assigned by the client.
1063
+ type: string
1064
+ uuid:
1065
+ description: >
1066
+ A machine readable UUID, assigned by the server.
1067
+ type: string
1068
+ format: uuid
1069
+ type:
1070
+ description: >
1071
+ The type identifier.
1072
+ type: string
1073
+ \end {lstlisting }
1074
+
1075
+ The derived types extend this abstract base class to include the details needed to
1076
+ describe this type of \executablething {}.
1077
+ For example, the derived type for a \dockercontainer {} includes properties
1078
+ to describe where to get the \docker image from, including the repository endpoint URL,
1079
+ and the name and version tag of the \docker {} image to download.
1080
+
1081
+ \ begin{lstlisting} []
1082
+ DockerContainer:
1083
+ description: |
1084
+ A Docker or OCI container.
1085
+ See https://opencontainers.org/
1086
+ type: object
1087
+ title: DockerContainer
1088
+ allOf:
1089
+ - $ref: 'AbstractExecutable'
1090
+ - type: object
1091
+ properties:
1092
+ repository:
1093
+ type: string
1094
+ description: >
1095
+ The image respository URL.
1096
+ image:
1097
+ type: string
1098
+ description: >
1099
+ The image name within the repository.
1100
+ tag:
1101
+ type: string
1102
+ description: The image tag.
1103
+ ....
1104
+ \end {lstlisting }
1105
+
1106
+ This results in the following message being sent to request the execution
1107
+ of a \dockercontainer {}.
1108
+
1109
+ \ begin{lstlisting} []
1110
+ # ExecutionBroker request.
1026
1111
request:
1112
+
1027
1113
# Details of the executable.
1028
1114
executable:
1029
1115
1030
- # A URI identifying the type of executable.
1031
- type: "https://www.purl.org/ivoa.net/executable-types/example"
1116
+ # Common fields from the AbstractExecutable
1117
+ name: Experiment one
1118
+ type: uri:docker-container-1.0
1119
+
1120
+ # The details, specific to a Docker container executable.
1121
+ repository: ghcr.io
1122
+ image: ivoa/analytics/Newton-Rahpson-example
1123
+ tag: 2024.08.30
1032
1124
1033
- # The details, specific to the type of executable.
1034
- spec: {}
1035
1125
\end {lstlisting }
1036
1126
1037
1127
\subsubsection {\jupyternotebook {} }
0 commit comments