Palladio Component Model/FAQ

Aus SDQ-Wiki
Warning
This page was moved to the GitHub wiki

This page lists frequently asked questions about the Palladio Component Model. For further questions, please consult our development community.

PCM Tools

General

When modeling the ressource environment, how can i add memory when there only exists opions for CPU, HDD and Delay?

There is no built-in dedicated support for simulation of memory consumption (e.g. acquire and release of memory). Please use passive ressources to simulation acquire and release of memory. If multiple components share the same memory, you will need to use a separate components which is responsible for memory management.

Besides using passive ressources, Palladio can be extended by own ressources (e.g. memory). Such resources can be defined on the instance-level. Still, to benefits from a newly introduced ressource, you have to define simulation semantics in terms of a scheduler. If you need detailled memory behaviour, please contact the Palladio development community.


Is it possible to create more than 1 System Model? If yes, how I can connect them to other provided role and required role or even other components? How can I use composite component?

The easiest way to create more than one system model is having multiple system model files (just use the creation wizard). Systems themselves cannot be further connected to other system. In PCM, systems are by definition the outer most entities which defines the system under study. To connect multiple subsystems, use the subsystem entities or composite components.

Composite components are defined in the repository (like all other components). Create a assembly context to use composite components inside other components (and to connect them to other components). The contents (internals) of composite components can be edited using the composite editor.

If I need to set the think time of users (e.g. 5 seconds) in an openworkload (for example to model a user which fills a web form) how can I do that?

PCM 3.2 has special support for "intermediate" think time (i.e. a user executes some behaviour, thinks for a while and the continues. Such thinking can be modelled as "Delay" in the usage model. This action is new in PCM 3.2.

How can I model multiple UsageScenarios?

Multiple usage scenarios are a way to model for example multiple user groups which concurrently interact with a software system.

The support of multiple usage scenarios in the graphical editors is currently limited. The PCM generally supports multiple usage scenarios but one cannot initiate them from the graphical editors. Please create a new UsageScenario below the UsageModel in the tree-based editor of the usagemodel file. If the graphical editor now is re-opened, it will show a new UsageScenario at the default position. This new UsageScenario can be edited as usual. Do not forget to add start stop action and a open/closed workload including thing times etc.

This hint refers to PCM 3.1 and PCM 3.2.

Is there a way to perform reverse engineering activities in order to get Palladio models from code?

Yes. The Q-ImPrESS toolchain offers reverse engineering tools. Reverse engineering tools comprise SISSy, SoMoX, and GAST2SEFF. These tools are able to reconstruct components and component behaviour from source code.

Install the Q-ImPrESS toolchain in order to use reverse engineering.

I get an ExceptionInInitializer when running SimuCom. What can I do?

If you experience either a

java.lang.ExceptionInInitializerError at de.uka.ipd.sdq.workflow.mdsd.oaw.PerformOAWCheckValidation.getExecutionContext(PerformOAWCheckValidation.java:123) ... Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor ... Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category ... or java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.xtend.expression.ExecutionContextImpl at de.uka.ipd.sdq.workflow.mdsd.oaw.PerformOAWCheckValidation.getExecutionContext(PerformOAWCheckValidation.java:123)

or something similar, your plugins do not work correctly with each other. Try the following: - restart your Eclipse with -clean option If you were starting a second Eclipse from within that Eclipse and tried to simulate in that second Eclipse, also do this: - reload the target platform (Go to Windows -> Preferences -> Plugin Development -> Target Platform. Click on "Running Platform (active)" or whichever is you target platform. Then click the reload button. - also start your second Eclipse (= target platform) with -clean. To do so, add -clean to the program arguments in your run configuration. You can remove the flag again after you successfully ran the simulation. You might need to set it again once each time the PCM plugins are updated.

Alternative solution: Uninstall all PCM plugins and then re-install them:

  • Go to "Help" > "About Eclipse Platform"
  • click "Installation details" > "Installed software" tab
  • Select all PCM Feature
  • Press the "uninstall..." button and remove all PCM Feature
  • Then re-install the PCM using the update site: "Help" > "Install New Software"
  • Pick the PCM update site and re-install the full PCM
  • Restart Eclipse

SimuCom simulation fails with "unable to create new native thread"

This happens when the process-based simulation tries to create a lot of threads, for example due to nested forks, or an OpenUserWorkload with a lot of users that are simulated at the same time.

When simulating under Linux, the operating system can be adapted to support a larger number of parallel threads (the following works with Fedora Linux):

In the /etc/security/limits.conf file, add the following lines:

username     soft      nofile      20000
username     hard      nofile      20000
username     soft      stack       256
username     hard      stack       256
username     soft      nproc       10000
username     hard      nproc       10000

username has to be replaced with the linux user account.

nofile denotes the number of Linux file handles the user can acquire. stack denotes the standard stack size in kilobytes (default stack size is much larger, thus, less threads can be created) nproc denotes the number of threads that can be created at the same time

Reboot the linux before continuing.

In addition, add

-Xss:256k

to the eclipse.ini of your PCM eclipse installation. Otherwise, eclipse might override the system-wide stack size setting and chooses a larger stack size.

No Palladio icons and menus are shown when starting Eclipse

Check you Java version. Java 1.6 is required to run the PCM Bench.

What's the PCM Bench?

The PCM Bench is a RCP application for editing the Palladio Component Model.

The default models (primitive types, etc.) are not available in the tree editors

Default models are loaded automatically if you use the PCM tree editors (e.g. Repository Editor). Other editors including the sample reflective editor do not load the default models if they are not already used in the model. In the latter case, load the models explicitly via the pathmap URI or consider using the PCM tree editors.

RDSEFF Modeling

MissingTokenException(inserted [...] at +) when simulating?

Error: "MissingTokenException(inserted [@-1,0:0=,,1:33] at +) when simulating?"

This exceptions means that the given StoEx cannot be parsed properly. It should be shown in the next line of the error message which StoEx is the problematic one.

To fix StoEx, you can use the StoEx editor in the RDSEFF editor: Open it (e.g. by double clicking on a resource demand) and paste your StoEx here to see whether it is valid.

In this case, an expression "1+2+3" could not be parsed because parentheses are missing, it should be "1+(2+3)".

How can i check the current amount of a passive resource in a guarded branch transition? If not, are there alternative options?

One intentionally cannot check the state of passive resources. The state of passive resources is hidden from the software component level (including RDSEFF). If you would like to access the state of passive resources, you are implementing a kind of scheduler for the passive resources. Such extensions of Palladio are realised using the extension mechanism for schedulers.

Briefly:

  1. Introduce an own resource type
  2. Provide a scheduler to simulate that resource type

The scheduler (written Java code, Eclipse plugin) also has access to the state of the simulation environment which includes passive resources.

Random Variables are used throughout RDSEFF and Usage Profile specification. Which types of random variables are applicable in which cases?

I cannot make predictions for my model: An errors says that composite components are not supported.

Try using SimuCom instead of PCMSolver.

I cannot add an "ExternalCallAction"

The PCMBench ensures that a ExternalCallAction can only be added in a SEFF if the outer component in fact requires services. Therefore, check:

  • The component containing the SEFF should have at least one required service (one required role)
  • The interface associated via the required role should have at least one service signature.

How to deal with more than one characterisation of a return value in a SEFF?

If you like to characterize for example a collection by the number of its elements and the size of its inner elements, you need to introduce two SetVariableActions. Each one is characterising one aspect of the return value.

Simulation

How can network demands be simulated?

If a component calls another component which is located on a different ResourceContainer, the response time of the call usually also depends on the network connection between the ResourceContainers.

PCM allows for simulating network contention. For this, a LinkingResource has to be specified in the PCM model connecting the affected ResourceContainers. For a LinkingResource, latency and throughput attributes can be specified.

In normal simulation, an external call that is issued on the network resource reflects the latency attribute in any case. To support throughput, the ExternalCall has to contain a VariableUsage referencing a variable "stream" with a BYTESIZE VariableCharacterization. This value is used a demand issued on the network resource, which affects the call response time depending on the specified throughput attribute.

Currently, the same load is issued on the network resource after the call has complete (to simulate backward network flow).

If you activate the "Simulate throughput of linking resources and middleware marshalling/demarshalling of remote calls" checkbox in the "Feature Settings" tab, the network resource is simulated differently. In this case, a completion is used to include a Middleware container in the simulation featuring Glassfish application server performance impact on calls.

For simulation the network resource, a FCFS queue is used. Network resource simulation results can be inspected using the PCM Results perspective. Network resource results can be visualized the same way as CPU or HDD resource results.

How can I use own Middleware in the simulation?

Palladio's simulation engine SimuCom is able to account for the performance impact of middleware / application servers (e.g. there is a built-in repository for Glassfish). To add own middleware or application servers, there are basically two options:

  1. Exchange the built-in Glassfish application server repository
  2. Introduce a new event-based middleware repository (easier to use)
  3. Use Chili completions (not explained in the following)

The two first options are explained in the following. For completions have a look at Chilies.

PCM_MODELS / default models

The plugin de.uka.ipd.sdq.pcm.resources (file name de.uka.ipd.sdq.pcm.resources_1.0.0.20XXXXXXXNGT.jar) holds all default models of Palladio (e.g. primitive types, supported resource types of SimuCom, middleware repository, application server repository). These defaultModels can be addressed by the registered PathMap: pathmap://PCM_MODELS.

1. Exchange SimuCom Glassfish middleware support

The built-in Glassfish application server performance overhead estimation manifests in the plugin the de.uka.ipd.sdq.pcm.resources plugin (file name de.uka.ipd.sdq.pcm.resources_1.0.0.20XXXXXXXNGT.jar) of the PCM. This plugin includes the file defaultModels/Glassfish.repository which is by default used by SimuCom.

In this repository (defaultModels/Glassfish.repository), you can model the performance overhead your own middleware / application server (e.g. network communication overhead). Values stored in the repository are woven into your models (transparently) and help increasing prediction accuracy.

Procedure

When modelling your own middleware / application server respect the following rules:

  1. Keep all IDs of the original file intact (components, interfaces, services, etc.)
  2. Do not move the file; it is expected at the given location; just replace the existing file
2. Use own middleware repository

This option is likely to be more easy to use. Still, it is mainly intended for event-based communication middleware.

The middleware repository, can be selected from the SimuCom run configuration (field "Event Middleware Repository File"). Just pick your own middleware repository to let it's performance or reliability overhead be accounted during simulation runs.

Procedure
  1. Pick the file pathmap://PCM_MODELS/default_event_middleware.repository from the resource plugin (see "default models" above to find the location of the repository)
  2. Modify the components from this repository to model your own middleware.
  3. Attention: Keep interfaces intact. Components are looked up via the interfaces used in the repository (see them as markers).
Additional Resources

When generating simulation code with XPand, I get an error "no viable alternative at input 'Â' on line 1".

The problem is the encoding of the transformation templates. Probably someone has changed the model 2 code transformation by updating one of the xpand templates, and has by mistake also changed the encoding of the file, e.g. to UTF-8. Check the SVN logs of https://sdqweb.ipd.uka.de/svn/code/PalladioCM.CodeGen/trunk/de.uka.ipd.sdq.pcm.codegen.m2m/templates, and possibly revert the problematic files or change their encoding. One working encoding is ASCII.

The simulation gets stuck and does not make any progress. What can I do?

For large models, the simulation can take long. Thus, first make sure that the simulation is really stuck. 1) Check the CPU utilisation of your system (e.g. by Windows task manager). If the java processes have 0 or very low CPU utilisation, the simulation might be really stuck. 2) If you used a file data source, you can check whether its size is growing. If the size is stable, the simulation might be really stuck. If you cannot see any progress in either 1) or 2), you might want to cancel the run. If the simulation does not react on cancel requests via progress bar, you need to close your Eclipse. Possibly, you even have to kill the process in the task manager.

During simulation, I get a NullPointerException in a method called findResource(..). What can I do?

This applies to PCM version 3.0.

Restart Eclipse and use the -clean option.

To do so, open a command line window, change to the directory where Eclipse is installed and type "eclipse -clean".

The -clean option makes Eclipse check its plugin folder.

I get an exception "SimuComTab" when initializing an SimuCom run config (PCM 4.x).

Install the "Ganymede/Enabling Features/Equinox Bundles feature" for your Eclipse through the Eclipse update mechanism.

I cannot create a file datasource for SimuCom, because of an error in the wizard: is not a directory

Anne: I solved this by creating a new project DB that really resides in my workspace C:\uka\workspace, so I get C:\uka\workspace\DB as the real project location.

Then, I can choose a name for a database folder, it gets created and SimuCom can store results in it.

Java Exception ClassDefNotFound when attempting to create a new run configuration for SimuCom

Check whether you plugins are completely installed with all required files. In our case, copying the plugins directory with Windows Vista caused 7 class files to disappear, which of course cannot be loaded when needed for the run configuration tab. This is caused by a limited length for paths in Vista. Use a better file manager to copy your files.

I get an Exception: "Unable to build the simulation plugin"

I get an Exception on starting the simulation (SimuCom):

java.lang.Exception: Unable to build the simulation plugin. Failure Messages: The method getRoleorg_my_namespace_impl_MyInterface() is undefined for the type I...Context The method getRole...

Check the ExternalCallActions in your SEFFs. One of the ExternalCallActions refers to an Interface that is not declared in the Required Roles of the Component containing the SEFF. Add the required role including the signature referenced by the ExternalCallAction.

Remark: This error should only occur if you start manual editing of models.

I cannot create a file database for SimuCom analysis

Probably you have selected a project in your Eclipse workspace that is only linked. Create a new project directly in your workspace; add the new file database here. Now your finish button, what you expect it to do.

I get a RuntimeException "Line has a=0!"

A distribution function has the same X value twice. The simulation cannot handle a resulting cumulative distribution function.

Solution: change the distribution function.

How to deal with compilation errors of SimuCom?

If the PCM Bench fails compiling a SimuCom plugin, indicating that some type definitions have not been found, you need to change the name of the simulated system. At least the first letter of the system's name needs to be UPPERCASE.

I receive a message "Stopping simulation run due to memory constraints"

This is an intended behavior. It prevents the simulation from crashing your Eclipse and is independent of the recorder or stop condition settings. Such situations occurr if your simulation spawns too many threads. Each thread consumes a certain amount of main memory, hence, at some point, you run out of memory. The solution is to fix your model in a way that not so many simultaneously users are concurrently in your system, i.e., by reducing the load specification in your model.

PCM Solver

PCM Sensor Framework (Read Simulation Results)

There is a demo class available demonstrating the use and access of simulation results via API: [1]


Installation

Eclipse reports that the Palladio update site is invalid

Often, this errors is caused by the usage of an old Java version (with respect to major version and/or to patch level). Our web servers do not support many old and unsecure HTTPS ciphers, which might be a problem for older Java versions. You can have a look at supported Java versions in the handshake simulation section of the SSLLabs test. In general, the latest version of the Java version mentioned in the installation preconditions is supported. If you encounter an error, please consider updating your Java version first.

Possible issues reported that might indicate the mentioned error are:

  • javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure exception
  • sun.security.validator.ValidatorException: PKIX path building failed
  • sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

In the unlikely event of a failure of our webserver, please contact us.


MacOS reports that Palladio is damaged

When you try to run the Palladio drop, MacOS might report that "Eclipse is damaged and can’t be opened. You should move it to the Trash.". This is due to security features of recent MacOS versions that block the execution of unsigned software that has been downloaded. The drop is not damaged but the execution is blocked. Signing the drop is not an option for us right now because this would imply additional cost and significant administrative effort.

In order to run the drop after extraction, you can simply remove the quarantine flag that is responsible for blocking the execution.

  • open a terminal and navigate to the location of the extracted Eclipse.app
  • execute the command xattr -rd com.apple.quarantine Eclipse.app

Modeling

Why do I get an error with Xtext resource / .essentialocl?

If you get an error concerning .essentialocl and Xtext resources while modeling (Datei:Essentialocl-error.png), try to change the OCL delegate (Window -> Preferences -> OCL -> Executor ...) to http://www.eclipse.org/emf/2002/Ecore/OCL/LPG (Datei:Ocl-lpg-option.png)

Essentialocl-error.png
Ocl-lpg-option.png

PCM Documentation

General

What is the difference between a SubSystem and a CompositeComponent in the PCM?

In the PCM, both, SubSystem and CompositeComponent are composite structures. Also the System is such a composite structure. While a SubSystem is a white-box entity and allocation/deployment time, a CompositeComponent is a black-box entity at allocation/depoyment time. This implies that the inner components of a SubSystem can be deployed onto different hardware nodes (e.g., servers). The inner components of a CompositeComponent cannot be deployed onto different hardware nodes by the deployer.

Notes

Only the very first inner level of components within a SubSystem can be deployed onto different hardware nodes, except they are themselves SubSystems.

At design time, both CompositeComponent and SubSystem are white-box entities to the component developer developing them.

Is there an official website of the PCM?

Yes there is. Please have a look at http://sdqweb.ipd.uka.de/wiki/Palladio_Component_Model and http://www.palladio-simulator.com.

PCM Meta-Model

General

What is the difference between a SubSystem and a CompositeComponent in the PCM?

In the PCM, both, SubSystem and CompositeComponent are composite structures. Also the System is such a composite structure. While a SubSystem is a white-box entity and allocation/deployment time, a CompositeComponent is a black-box entity at allocation/depoyment time. This implies that the inner components of a SubSystem can be deployed onto different hardware nodes (e.g., servers). The inner components of a CompositeComponent cannot be deployed onto different hardware nodes by the deployer.

Notes

Only the very first inner level of components within a SubSystem can be deployed onto different hardware nodes, except they are themselves SubSystems.

At design time, both CompositeComponent and SubSystem are white-box entities to the component developer developing them.


If two Assembly Contexts within a System encapsulate the same component, why do they have the same Required and Provided Roles?

A Role is associated with a component type, not an instance. So, all instances of a component share the same Roles. The distinguishable reuse of components and there interfaces is supported by AssemblyContexts and AssemblyConnectors.

Why do Linking Resources have a direction?

There is no specific meaning to the direction of a Linking Resource.

How are SEFF diagrams created within a Repository diagram or as an own file and which alternative is preferable?

How do Latency and Throughput values of Communication Link Resources influence the analysis results?

The Latency of a Communication Link Resource is an amount of time that any call over this link will take. The Throughput only matters when data with BYTESIZE specifications cross the link; the delay of the corresponding calls computes to BYTESIZE/Throughput.

How can 1:n relationships between components be modeled in PCM (say, a composite component includes n instances of a basic component)?

1:n relationships can only be modeled in an explicit way. That is because a complete PCM instance represents exactly one system, not a possible set of systems. So for example, if we decide n = 3, then we have to explicitly model 3 instances of the basic component within the composite component.

Eclipse Modeling

GMF

What is the difference between Layout and Layout Data Nodes in the Graph Model (i.e. GridLayout and GridLayout Data)?

When you create new child nodes your GraphModel you might see Layout and Layout Data nodes. Both can be added to most of the figure objects. The difference between them is, that the pure Layout node describes the layout to apply to an container and the Layout Data provides additional parameters for the contained object. As an example: You got a rectangle with a couple of lables inside. You might set a Grid Layout for the rectangle do arrange the included labels. Additionally, you create a Grid Layout Data child node for each label to provde additional parameters to them. Note: Sub elements that contain Grid Layout Data nodes can have a Grid Layout submode, too, to layout their own child objects. More information: http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.draw2d.doc.isv/reference/api/org/eclipse/draw2d/GridLayout.html

My Element looks fine but can not be moved in the Editor!

Check your graph model if you specified a Layout for this Element or it's parent. If you have done so, this can conflict with the default ListLayout defined by GMF. Solution: Open your gmfgen model and take a look for this Figure. (i.e. Navigate to the Gen Editor -> Gen Diagram -> Gen Compartment). Open the property view and check for the Property "ListLayout" and set this from true to false. Now your own layout should be taken into account and the elements can be moved. Note: This layout property in you gmf genmodel is persited even if you force gmf to recreate the gmfmodel based on your gmf map model. More information: GMF:Compartment_Layouts

Why do I have so much a lot of "XY is never used" warnings in the imports of my generated JAVA code?

This is because imports are only added by code generation but never deleted. It is recommended to manually clean up your imports in the generated code on a regular base. (CTRL+Shift+O in Eclipse) Side Note: Methods and classes can be marked as manually modified by adding the "@generated not" directive. For imports, there is no such markers. To prevent any compilation errors, the code generation adds imports only but never remove them.

QVTo

Does Eclipse QVTo support the usage of the QVTo libraries definition?

Yes it does. But there are a couple of limitations to consider.

  1. There is a bug in the import handling that should be removed in qvto 3.0.0 (Helios). It is about the "access library_name" statement in the definition of a transformation. Workaround: leave it away and just use the import library; at the top of the qvto file.
  2. You can not place a helper, query or mapping operation in an external library file that needs access to a model (not an element within a model). While the declaration of and the call to an operation with a model as parameter is valid, eclipse QVTo does not allow the import of the external library.