Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-tm-dev] FW: ECF Confcall Notes

Hello,

another E-Mail (plus attachments) regarding ECF Fileshare
API, and dependencies.

Cheers,
Martin
--
Martin Oberhuber - WindRiver, Austria
+43(662)457915-85

-----Original Message-----
From: Scott Lewis [mailto:slewis@xxxxxxxxxxxxx] 
Sent: Tuesday, October 18, 2005 9:46 PM
To: Oberhuber, Martin
Cc: David Dykstal; Scharf, Michael; Pete Mackie
Subject: Re: ECF Confcall Notes

Hi Martin and all,

Thanks for the most excellent notes.   To give a first stab at 
addressing my "Provide a pointer..." action item below, I've attached a 
zip with two plugins:

org.eclipse.ecf.fileshare <-  this is api plugin
org.eclipse.ecf.provider.ftp <- trivial partial incomplete 
implementation of fileshare API

Note that fileshare depends upon org.eclipse.ecf, and 
org.eclipse.ecf.provider.ftp depends upon fileshare (and it's 
dependents) and org.eclipse.ecf.provider.  To compile/run these you will

need to have org.eclipse.ecf and org.eclipse.ecf.provider.  You should 
get the latest of these by importing the attached ecf-anonymous.psf 
project set file.

Below is some example code that uses the IFileShareContainer api.  This 
is trivial AND incomplete ;-), as you shall soon see, but it does show 
how to interact with ECF containers, and it shows the storing of a file 
(retrieved from an input stream) to a remote FTP server implementation 
of the IFileShareContainer api.

Please send any comments/thoughts about this to me.  As I said during 
call...I'm thinking of adding

a) refactoring the fileshare api...what is in org.eclipse.ecf.fileshare 
is not at all complete and needs method renaming, moving things around, 
other/fewer interfaces, etc
b) changing the provider impl to be based upon org.eclipse.ftp rather 
than apache ftp
c) using fileshare api to *implement* EFS (down road as Martin points
out)
d) using ECF discovery to find container types, uris, available files 
and run code like below automatically

Michael I would like to talk with you sometime soon about

a) the 'efs' bug (#106176)...I've been reading your postings with 
admiration and approval, but haven't yet been able to jump into the 
discussion
b) ECF plans WRT platform readiness, architecture council discussions, 
planning thereof, etc

David please LMK about RSE licensing as it happens and we'll coordinate 
on putting an ECF provider wrapper around it.

Scott


Here's a trivial and incomplete example of using the fileshare API.

1) Create ECF Container instance (rootContainer).  containerType == name

declared by org.eclipse.ecf.provider.ftp plugin...in this case: "ecfftp"

        IContainer rootContainer = ContainerFactory
                .getDefault().makeContainer(containerType);

2) Create target ID of remote FTP server (e.g. 
ftp://foo.bar.eclipse.org)  (uri == "ftp://ftp.windriver.com";)

        // Get the target namespace, so we can create a target ID of 
appropriate type
        ID targetID = 
IDFactory.getDefault().makeID(rootContainer.getConnectNamespace(), uri);

3) Get fileshare implementer from container via IAdaptable interface

        IFileShareContainer fsc = (IFileShareContainer) 
rootContainer.getAdapter(IFileShareContainer.class);
        if (fsc == null)  {
            // this means the container provider does not support file 
sharing
           // we should throw here
           throw new WeAreDeadInWaterException("wrong container type for

file sharing");
        }

// Everything to this point is all local...no network operations at all,

here is first network operation (authentication)
4) Connect (note username/password for ftp connect are used to 
authenticate here and getJoinContext returns IConnectContext wrapper)

        try {
            newClient.connect(targetID, getJoinContext(username,
password));
        } catch {
             ...
        }

5) Use IFileSharedContainer interface to send a local file ("<working 
directory>/notice.html" to ftp server with name "rnotice.html").

             IStoreFileDescription sfs = new IStoreFileDescription() {
                public InputStream getLocalStream() throws IOException {
                    return new FileInputStream("notice.html");
                }
                public String getRemoteFileName() {
                    return "rnotice.html";
                }
                public ISharedFileEventListener getEventListener() {
                    return null;
                }
                public Map getProperties() {
                    return null;
                }
            };
            // Get file handle for given description
            ISharedFile sf = fsc.store(sfs);
            // Start sending...this returns immediately, but another 
thread actually sends the file.  Notifications of various send events
           // would/will be provided via the ISharedFileEventListener 
(see above), but I don't have that implemented yet. 
            try {
                sf.start();
            } catch (SharedFileStartException e) {
                e.printStackTrace();
            }

Scott



Oberhuber, Martin wrote:

>Hi Folks,
>
>below are the notes for the talk we just had.
>See Action Items at the end of the mail.
>
>Discussion:
>-----------
>ECF Filesharing API works independent of EFS
>Want the ECF Filesharing API to implement EFS (as soon as
>it is in a release -- most probably n the next milestone).
>
>ECF has Provider API. org.eclipse.ecf.fileshare provider is an
>abstract API for sending / receiving files. Scott intends to 
>enhance it to get and resolve file pathes to/from remote sources.
>API implemented by sample FTP implementation (not yet on eclipse.org).
>
>FTP Implementations:
>1 - com.sun.ftp ... very simple
>2 - FTP in Platform (org.eclipse.ftp) - simple impl, used for EFS right
>now
>3 - Apache Impl used by Scott - anything special?
>    * Eclipse code only depends on Runtime, Scott might move to it
>
>Scott wants other providers of Fileshare API (including RSE)
>David already has an EFS implementation based on Datastore
>  --> For TM, we could base on ECF or on EFS, what do we want?
>
>Dave has problems with ECF being "Technology" only; Scott wants to get
>it "more official". Would like to see ECF Core API out of Technology
>by 3.2 -- need to talk to Platform people including Equinox.
>TM Team could help making this move into the Platform happen, by
>talking to the right people and asserting that ECF Core is good.
>
>Michael Scharf could act as our Steward on the Architecture Council.
>
>Martin: Don't want a hard dependency from TM into ECF now:
> - for Filesharing, have TM depend on EFS (since it lives in Platform)
>   and make ECF implement filesharing
> - Going forward, TM will need more communication (message passing,
>   Connectors). Closely looking at ECF to handle that. Will nail down
>   Connectors more when meeting in Salzburg Nov.14 (Peter
Lachner/Intel,
>   Michael Scharf, Felix Burton, Martin Oberhuber/Wind River)
>
>Scott: What ECF can do for TM (and others):
>1.) Provide implementations for Services (e.g. implement EFS)
>2.) Basic Messaging Support (e.g. for Connectors)
>3.) Discovery (e.g. Discover Filesystems) - ECF can do this very
>natively
>    -- additional API in a very small plugin
(org.eclipse.ecf.discovery)
>    -- implementation based on ZeroConf in another
>
>Depending on ECF Core API should not be a big problem, because it is
>very small and itself depends only on Runtime and OSGi.
>Trying to get 3-5 Core plugins of ECF into Platform:
>
>org.eclipse.ecf
>org.eclipse.ecf.discovery
>org.eclipse.ecf.doc
>org.eclipse.ecf.presence  -- only needed for ECF sample applications
>org.eclipse.ecf.provider  -- only needed by provider implementations
>
>Scott would want to wrap RSE/Datastore in ECF.
>
>If RSE would want to use EFS immediately for filetransfer
>(and not ECF), then for ECF it would be better to provide 
>other implementations than FTP, try to improve core interfaces
>and form up the API.
>
>David: If TM is to provide filesharing, we should not expose too many
>implementation details, so that we can substitute implementations and
>exchange EFS against ECF or vice versa.
>
>ECF has worked a lot on "virtualisation" and abstracting certain 
>classes of communication. Filesharing is one such class of
>communication.
>Providers may support this API or not (using IAdaptable).
>
>David: When talking about Platform, there is "Tools" and "Platform".
>The plain Platform is basically just a Runtime (plus basic things
>like EMF, GEF). RSE to go into the Tools project. ECF into Tools?
>Rather hope it to end up in Platform. Extension APIs like fileshare,
>presence, provider to end up in Tools but the very basic Core in 
>Platform.
>
>Jeff McCaffee of Equinox working on Security and Authentication for 3.2
>--
>Directly tied to what ECF did on Identity and Namespaces
>
>Martin: We want to get a good API for filesharing. Scott should
>take part in EFS discussion to improve / generalize the API. 
>Better get the API right from beginning (Symbolic Links, arbitrary
>Properties).
>
>Action Items:
>-------------
>Martin: When will the EAC meet next time? - Ask MSA to vote for ECF.
>Martin: Send link with DSDP Schedule to Scott
>Martin: Keep Scott in the Loop after Connector discussion Nov.14
>Scott: add a short note to the EFS Bugzilla discussion with a pointer
>       to what ECF has done / is doing.
>Scott: Provide a pointer to FTP fileshare sample code to Martin and
Dave
>Pete: Send ECF Dependency list to Martin
>David: Keep Scott up to date with RSE licensing -- Scott wants to wrap
>       RSE Datastore in ECF soon after RSE is out
>
>
>
>Cheers,
>Martin
>
>--
>---------------------------------/()\----------------------------------
-
>DI Martin Oberhuber
mailto:martin.oberhuber@xxxxxxxxxxxxx
>Member of Technical Staff          Phone  (UTC +1h): +43 (662)
457915-85
>Wind River Systems (Salzburg) GmbH              Fax: +43 (662) 457915-6
>Jakob-Haringer-Str.8, A-5020 Salzburg, Austria
http://www.windriver.com
>----------------------- How Smart Things Think
-------------------------
> 
>  
>

Attachment: org.eclipse.ecf.fileshare_I20051018.zip
Description: org.eclipse.ecf.fileshare_I20051018.zip

<?xml version="1.0" encoding="UTF-8"?>
<psf version="2.0">
	<provider id="org.eclipse.team.cvs.core.cvsnature">
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.collab-feature,org.eclipse.ecf.collab-feature"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.core-feature,org.eclipse.ecf.core-feature"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.discovery,org.eclipse.ecf.discovery"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.doc,org.eclipse.ecf.doc"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.example.collab,org.eclipse.ecf.example.collab"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.example.hello,org.eclipse.ecf.example.hello"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.example.library,org.eclipse.ecf.example.library"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.example.sdo.editor,org.eclipse.ecf.example.sdo.editor"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.example.sdo.gefeditor,org.eclipse.ecf.example.sdo.gefeditor"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.graphshare-feature,org.eclipse.ecf.graphshare-feature"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.presence,org.eclipse.ecf.presence"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.provider,org.eclipse.ecf.provider"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.provider.xmpp,org.eclipse.ecf.provider.xmpp"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.sdo,org.eclipse.ecf.sdo"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/tests/org.eclipse.ecf.test,org.eclipse.ecf.test"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/tests/org.eclipse.ecf.test.provider,org.eclipse.ecf.test.provider"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/tests/org.eclipse.ecf.test.sdo,org.eclipse.ecf.test.sdo"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/tests/org.eclipse.ecf.test.ui,org.eclipse.ecf.test.ui"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.test-feature,org.eclipse.ecf.test-feature"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.ui,org.eclipse.ecf.ui"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.xmpp-feature,org.eclipse.ecf.xmpp-feature"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.server-feature,org.eclipse.ecf.server-feature"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf,org.eclipse.ecf"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/plugins/org.eclipse.ecf.datashare,org.eclipse.ecf.datashare"/>
		<project reference="1.0,:pserver:dev.eclipse.org:/home/technology,org.eclipse.ecf/features/org.eclipse.ecf.datashare-feature,org.eclipse.ecf.datashare-feature"/>
	</provider>
	
</psf>

Back to the top