Bug 271895 - [tcf][api] Grouping service proposal
Summary: [tcf][api] Grouping service proposal
Status: NEW
Alias: None
Product: TCF
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2009-04-10 10:35 EDT by Sidharth Kodikal CLA
Modified: 2011-04-28 00:14 EDT (History)
5 users (show)

See Also:


Attachments
updated grouping service proposal (8.06 KB, text/plain)
2009-04-30 12:38 EDT, Daniel Friederich CLA
no flags Details
Update of previous proposal (7.96 KB, text/plain)
2009-04-30 14:16 EDT, Daniel Friederich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sidharth Kodikal CLA 2009-04-10 10:35:39 EDT
We are targeting a multicore processor that allows creating groups of cores. Based on that support, we would like to give users the ability to create core groups and execute synchronous run control operations on such groups.

Here is a proposal for a simple grouping service, the purpose of which is the creation and management of such groups of contexts.

-------------------------------------------------------------------------------
Grouping service

 
The grouping service allows grouping of a set of resources/contexts together in order to combine them and to perform operations on all the contexts collectively.

The context hierarchy of the grouping service contains all the elements which can be possibly added to a group as well as the actually configured groups.

 
A service implementation can implement the Grouping service so that a resource can only be added to a single group, by doing so it would provide a way to reserve the resource for the client creating the group. However this behavior is not mandatory and it is not enforced that only the client creating the group is using the group or its children.

 
The grouping service on its own only provides the capabilities to create, list and remove groups, it does not provide the operations for which the group was built. In order to perform operations on groups, other services have to be used. For example the standard RunControl service could expose and support operations on a group context representing a set of cores with atomic resume and suspend operations.

 
The service uses standard format for error reports, see Error Report Format in the TCF specification.

 
Commands:

 
Get Context

 

C • <token> • Grouping • getContext • <string: context ID> •

 

R • <token> • <error report> • <context data> •

 

<context data>

    • null

    • <object>

 

The command retrieves context information for given context identifier.

 

Context data object shall, at least, contain the property “ID" : <string>.

The context data obtained is expected to be cached by clients.

A service implementation shall send the contextChanged event to notify changes in context data.

 

Predefined group service context properties are:

 

 "ID" : <string> - Identifier of the context, same as getContext command argument. The ID is chosen by the service implementation.

"Name" : <string> - The group name is given by the creator of the group. The name is preferably unique, but this is not required or checked.

 

"ParentID" : <string> - Identifier of the parent context.

 

"supportsGrouping" : <boolean> - indicates is this context can be part of a group.

 

"isGroup" : <boolean> - is true for contexts representing a group.

   

 
Get Children

 

C • <token> • Grouping • getChildren • <string: context ID> •

 

R • <token> • <error report> • <array of context IDs> •

 

<array of context IDs>

    - null
    - [ ]
    - [ <context ID list> ]

 
<context ID list>

    - <string: context ID>
    - <context ID list> • <string: context ID>

 

The command provides access to the context hierarchy of the grouping service.

The context hierarchy contains the resources which can be part of a group as well as the grouping contexts themselves.

Grouping contexts contain the resource contexts that they are composed of as children.

 
Create Group

 

C • <token> • Grouping • createGroup • <String: name> • <array of context IDs> •

 

R • <token> • <error report> • <context data> •

 

This command creates a new group. The context identifiers used in other services, most typically the RunControl service are used in order to list the parts of the system which should build this new group. The creation of a group will typically fail if another group already contains the same contexts. When a group is created, the service shall send a contextAdded notification.

 

 
Remove Group

 

C • <token> • Grouping • removeGroup • <string: context ID> •

 

R • <token> • <error report> •

 

This command removes the group from the set of existing groups. When a group is removed, the service shall send a contextRemoved notification.

 

 
Add Context

 

C • <token> • Grouping • addContext • <string: context ID> • <array of context IDs> •

 

R • <token> • <error report> •

 

This command adds contexts to an existing group. The service shall send a contextChanged event when a context is added to a group.

 

 
Remove Context

 

C • <token> • Grouping • removeContext • <string: context ID> • <array of context IDs> •

 

R • <token> • <error report> •

 

This command removes contexts from a group. The service shall send a contextChanged event when a context is removed from a group. 

 

 
Events


The grouping service broadcasts notification events when groups are created, removed or when properties of existing groups change.

 

E • Grouping • contextAdded • <array of context data> •

 
This event is sent when new group contexts are added.

 

E • Grouping • contextRemoved • <array of context IDs> •
 

This event is sent when group contexts are removed.

 

E • Grouping • contextChanged • <array of context data> •

 
This event is sent when the properties of a group context, typically the composition, are changed.


-------------------------------------------------------------------------------
Legal Message: I, Sidharth Kodikal, declare that I developed attached code
from scratch, without referencing any 3rd party materials except material
licensed under the EPL. {I am authorized by my employer to make this
contribution under the EPL.}
Comment 1 Daniel Friederich CLA 2009-04-30 12:38:49 EDT
Created attachment 133963 [details]
updated grouping service proposal

I've added constraints.
a new getConstraints command lists the known constraints.
When creating a group, a list of constraints to be used for the group is passed in.
Contexts which can be added can be explored using a getMemberCandidates command.
Also changes in properties.
Comment 2 Daniel Friederich CLA 2009-04-30 14:16:55 EDT
Created attachment 133989 [details]
Update of previous proposal

Changes:
- removed TO DISCUSS comments.
- renamed "Topic" property name to "ConstraintID"
- added "Description" property to constraint object
- renamed last argument of getMemberCandidates from "member context id" to "context id"