transfer server

Ivan R. Judson judson at mcs.anl.gov
Thu Feb 20 20:26:15 CST 2003


Just so you all know what I've just done :-)

I'm planning on us having the transitional server on vv2.mcs.anl.gov, using
ports 9000 (Venues), 9002 (EventService), 9004 (TextService), and 9006
(DataService).

I've sent mail asking for these conduits to be put in place, anticipating
I'll get my stuff done tonight, checked in and Bob can resolve conflicts
before noon-ish tomorrow -- giving Ti enough time to release engineer this
weeks alpha.

One key thing that will make it easier for everyone in this release, we
should have the client profile default set to
https://vv2.mcs.anl.gov:9000/Venues/default (aka The Access Grid Lobby, on
the transitional server).

--Ivan

> -----Original Message-----
> From: owner-ag-dev at mcs.anl.gov 
> [mailto:owner-ag-dev at mcs.anl.gov] On Behalf Of Robert Olson
> Sent: Thursday, February 20, 2003 4:35 PM
> To: turam at mcs.anl.gov
> Cc: ag-dev at mcs.anl.gov
> Subject: Re: transfer server
> 
> 
> oh, and you can use the DataStore.GSIDownloadFile(url, 
> destination_file, 
> size, checksum) function to effect the download. See the new 
> AccessGrid/tests/test_datastore_{put,get}.py.
> 
> --bob
> 
> At 04:31 PM 2/20/2003 -0600, Robert Olson wrote:
> >the refactored transfer server should do what you want now. 
> I'm waiting 
> >to
> >commit changes until ivan gets his fixes in, but here is 
> what the code 
> >will sort of look lke (from teh bottom of the datastore module).
> >
> >What you'd do is define a handler class that answers 
> >GetDownloadFilename
> >with the pathname of the things you want to export. The URLs 
> to those 
> >things are generated by calling the GetDownloadDescriptor 
> method on the 
> >transfer server. You'll need to register a prefix for your 
> downloads like 
> >I do below.
> >
> >If you have CanUploadFile return 0 and GetUploadFilename returnm, 
> >upload
> >attempts will fail.
> >
> >--bob
> >
> >
> >     s = GSIHTTPTransferServer(('', 9011))
> >
> >     class Handler:
> >         def GetDownloadFilename(self, id_token, url_path):
> >             print "Get download: id='%s' path='%s'" % 
> (id_token, url_path)
> >             return r"c:\temp\junoSetup.exe"
> >
> >         def GetUploadFilename(self, id_token, file_info):
> >             print "Get upload filename for %s %s" % 
> (id_token, file_info)
> >             return os.path.join("c:\\", "temp", "uploads", 
> > file_info['name'])
> >
> >         def CanUploadFile(self, id_token, file_info):
> >             print "CanUpload: id=%s file_info=%s" % 
> (id_token, file_info)
> >             return 1
> >
> >         def AddPendingUpload(self, id_token, filename):
> >             print "AddPendingUpload: %s %s" % (id_token, filename)
> >
> >         def CompleteUpload(self, id_token, file_info):
> >             print "CompleteUpload %s %s" % (id_token, file_info)
> >
> >     prefix = "test"
> >     s.RegisterPrefix(prefix, Handler())
> >
> >     print s.GetDownloadDescriptor(prefix, "JunoSetup.exe")
> >     print s.GetUploadDescriptor(prefix)
> >
> >     s.run()
> >
> >     try:
> >         while 1:
> >             time.sleep(.1)
> >
> >     except:
> >         os._exit(0)
> 




More information about the ag-dev mailing list