Federation Scenario Description Language (FSDL)
We have created a textual Domain Specific Language for enabling the end-user describing federation scenarios. The language is called Federation Scenario Description Language (FSDL). The editor is based again on the textual modeling framework (TMF) of Eclipse and is installed by the end-user as Eclipse plugins. Figure 1 displays an overview of the workbench with installed FSDL plugins. It contains views that help the end-user during the description of a scenario. In the left side there are views to see user projects, Offered Services from available Offices and stored scenarios on those offices. In the middle is the editor of FSDL files.
Figure 1
General FSDL structure
In the simplest usage an FSDL definition starts with the keyword RequestedFederationScenario? followed by a name.
A set of import office statements can follow that will contain definitions of the offices (the resource brokers, services and resources)
Next, one can define either a resource agnostic scenario request or specific resources by providers. Let's examine both examples:
A resource agnostic scenario structure
Let's see an example. Assuming that we have a broker brokerOfficeXYZ. We would like to use an echo service that the brokerOfficeXYZ provides. We could have the following FSDL:
RequestedFederationScenario myScenarioName import office "http://brokerOfficeXYZ.org/myresourcedef.office"; RequestServices{ Service "brokerOfficeXYZ.echo" as myecho settings{//||An echo resource. Write something in input. Read the output to get it Setting "input" : input = "Hello" //An input text for echo Setting "sleeptime_ms" : sleeptime_ms = "3000" //delay of echo in msecs } }
Notice the keyword RequestServices? . Inside that section we describe the request for services and their initial settings. (When having a request for services, the ResourceAdvisor service will advice you for the correct resources.)
A scenario structure with specific resources
Assuming that we have a broker brokerOfficeXYZ. We would like to use an echo resource that the provider ProviderAcme? offers where. We have two ways to do it. Let's see the first:
RequestedFederationScenario myScenarioName import office "http://brokerOfficeXYZ.org/myresourcedef.office"; RequestServices{ Service "brokerOfficeXYZ.echo" as myecho offered by "brokerOfficeXYZ.ProviderAcme" settings{//||An echo resource. Write something in input. Read the output to get it Setting "input" : input = "Hello" //An input text for echo Setting "sleeptime_ms" : sleeptime_ms = "3000" //delay of echo in msecs } }
Notice the offered by keyword which is followed by the provider's name.
We could have also the following FSDL:
RequestedFederationScenario myScenarioName import office "http://brokerOfficeXYZ.org/myresourcedef.office"; RequestInfrastructure { //resource by : brokerOfficeXYZ.ProviderAcme.site //description : ||An echo resource. Write something in input. Read the output to get it Resource "brokerOfficeXYZ.ProviderAcme.site.echo_rp12_s12_or10782" as myecho settings{ Setting "output" : output = "" // Setting "input" : input = "Hello" // Setting "sleeptime_ms" : sleeptime_ms = "2000" // } } Notice the keyword '''RequestInfrastructure ''' . Inside that section we describe the request for specific resource and their initial settings. Notice the keyword '''Resource''' for requesting a Resource.
It is useful to have both approaches. Services are more generic and contain generic settings that all resource providers supply. However it is possible that a resource can have more settings than the offered service it matches. For example the echo resource by ProviderAcme? could have more settings like capitalize = true;
A ServiceRequest? through the ResourceAdvisor is always transformed to a RequestInfrastructure?. The latter description is submitted for provisioning.
defining a request for offered services
As discussed already with the keyword RequestServices? and inside that section we describe the request for services and their initial settings. Let's see an example:
RequestedFederationScenario deployingAXenImage import office "http://brokerOfficeXYZ.org/myresourcedef.office"; RequestServices{ Service "brokerOfficeXYZ.xenimagestore" as myXENImageP2ner settings{ Setting "Name" : imgname = "myXENImageP2ner" Setting "InputURL" : inputurl = "http://196.140.184.233/myxenimage.img" //The input url to copy from Setting "OutputURL" : outputurl //holds the location of the stored image, to be used by testbed's resources } Service "brokerOfficeXYZ.xenvmdeploy" as clients[1..15] settings{ Setting "CAP" : cap = "50" //Atomic Parameter Created by Teagle Gateway Setting "MEM" : mem = "512" //Atomic Parameter Created by Teagle Gateway Setting "URL" : url assign "myXENImageP2ner.outputurl" Setting "NAME" : name = "client" //Atomic Parameter Created by Teagle Gateway } }
In the example above one wants to deploy his XEN VM image to 15 machines. The resource broker brokerOfficeXYZ will allocate these later to his resource providers. The user wants 2 services. The xenimagestore is used to move a XEN VM image to be used by a XEN host. It has some settings as you see in the example where the InputURL defines the source of the image. The xenvmdeploy service is responsible for deploying the XEN image to a computing resource. See in the example some parameters.Notice the keyword assign. It is used when we want to assign as input to this setting the value of another setting by another offered service.
In general this is the syntax for requesting an Offered Service:
Service "NAME_OF_SERVICE" as nameAlias([1.. numOfServices ])? (offered by "ResourcesProvider" (optional)? )? settings { Setting "NAME_OF_SETTING" : settingNameAlias (= staticValue)? (assign += SettingInstance|STRING] ( , SettingInstance )? Setting "NAME_OF_SETTING" : settingNameAlias (= staticValue)? (assign += SettingInstance|STRING] ( , SettingInstance )? ... ... }
Where:
- NAME_OF_SERVICE: a full qualified name of the service
- nameAlias:a user chosen value to name the service followed optionally by how many services he wants
- offered by is optionally to indicate to the broker that we need the specific provider.
- the optional keyword says to the broker to try to match the selected provider if possible
- NAME_OF_SETTING: the name of an attribute of an offered service
- settingNameAlias: a user chosen value to name the setting. If after the alias there is a = then the setting can have a static value. If there is the keyword assign the user can assign the value of another setting.
defining a request for offered resources
An equivalent Infrastructure for the above scenario is as follows. This time we select specific resources by specific resource providers.
RequestInfrastructure { //resource by : brokerOfficeXYZ.ProviderAcme..site Resource "brokerOfficeXYZ.ProviderAcme.site.xenimagestore_rp12_s12_ptminfouop_or10792" as myXENImageP2ner settings{ Setting "InputURL" : inputurl = "http://150.140.184.233:8002/p2ner.img" // Setting "Name" : name = "myXENImageP2ner" // Setting "OutputURL" : outputurl // } Resource "brokerOfficeXYZ.ProviderAcme.site.xenvmdeploy_rp12_s12_ptminfouop_or10807" as clients__ix1 settings{ Setting "URL" : url assign "p2nerLargeScale.myXENImageP2ner.outputurl" // Setting "MEM" : mem = "512" // Setting "CAP" : cap = "50" // Setting "NAME" : name = "clients__ix1" // } Resource "brokerOfficeXYZ.ProviderAcme.site.xenvmdeploy_rp12_s12_ptminfouop_or10807" as clients__ix2 settings{ Setting "URL" : url assign "p2nerLargeScale.myXENImageP2ner.outputurl" // Setting "MEM" : mem = "512" // Setting "CAP" : cap = "50" // Setting "NAME" : name = "clients__ix2" // } .....................<snip> more resources until clients__ix15
The syntax is close to the request for Offered Services
General recommendation
Although the syntax seems complex, by hitting CTRL+SPACE you get code suggestions by the editor. Code completion, syntax errors and warnings will also help you.
(More help for the syntax will be added)
Attachments (1)
- fstoolkit_overview_1.JPG (221.2 KB) - added by ctranoris 13 years ago.
Download all attachments as: .zip