Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Spaces/Architecture"

(What if a publishing container can only support a "list of files"?)
 
(73 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{CommentBox|Proposal - WIP - Henrik
+
{{CommentBox|Proposal - Draft 1 - Jan 14, 2008, Henrik Lindberg<br/>
 +
For latest revision of interfaces, checkout the org.eclipse.spaces.core project in spaces SVN.<br/>
 +
Please add your comments in a box like this.
 
}}
 
}}
 +
=At a glance=
 +
[[Image:SpacesTopOverview.png]]
 +
 +
Via a Space it is possible to Publish into a "file system" of some sort, get access to Source in a CVS or SVN repository, and access/hook up a Collaboration (such as issue tracking) with a collaboration technology. Via Management it is possible to add/remove/control services.
 +
 
=Spaces Architecture=
 
=Spaces Architecture=
 
At the highest abstraction level, the architecture consists of:
 
At the highest abstraction level, the architecture consists of:
Line 16: Line 23:
  
 
It is important that headless mode is considered when structuring application plugins.
 
It is important that headless mode is considered when structuring application plugins.
 +
 +
Here are the [[Spaces/Architecture/appspecs|application specifications]]
 +
 
==API==
 
==API==
===Spaces Service Providers===
+
Here is a UML diagram of the proposed API
Each provider of spaces creates a plugin for a "Spaces Service Provider" extension point. When a user wants to add a <i>Space Resource</i> to a project, the first selection is among the available providers (e.g. AOL-X-Drive, SourceForge, SpaceSVN, SpacesCVS).
+
[[Image:SpacesArchUML.png]]
 +
 
 +
===Spaces Service Provider===
 +
Each provider of spaces creates a plugin for a "Spaces Service Provider" extension point. When a user wants to add a <i>Space Resource</i> to a project, the first selection is among the available providers (e.g. AOL (X-Drive), SourceForge, GenericSVNSpace, GenericCVSSpace - the two generic space providers are thought to be useful reference implementations provided by the spaces project based on SVN and CVS).
 +
 
 +
A space service provider plugin should be headless, but can be accompanied by a UI plugin when needed.
  
Common traits are:
+
Common (headless) traits are:
 
* Name, the name of the service provider
 
* Name, the name of the service provider
 
* A description of the service
 
* A description of the service
 +
* An enumeration of available <i>Space Services</i> - to enable user to select a provider based on capabilities.
 +
* A list of <i>provider schemes</i> supported by the plugin
 +
 +
And with UI traits
 
* Icon for display with the description (e.g. a space provider logo)
 
* Icon for display with the description (e.g. a space provider logo)
* A URL to read more about the provided service
 
 
* Small Icon for use in association with a <i>Space Resource</i>
 
* Small Icon for use in association with a <i>Space Resource</i>
* An enumeration of available <i>Space Services</i>
+
* A URL to read more about the provided service
* A list of <i>Account</i> information<br/>The idea being that some service providers allows users to have multiple accounts.
+
* Wizards for
  
 
===Space Service===
 
===Space Service===
 
A <i>Space Service</i> describes a service available for spaces from a <i>Spaces Service Provider</i>
 
A <i>Space Service</i> describes a service available for spaces from a <i>Spaces Service Provider</i>
 +
These services are grouped into:
 +
* Account and Space Management Services
 +
* Source Services
 +
* Publishing Services
 +
* Collaboration Services
  
====Management Services====
+
====Account and Space Management Services====
Management services are about creation/maintenance of <i>Accounts</i>, and <i>Spaces Resources</i> associated with such an Account.
+
Management services are about creation/maintenance of <i>Accounts</i>, and <i>Space Resources</i> associated with such an Account.
  
* '''Account Reference'''<br/>Mandatory. Adding/Modifying an account by passing account information. Different providers may have implementation specific ways of storing the account information (e.g. Eclipse key ring, some (hopefully encrypted) file in the local file system, etc.). The idea is that the spaces project should reuse these implementations and not use a separate "vault"/"key ring". Produces information that can be stored in spaces project meta data.
+
* '''Account Reference'''<br/>Mandatory. Adding/Modifying a reference to an account by passing account information. Different providers may have implementation specific ways of storing the account information (e.g. Eclipse key ring, some (probably encrypted) file in the local file system, etc.). The idea is that the spaces project should reuse these implementations and not use a separate "vault"/"key ring". Produces Account Reference information that can be stored in spaces project meta data that can be used to reconnect.
* '''Account creation / Sign up'''<br/>Optional. A full implementation allows an account to be created via the API, but a simple implementation may consist of just information and a URL to a website where a user can sign up. A full implementation should add the new account to the set of accounts (i.e. create an account reference).
+
{{CommentBox|This is now implemented as a Space URI, and Spaces handles authorization information for spaces. }}
* '''Space Reference'''<br/>Mandatory. Adding/Modifying a reference to a space for an Account. Produces information that can be stored in spaces project meta data.
+
* '''Account creation / Sign up'''<br/>Optional. A full implementation allows an account to be created via the API, but a simple implementation may consist of just information and an URL to a website where a user can sign up. A full implementation should add the new account to the set of accounts (i.e. create an account reference).
* '''Space Creation'''<br/>Optional. A full implementation allows creating a space and adding it to the set of references spaces.
+
* '''Space Reference'''<br/>Mandatory. Adding/Modifying a reference to a space for an Account. Produces <i>Space Resource</i> information that can be stored in spaces project meta data.
 +
{{CommentBox|This is implemented completely in spaces - SpaceCatalog keeps a persistent record of added space URIs in the workspace meta data.
 +
* '''Space Creation'''<br/>Optional. A full implementation allows creating a space (i.e. 'server side') and adding it to the set of referenced spaces.
 +
{{CommentBox|Note that a technology such as a "remove file system" can easily provide for multiple spaces.}}
 
* '''Future - Additional management services''':
 
* '''Future - Additional management services''':
 
** Delete of space
 
** Delete of space
Line 45: Line 71:
 
** More ?
 
** More ?
  
====Content? Services====
+
====Source Services====
Content services are about what you can do with the content in a space.  
+
Services related to working with source in a versioned repository. Note that the spaces project does not define what projects and versions to check out from the source repository, the service simply creates the references to the space's source.  
  
 +
Providing a source service is optional, If provided the service should be one of the supported:
 +
* '''CVS'''<br/>This service provides the hookup between a <i>Space Resource</i> and the Team/CVS implementation in CVS. Different <i>Spaces Service Providers</i> may have different ways of addressing the CVS. Once the connection has been made, the user uses the normal Team /CVS plugin to do operations on the CVS instances.
 +
* '''SVN'''<br>Same as CVS, but for SVN. There is now a team.svn at eclipse even if one piece needs to be downloaded from Polarion because of a LGPL license issue.
 +
{{CommentBox|This is implemented by returning a URI to the source code repo associated with the space.}}
  
* '''Versioned Storage'''
+
====Publishing Services====
** '''CVS'''<br/>Optional. This service provides the hookup between a <i>Space Resource</i> and the Team/CVS implementation in CVS. Different <i>Spaces Service Providers</i> may have different ways of addressing the CVS. Once the connection has been made, the user uses the normal Team /CVS plugin to do operations on the CVS instances.
+
Publishing services allows upload/publishing of bits by a publisher, and download/consumption by a user. Core publishing is provided by spaces.
** '''SVN'''<br>Optional. Same as CVS, but for SVN. There is now a team.svn at eclipse even if one piece needs to be downloaded from Polarion because of a LGPL license issue. <span style="color:red">Needs to be discussed how spaces is packaged and distributed.</span>
+
* '''Publishing'''<br/>The publishing API is a highlevel api with methods like publishForProduction(File), publishForProduction(Folder) - see more below what the publishing functionality is about.
+
* '''HTTP access'''<br/>Optional. Allows access to the content via regular "read only" URLs.
+
* '''HTTPS access'''<br/>?
+
  
<span style="color:red">This is perhaps a SPI? as a large part of publishing could be generic</span>
+
=====Upload=====
* '''Spaces Remote File System'''<br/>Optional. An unversioned API defined by spaces for reading and writing files and folders. (Assumed to be modeled after the AOL X-Drive API). This API should be generic enough to allow implementations for technologies like ftp, webdav, or indeed a local file system.
+
Spaces uploads/publishes bits to a naming structure by using [[EFS|The Eclipse File System (EFS)]] API. EFS also defines the the SPI for EFS implementations. There are already EFS implementations that operate against different types of local and remote file systems, and an implementor of a new type of EFS can either choose to implement the EFS interfaces directly, or as a plugin to the [http://www.eclipse.org/dsdp/tm/ Target Management Platform]'s Remote System Explorer (RSE).
  
=====Publishing=====
+
* The EFS was picked as it seems pointless to implement yet another "file system API", and EFS is what Eclipse uses.
A wizard helps with publishing with options:
+
* A "file system API" was picked to have a clear separation of concerns (i.e. deal with "just files" as opposed to understanding various published structures).
 +
* An EFS API towards remote file systems like AOL X-Drive is of general value and is not specific to spaces.
  
* Select space (or take alternate route via creating account and creating space first)
+
The spaces publishing API consists of high level operations on a <i>Space Resource</i> with methods that allows publishing for 'test' or 'production', and with options regarding handling of meta data - see more below.
* When a plug-in is published:
+
 
 +
* '''EFS Provider'''<br/>Mandatory. The <i>Service Provider</i> must provide an EFS implementation. This implementation may be a full implementation - it is then assumed that the published structure is preserved and made available verbatim via the consumption URLs. A limited implementation can also be provided that only supports individual files in the root folder. This is then indicated with a capability flag ("NestedFolders") which is used by publishing to determine the applicable "publish as" actions for such a space.
 +
 
 +
=====Spaces Publishing=====
 +
{{CommentBox|Update description with information about IPublishingOperation and selection. As Eclipse Jobs are used, include link to more information [http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html Jobs API]
 +
}}
 +
Publishing is done by calling methods on a <i>Space Resource</i>. Spaces also provides a wizard to help with publishing (i.e. setting options, and how to handle meta data).
 +
 
 +
A user invokes the wizard on some produced artifact they want to publish.
 +
 
 +
The wizard does the following:
 +
* The user selects a space (or takes alternate route via creating account and creating space first)
 +
* If user published a plug-in, user enters options:
 
** Should an OBR be created or an existing OBR be used, or perhaps no OBR?
 
** Should an OBR be created or an existing OBR be used, or perhaps no OBR?
 
** Should an Eclipse feature be created or an existing feature be used, or perhaps no feature?
 
** Should an Eclipse feature be created or an existing feature be used, or perhaps no feature?
 
** Should an Eclipse update site be created or an existing update site be used (both implies a feature), or no update site?
 
** Should an Eclipse update site be created or an existing update site be used (both implies a feature), or no update site?
 
** Should an Eclipse p2 profile be created or an existing p2 profile be used, or no p2 profile?
 
** Should an Eclipse p2 profile be created or an existing p2 profile be used, or no p2 profile?
* If it is not a plug-in:
+
* If user published something that is not a plug-in:
 
** What kind of meta-data should be provided (name, version, type)
 
** What kind of meta-data should be provided (name, version, type)
 
** Documentation
 
** Documentation
** Short-desc
+
** Short description
 
** Or appoint known meta-data format (cspec, POM, etc.)
 
** Or appoint known meta-data format (cspec, POM, etc.)
* If no mapping is turned on for the space, the user is asked if they want to turn that on for the space (i.e. now do what they could do when adding the connection to the space in the first place. The user can also select "do not ask me again".
+
* A selection if the published material is for "test" or "production" (the implementation of the space publisher defines how this is mapped to the underlying technology).
<span style="color:red">note: add info about "mapping" to creating/connecting to a space.</span>
+
 
* A selection if the published material is for "test" or "production" (the implementation of the space publisher defines how this is mapped to the underlying technology). <span style="color:red">note about relationship between publishing and "reading/consuming" needs to be described</span>
+
A first implementation can have a small set of hardwired ways of publishing, but this should be an extension point in the future. The Wizard UI then gets slightly more complex as the different "publish as" may have their own options that needs to be specified by the user, etc.
 +
 
 +
=====Consumption=====
 +
It is perfectly valid to only provide publishing using an EFS as this can be used to perform publishing to any type of remote system - perhaps a small device. The spaces project is however mostly focused on publishing to an area that is accessed using a download protocol.
 +
 
 +
* '''HTTP access'''<br/>Mandatory. Allows access to the published content via regular "read only" URLs. The API is very simple; all that is required is that the root URLs to 'test' and 'production' are available.
 +
* '''HTTPS access'''<br/>Future.
  
 
====Collaboration Services====
 
====Collaboration Services====
 
From the proposal:
 
From the proposal:
{{CommentBox|'''Collaborating''': in the simplest case, a menu item that opens a web page for a collaboration medium (e.g., a forum). More complex cases might involve menu items that start up the Mylar Bugzilla view, or Corona for a Spaces-mediated chat session. The exact definition of collaboration will be left to the adapter based on the back-end's collaboration services. The key user interface feature is that the path to the collaboration will be obviously connected with the project itself.
+
'' '''Collaborating''': in the simplest case, a menu item that opens a web page for a collaboration medium (e.g., a forum). More complex cases might involve menu items that start up the Mylar Bugzilla view, or Corona for a Spaces-mediated chat session. The exact definition of collaboration will be left to the adapter based on the back-end's collaboration services. The key user interface feature is that the path to the collaboration will be obviously connected with the project itself.''
}}
+
 
  
 
The key objective here is that the spaces project provides the mechanisms for hookup between the <i>Space Resource</i> and <i>Collaborations</i> provided via different <i>Collaboration Technologies</i>.
 
The key objective here is that the spaces project provides the mechanisms for hookup between the <i>Space Resource</i> and <i>Collaborations</i> provided via different <i>Collaboration Technologies</i>.
  
<span style="color:red">Bullets below is a collection of thoughts for discussion.</span><br/>
+
=====Obtaining a <i>Collaboration</i>=====
This area is somewhat complicated, as different <i>Spaces Service Providers</i> provide these services in different ways:
+
After having obtained a <i>Space Resource</i> an enumeration of available <i>Collaborations</i> is obtained from the resource. Providing an enumeration of available Collaborations is mandatory (but can be an empty list).
* A provider like source forge, where "a project" would be synonym to a "space" provides collaboration services associated with the actual space. These services are provisioned when the space (i.e. "project") is created. Some such services may always be created, and others may be created "on demand".
+
A <i>Collaboration</i> describes:
* Some other <i>Space Service Provider</i> may offer collaboration as an additional service, and such a service may be used to collaborate in a wider scope - an example perhaps being the Eclipse wiki that will be used as a collaboration tool for several eclipse spaces, or a space being associated with a particular project in a Bugzilla, as opposed to an individual Bugzilla per space/project.
+
* Name - to allow identification
* Some providers offer collaborative tools for a service fee (e.g. on-line video conferencing)
+
* Type - enumerator e.g. project home, issue tracking, forums, chatroom, documentation, etc.
* All collaborations typically used by a group collaborating "in a space" are not provided by a single service provider, and also typically not by the same provider as the basic "space".
+
* A description - if the name and type is not enough to understand the purpose of the <i>Collaboration</i>
* A question is how "documentation" should be viewed. One aspect of documentation is that it is a thing a group is collaborating to produce - the same way as the code is produced. Another aspect is if the intended audience - is this the "end user documentation", or "documentation for the developers".
+
* Additional key/value properties that the <i>Collaboration Technology</i> makes use of for the hook up.
* The spaces project in itself is a collaboration technology! Assuming that a user A wants to collaborate with user B, how is the setup for user A propagated to user B? Should A send B and email with all the references B should install in order to access the required spaces? Or can user B start with a "basic Eclipse" ?
+
* What if the wanted <i>Collaboration</i> also requires additional plugins? Say, a Mylyn adapter to some issue tracker?
+
* Several of the above questions makes it more natural to think of a <i>Collaboration</i> as a component (i.e. a Buckminster component/cspec) comparable to other resources such as source, "technology plugins" such as compilers, etc., as this would allow creation of distros, dependencies between components etc.
+
  
* At the most basic level, some description of a <i>Collaboration</i> is needed. This should define:
+
Type is similar to a mime string, and spaces project should define a default but expandable set. Examples:
** Name - to allow identification
+
* issues/bugzilla
** Reference to <i>Collaboration Technology</i> - so it is possible to connect to it
+
* issues/mantis
** A description - if the name is not enough to understand the purpose of the <i>Collaboration</i>
+
* issues/track
* A simplistic API is to let the <i>Space Resource</i> provide an list of <i>Collaborations</i>.
+
* wiki
* A slightly more advanced API allows definition/Addition of <i>Collaborations</i> to a space - i.e. Adding references to existing places of collaboration.
+
* chat/irq
* A more advanced API defines provisioning of a <i>Collaboration</i> (e.g. creating a wiki, or a bugzilla instance/project)
+
*...rest to be specified
  
* So - basic questions - how are collaborations defined? Should a service provider return a list of some Buckminster artifacts (XML) that buckminster can operate on directly, or should it provide some spaces specific information that can be transformed into buckminster artifacts the same way buckminster translates other types of meta data "on the fly"? An approach using a specific definition seems cleaner as the provider is then not exposed to the full complexity of buckminster, but on the other hand, such flexibility is perhaps needed in some cases.
+
With this information, it is possible to hook up services, or provide simple viewing of links and information.
 +
=====Hooking up Collaboration with Collaboration Technology=====
 +
Spaces provides a <i>CollaborationTypeRegistry</i> with associations between collaboration type-strings and <i>Collaboration Technology</i>. The reason for the separation between the type of collaboration and what technology to use is to allow different types of tools/viewers to access the collaboration without the space having to have this knowledge. As an example, a space can point to a bugzilla, but should not need to know that the user wants to use Mylyn to access this information.
  
Proposals? Ideas?
+
The spaces project comes with a generic link implementation that simply displays some information about the collaboration, and this provided as a default in the registry.
 +
To integrate with something like Mylyn, a plugin is created that registers itself for the appropriate types (perhaps issues/*) and associates this with a <i>CollaborationTechnology</i> class that simply does the required setup for Mylyn for a provided issue tracking link.
 +
 
 +
(The CollaborationTypeRespository is probably not a good name, and the mechanism can perhaps be modeled after something similar already in Eclipse - like file type/editor associations).
 +
 
 +
=====Adding <i>Collaborations</i>=====
 +
Adding collaborations to a space is an optional service. The space provider determines how this additional information is stored in the space.
 +
 
 +
=====Provisioning <i>Collaboration</i>=====
 +
A future API is to allow provisioning of collaborations - i.e. to request that some collaboration is set up on the server side - this could be a request to set up a wiki, or a bugzilla, create a chatroom/channel, create a subforum etc.
  
 
===Spaces Catalog===
 
===Spaces Catalog===
Line 116: Line 169:
 
* When sharing of Space Resources is wanted, they are added to a template workspace that later is used when doing headless builds etc. (This is important as credentials are needed for secure access to both spaces, and services provided by the space provider but accessed via 'non spaces' common APIs - e.g CVS or SVN access).
 
* When sharing of Space Resources is wanted, they are added to a template workspace that later is used when doing headless builds etc. (This is important as credentials are needed for secure access to both spaces, and services provided by the space provider but accessed via 'non spaces' common APIs - e.g CVS or SVN access).
  
===Space Resource===
+
===Space Address===
A <i>Space Resource</i> is the data that makes it possible to connect to a space using a <i>Space Provider</i>. All Space resources share a common set of traits:
+
A <i>Space Address</i> is the data that makes it possible to connect to a space using a <i>Space Provider</i>. The address is a URI that points to a space.
* A name that identifies this space instance from others in the user interface - used when selecting a space when publishing etc.
+
 
* A URI used to connect to the space
+
A Space has the following traits:
* Credentials to access the space
+
* An address (URI)
 +
* Credentials to access the space  
 
* An enumeration of available <i>Space Services</i>
 
* An enumeration of available <i>Space Services</i>
 +
* IFileStore handles for a flat list of files, and for a full file system (one or both)
 +
* URLs for http access to the roots of the flat list of files, and for the full file system (one or both)
 +
* Methods for begin/end/fail of publishing called from publishing operations in the space's EFS (can be overridden by a space provider that needs to perform sync or batch operations on the backing store).
  
{{CommentBox|Ideas and suggestions - Thomas
+
===Events===
}}
+
To ease integration spaces should issue events to registered listeners.
==The user perspective==
+
* When an Account Reference is added, changed or removed
The user will perceive that the spaces concept consist of four things:
+
* When a Space Resource reference is added, changed or removed
* Account and Space Management (Mandatory)
+
* When a Collaboration is added, changed or removed.
* Publishing (Mandatory)
+
* When something is published to a space
* Source Code Management (Optional)
+
 
* Collaboration (Optional)
+
This can be done in a manner similar to how listeners are handled for Eclipse resources.
 +
 
 +
==FAQ==
 +
 
 +
===How should a user publish source if they do not use a versioned repository?===
 +
In this case, a source bundle should be created and published just like any other bundle by using the Publishing API.
 +
 
 +
===What is the relationship between spaces and the remote file system (X-Drive) implementation?===
 +
The implementation for AOL X-Drive is one way of implementing what the publishing layer requires (to have somewhere to store published bits). This plugin can naturally be used by others that want to support the same JSON based protocol, and can naturally be used to create other services than those provided by "spaces". The spaces project however views the world as consisting of "spaces" having EFS based "containers" for "published artifacts" and a "container" for "source" irrespective of the implementation technology.
 +
 
 +
Read more about the X-Drive API [http://dev.aol.com/xdrive_resources/json_apidocs/api-index.html here].
 +
 
 +
===How can building and publishing be automated?===
 +
This is a quite large domain, as it consists of getting the wanted versions of all required source, performing a build, and then publishing the resulting bits. Such building could be done manually in the IDE, automated in headless fashion, be driven by ANT tasks, handled by Buckminster builds, or something else. It should be the choice of the users, especially as they may migrate to using spaces after already having working build infrastructure.
 +
 
 +
(Note: it is the intention to provide automated build and publishing to a space within the Buckminster project).
 +
 
 +
===What if a publishing container can only support a "list of files"?===
 +
It is possible that a space provider only supports publishing of single files (e.g. typically zip files). The provider may have them in some kind of database and may give users the opportunity to state some facts in addition to name, like version, a description, some category like "latest", "production"...
 +
How can this be handled using EFS?
  
Consequently, instead of having '''Content Services''', I think there should be a '''Publishing service''' that make it possible to upload new things to be visible on the web and a '''Source Code Management''' service that is based on SVN or CVS. I don't think there's a need for an unversioned '''Spaces Remote File System'''. In essence, this means that:
+
In this case an EFS implementation is expected where it is only possible to write files in the top level folder. The implementation signals its capabilities via getCapabilities(). The publishing functionality in spaces will only present applicable publishing options (e.g. it is not possible to publish a regular update site, but it is possible to publish an "archived update site").
  
* If you want to share unversioned code, you do so by exposing source bundles using the '''Publishing Service'''
+
===Where does things published under "test" and "production" end up in the remote file system?===
* If a provider wants to support the '''Source Code Management''' option, they will have to provide a SVN or CVS service.
+
This is controlled by the space provider - different URIs for the two roots - "test" and "production" are provided as EFS root entry points, and different URLs for consumption. This makes it possible to point to two completely separate areas.
  
===Integrations between Source and Publishing===
+
===How do I integrate with mapping or RSS feeds?===
Let the '''Source Code Management''' service be aware of a top level project that contains the artifacts necessary to do a full build and then publish the result. We could provide ant-tasks for this so that everything can be controlled by ant and ultimately orchestrated by Buckminster.
+
The event mechanism can be used to trigger actions when something has been published. This can be used to automate downstream builds or testing, publish information on a RSS feed, trigger mapping/indexing and other external services. Spaces may provide such extensions in the future. Have an idea or want to contribute something? Contact us.
 +
===Where can I read more about EFS?===
 +
* [http://eclipsezone.com/forums/thread.jspa?messageID=92063570 Eclipse Zone intro article]

Latest revision as of 19:24, 20 January 2008

Proposal - Draft 1 - Jan 14, 2008, Henrik Lindberg

For latest revision of interfaces, checkout the org.eclipse.spaces.core project in spaces SVN.
Please add your comments in a box like this.

At a glance

SpacesTopOverview.png

Via a Space it is possible to Publish into a "file system" of some sort, get access to Source in a CVS or SVN repository, and access/hook up a Collaboration (such as issue tracking) with a collaboration technology. Via Management it is possible to add/remove/control services.

Spaces Architecture

At the highest abstraction level, the architecture consists of:

  1. Applications (user interface, automation "headless builds" etc.)
  2. API (the core spaces functionality)
  3. SPI (Service Programming Interface)
  4. Implementation for different service provider technologies

Applications

Examples:

  • View into spaces added to a workspace
  • Wizards - managing spaces in workspace
  • Space properties view - services provided by space provider, etc.
  • Signing up for an account at a service provider

It is important that headless mode is considered when structuring application plugins.

Here are the application specifications

API

Here is a UML diagram of the proposed API File:SpacesArchUML.png

Spaces Service Provider

Each provider of spaces creates a plugin for a "Spaces Service Provider" extension point. When a user wants to add a Space Resource to a project, the first selection is among the available providers (e.g. AOL (X-Drive), SourceForge, GenericSVNSpace, GenericCVSSpace - the two generic space providers are thought to be useful reference implementations provided by the spaces project based on SVN and CVS).

A space service provider plugin should be headless, but can be accompanied by a UI plugin when needed.

Common (headless) traits are:

  • Name, the name of the service provider
  • A description of the service
  • An enumeration of available Space Services - to enable user to select a provider based on capabilities.
  • A list of provider schemes supported by the plugin

And with UI traits

  • Icon for display with the description (e.g. a space provider logo)
  • Small Icon for use in association with a Space Resource
  • A URL to read more about the provided service
  • Wizards for

Space Service

A Space Service describes a service available for spaces from a Spaces Service Provider These services are grouped into:

  • Account and Space Management Services
  • Source Services
  • Publishing Services
  • Collaboration Services

Account and Space Management Services

Management services are about creation/maintenance of Accounts, and Space Resources associated with such an Account.

  • Account Reference
    Mandatory. Adding/Modifying a reference to an account by passing account information. Different providers may have implementation specific ways of storing the account information (e.g. Eclipse key ring, some (probably encrypted) file in the local file system, etc.). The idea is that the spaces project should reuse these implementations and not use a separate "vault"/"key ring". Produces Account Reference information that can be stored in spaces project meta data that can be used to reconnect.
This is now implemented as a Space URI, and Spaces handles authorization information for spaces.
  • Account creation / Sign up
    Optional. A full implementation allows an account to be created via the API, but a simple implementation may consist of just information and an URL to a website where a user can sign up. A full implementation should add the new account to the set of accounts (i.e. create an account reference).
  • Space Reference
    Mandatory. Adding/Modifying a reference to a space for an Account. Produces Space Resource information that can be stored in spaces project meta data.

{{CommentBox|This is implemented completely in spaces - SpaceCatalog keeps a persistent record of added space URIs in the workspace meta data.

  • Space Creation
    Optional. A full implementation allows creating a space (i.e. 'server side') and adding it to the set of referenced spaces.
Note that a technology such as a "remove file system" can easily provide for multiple spaces.
  • Future - Additional management services:
    • Delete of space
    • Controlling access rights to space
    • Change password
    • More ?

Source Services

Services related to working with source in a versioned repository. Note that the spaces project does not define what projects and versions to check out from the source repository, the service simply creates the references to the space's source.

Providing a source service is optional, If provided the service should be one of the supported:

  • CVS
    This service provides the hookup between a Space Resource and the Team/CVS implementation in CVS. Different Spaces Service Providers may have different ways of addressing the CVS. Once the connection has been made, the user uses the normal Team /CVS plugin to do operations on the CVS instances.
  • SVN
    Same as CVS, but for SVN. There is now a team.svn at eclipse even if one piece needs to be downloaded from Polarion because of a LGPL license issue.
This is implemented by returning a URI to the source code repo associated with the space.

Publishing Services

Publishing services allows upload/publishing of bits by a publisher, and download/consumption by a user. Core publishing is provided by spaces.

Upload

Spaces uploads/publishes bits to a naming structure by using The Eclipse File System (EFS) API. EFS also defines the the SPI for EFS implementations. There are already EFS implementations that operate against different types of local and remote file systems, and an implementor of a new type of EFS can either choose to implement the EFS interfaces directly, or as a plugin to the Target Management Platform's Remote System Explorer (RSE).

  • The EFS was picked as it seems pointless to implement yet another "file system API", and EFS is what Eclipse uses.
  • A "file system API" was picked to have a clear separation of concerns (i.e. deal with "just files" as opposed to understanding various published structures).
  • An EFS API towards remote file systems like AOL X-Drive is of general value and is not specific to spaces.

The spaces publishing API consists of high level operations on a Space Resource with methods that allows publishing for 'test' or 'production', and with options regarding handling of meta data - see more below.

  • EFS Provider
    Mandatory. The Service Provider must provide an EFS implementation. This implementation may be a full implementation - it is then assumed that the published structure is preserved and made available verbatim via the consumption URLs. A limited implementation can also be provided that only supports individual files in the root folder. This is then indicated with a capability flag ("NestedFolders") which is used by publishing to determine the applicable "publish as" actions for such a space.
Spaces Publishing
Update description with information about IPublishingOperation and selection. As Eclipse Jobs are used, include link to more information Jobs API

Publishing is done by calling methods on a Space Resource. Spaces also provides a wizard to help with publishing (i.e. setting options, and how to handle meta data).

A user invokes the wizard on some produced artifact they want to publish.

The wizard does the following:

  • The user selects a space (or takes alternate route via creating account and creating space first)
  • If user published a plug-in, user enters options:
    • Should an OBR be created or an existing OBR be used, or perhaps no OBR?
    • Should an Eclipse feature be created or an existing feature be used, or perhaps no feature?
    • Should an Eclipse update site be created or an existing update site be used (both implies a feature), or no update site?
    • Should an Eclipse p2 profile be created or an existing p2 profile be used, or no p2 profile?
  • If user published something that is not a plug-in:
    • What kind of meta-data should be provided (name, version, type)
    • Documentation
    • Short description
    • Or appoint known meta-data format (cspec, POM, etc.)
  • A selection if the published material is for "test" or "production" (the implementation of the space publisher defines how this is mapped to the underlying technology).

A first implementation can have a small set of hardwired ways of publishing, but this should be an extension point in the future. The Wizard UI then gets slightly more complex as the different "publish as" may have their own options that needs to be specified by the user, etc.

Consumption

It is perfectly valid to only provide publishing using an EFS as this can be used to perform publishing to any type of remote system - perhaps a small device. The spaces project is however mostly focused on publishing to an area that is accessed using a download protocol.

  • HTTP access
    Mandatory. Allows access to the published content via regular "read only" URLs. The API is very simple; all that is required is that the root URLs to 'test' and 'production' are available.
  • HTTPS access
    Future.

Collaboration Services

From the proposal: Collaborating: in the simplest case, a menu item that opens a web page for a collaboration medium (e.g., a forum). More complex cases might involve menu items that start up the Mylar Bugzilla view, or Corona for a Spaces-mediated chat session. The exact definition of collaboration will be left to the adapter based on the back-end's collaboration services. The key user interface feature is that the path to the collaboration will be obviously connected with the project itself.


The key objective here is that the spaces project provides the mechanisms for hookup between the Space Resource and Collaborations provided via different Collaboration Technologies.

Obtaining a Collaboration

After having obtained a Space Resource an enumeration of available Collaborations is obtained from the resource. Providing an enumeration of available Collaborations is mandatory (but can be an empty list). A Collaboration describes:

  • Name - to allow identification
  • Type - enumerator e.g. project home, issue tracking, forums, chatroom, documentation, etc.
  • A description - if the name and type is not enough to understand the purpose of the Collaboration
  • Additional key/value properties that the Collaboration Technology makes use of for the hook up.

Type is similar to a mime string, and spaces project should define a default but expandable set. Examples:

  • issues/bugzilla
  • issues/mantis
  • issues/track
  • wiki
  • chat/irq
  • ...rest to be specified

With this information, it is possible to hook up services, or provide simple viewing of links and information.

Hooking up Collaboration with Collaboration Technology

Spaces provides a CollaborationTypeRegistry with associations between collaboration type-strings and Collaboration Technology. The reason for the separation between the type of collaboration and what technology to use is to allow different types of tools/viewers to access the collaboration without the space having to have this knowledge. As an example, a space can point to a bugzilla, but should not need to know that the user wants to use Mylyn to access this information.

The spaces project comes with a generic link implementation that simply displays some information about the collaboration, and this provided as a default in the registry. To integrate with something like Mylyn, a plugin is created that registers itself for the appropriate types (perhaps issues/*) and associates this with a CollaborationTechnology class that simply does the required setup for Mylyn for a provided issue tracking link.

(The CollaborationTypeRespository is probably not a good name, and the mechanism can perhaps be modeled after something similar already in Eclipse - like file type/editor associations).

Adding Collaborations

Adding collaborations to a space is an optional service. The space provider determines how this additional information is stored in the space.

Provisioning Collaboration

A future API is to allow provisioning of collaborations - i.e. to request that some collaboration is set up on the server side - this could be a request to set up a wiki, or a bugzilla, create a chatroom/channel, create a subforum etc.

Spaces Catalog

The spaces catalog is comparable to the list of repositories available for Team/CVS and SVN. Access to spaces is a cross cutting concern, the same settings apply to multiple projects, and may be required before projects are available (since a project can be checked out from a space). The data in this catalog is also comparable to Team Project Set.

  • The catalog itself is part of the workspace meta data
  • The API consists of CRUD operations of Space Resources in the catalog
  • When adding a space, the user runs a wizard where a list of Spaces Service Providers are listed, the user selects the provider, and then if a new space should be created (if provided by the Spaces Service Provider), or if they want to use an existing space, properties are then edited as needed).
  • When sharing of Space Resources is wanted, they are added to a template workspace that later is used when doing headless builds etc. (This is important as credentials are needed for secure access to both spaces, and services provided by the space provider but accessed via 'non spaces' common APIs - e.g CVS or SVN access).

Space Address

A Space Address is the data that makes it possible to connect to a space using a Space Provider. The address is a URI that points to a space.

A Space has the following traits:

  • An address (URI)
  • Credentials to access the space
  • An enumeration of available Space Services
  • IFileStore handles for a flat list of files, and for a full file system (one or both)
  • URLs for http access to the roots of the flat list of files, and for the full file system (one or both)
  • Methods for begin/end/fail of publishing called from publishing operations in the space's EFS (can be overridden by a space provider that needs to perform sync or batch operations on the backing store).

Events

To ease integration spaces should issue events to registered listeners.

  • When an Account Reference is added, changed or removed
  • When a Space Resource reference is added, changed or removed
  • When a Collaboration is added, changed or removed.
  • When something is published to a space

This can be done in a manner similar to how listeners are handled for Eclipse resources.

FAQ

How should a user publish source if they do not use a versioned repository?

In this case, a source bundle should be created and published just like any other bundle by using the Publishing API.

What is the relationship between spaces and the remote file system (X-Drive) implementation?

The implementation for AOL X-Drive is one way of implementing what the publishing layer requires (to have somewhere to store published bits). This plugin can naturally be used by others that want to support the same JSON based protocol, and can naturally be used to create other services than those provided by "spaces". The spaces project however views the world as consisting of "spaces" having EFS based "containers" for "published artifacts" and a "container" for "source" irrespective of the implementation technology.

Read more about the X-Drive API here.

How can building and publishing be automated?

This is a quite large domain, as it consists of getting the wanted versions of all required source, performing a build, and then publishing the resulting bits. Such building could be done manually in the IDE, automated in headless fashion, be driven by ANT tasks, handled by Buckminster builds, or something else. It should be the choice of the users, especially as they may migrate to using spaces after already having working build infrastructure.

(Note: it is the intention to provide automated build and publishing to a space within the Buckminster project).

What if a publishing container can only support a "list of files"?

It is possible that a space provider only supports publishing of single files (e.g. typically zip files). The provider may have them in some kind of database and may give users the opportunity to state some facts in addition to name, like version, a description, some category like "latest", "production"... How can this be handled using EFS?

In this case an EFS implementation is expected where it is only possible to write files in the top level folder. The implementation signals its capabilities via getCapabilities(). The publishing functionality in spaces will only present applicable publishing options (e.g. it is not possible to publish a regular update site, but it is possible to publish an "archived update site").

Where does things published under "test" and "production" end up in the remote file system?

This is controlled by the space provider - different URIs for the two roots - "test" and "production" are provided as EFS root entry points, and different URLs for consumption. This makes it possible to point to two completely separate areas.

How do I integrate with mapping or RSS feeds?

The event mechanism can be used to trigger actions when something has been published. This can be used to automate downstream builds or testing, publish information on a RSS feed, trigger mapping/indexing and other external services. Spaces may provide such extensions in the future. Have an idea or want to contribute something? Contact us.

Where can I read more about EFS?

Back to the top