Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 47405 invoked from network); 18 Jun 2009 21:47:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jun 2009 21:47:52 -0000 Received: (qmail 13706 invoked by uid 500); 18 Jun 2009 21:48:03 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 13566 invoked by uid 500); 18 Jun 2009 21:48:02 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 13556 invoked by uid 99); 18 Jun 2009 21:48:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2009 21:48:02 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ralph.goers@dslextreme.com designates 209.85.210.202 as permitted sender) Received: from [209.85.210.202] (HELO mail-yx0-f202.google.com) (209.85.210.202) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2009 21:47:51 +0000 Received: by yxe40 with SMTP id 40so126396yxe.28 for ; Thu, 18 Jun 2009 14:46:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.227.5 with SMTP id z5mr1662910ang.175.1245361103190; Thu, 18 Jun 2009 14:38:23 -0700 (PDT) X-Originating-IP: [208.29.163.248] In-Reply-To: <18fbabce0906180918p5bf965cew5cc7828b8130f507@mail.gmail.com> References: <18fbabce0906041422l62e0ca18pd43da6207b8b468@mail.gmail.com> <26B596BA-2DED-4EE4-A775-28D531297B57@dslextreme.com> <18fbabce0906180918p5bf965cew5cc7828b8130f507@mail.gmail.com> Date: Thu, 18 Jun 2009 14:38:23 -0700 Message-ID: <2bacf5dd0906181438x41d67446j3e17ad3dbaa604b1@mail.gmail.com> Subject: Re: [vfs] MemcachedFilesCache for Google App Engine (object serialization) From: "ralph.goers @dslextreme.com" To: Commons Developers List Content-Type: multipart/alternative; boundary=0016369201f02c4397046ca63aaf X-Virus-Checked: Checked by ClamAV on apache.org --0016369201f02c4397046ca63aaf Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit No. The instructions are in https://svn.apache.org/repos/asf/commons/proper/vfs/trunk/xdocs/testing.xml. Ralph On Thu, Jun 18, 2009 at 9:18 AM, Vince Bonfanti wrote: > I'm finished with my changes to support serialization of AbstractFileName > and AbstractFileObject. The unit tests that are executed via "mvn test" are > all passing. I tried to do "mvn site:stage" as you suggest, but got > out-of-memory errors. Is this the documentation I need to follow to run the > external server tests? > > http://commons.apache.org/vfs/testserver.html > > Thanks. > On Thu, Jun 4, 2009 at 6:40 PM, Ralph Goers >wrote: > > > Wow. I'm interested to see if you can really get this to work. Just make > > sure that after you get the existing unit tests to pass that the > functional > > tests that require external servers also pass - if you do a mvn > site:stage > > you will see the documentation on how to do that. > > > > VFS-245 is opened against AbstractFileName and probably needs to be dealt > > with in the context of what you are doing. > > > > > > On Jun 4, 2009, at 2:22 PM, Vince Bonfanti wrote: > > > > I'm investigating creating a memcached-based FilesCache implementation > for > >> use with Google App Engine. The basic obstacle is that this requires > that > >> all objects that are used as keys or values must be serializable. Before > I > >> go too far down this path, I'd like to know if this is a reasonable > thing > >> to > >> do (or consider doing). Any thoughts or guidance would be greatly > >> appreciated. > >> > >> Background info: the Google App Engine (GAE) environment is inherently > >> distributed, where an unknown number of multiple instances of your > >> servlet-based web application will be running at the same time. The > GaeVFS > >> project (http://gaevfs.appspot.com) implements a VFS plugin on top of > the > >> GAE datastore; this is needed because the "real" filesystem within GAE > is > >> read-only, so GaeVFS provides a writeable filesystem for use by > >> applications. It seems that for proper operation of VFS, the FilesCache > >> implementation used by GaeVFS should (must?) also be inherently > >> distributed. > >> Fortunately, GAE supplies a memcached API that will be perfect for this > >> use > >> (if I can solve the serialization problem). > >> > >> Here's my first cut at what classes I'd need to make serializable and > some > >> notes on which fields might be marked transient: > >> > >> *AbstractFileName* > >> serialized fields: scheme (String), absPath (String), type (FileType) > >> transient fields: uri, baseName, rootUri, extension, decodedPath > >> > >> *FileType* > >> serialized fields: name (String), hasChildren (boolean), hasContent > >> (boolean), hasAttrs (boolean) > >> transient fields: none > >> > >> *AbstractFileObject* > >> serialized fields: name (AbstractFileName), content (DefaultFileContent) > >> transient fields: fs (AbstractFileSystem), operation (FileOperations), > >> attached (boolean), type (FileType), parent (FileObject), children > >> (FileName[]), objects (List) > >> > >> It's very important the the fs (AbstractFileSystem) field be transient > to > >> limit the number of other classes that need to be made serializable. It > >> looks like files are always retrieved from the files cache via the > >> AbstractFileSystem.getFileFromCache() method; if so then the "fs" field > of > >> AbstractFileObject can be restored within this method and doesn't need > to > >> be > >> serialized. We'll need to define a package-scope > >> AbstractFileObject.setFileSystem() method to support this. Or, this > could > >> be > >> done within the MemcachedFilesCache.getFile() method before returning > the > >> FileObject (but then we'd need a FileObject.setFileSystem method, or do > >> some > >> not-very-nice type casting). > >> > >> *DefaultFileContent > >> *serialized fields: file (AbstractFileObject), attrs (Map), roAttrs > (Map), > >> fileContentInfo (FileContentInfo), fileContentInfoFactory > >> (FileContentInfoFactory), openStreams (int) > >> transient fields: threadData (ThreadLocal) > >> question: what types do the "attrs" and "roAttrs" maps contain? are > these > >> serializable? > >> > > attrs and roAttrs contain attributes specific to the file system. For > > example, Webdav contains what you would get back from a PROPFIND method. > The > > Jar file system seems to return values found in the jar manifest., etc. > The > > values I found would all be Strings but I can't guarantee it. > > > >> > >> question: FileContentInfo and FileContentInforFactory are interfaces, > what > >> are the implementations of these? > >> > > DefaultFileContentInfo, FileContentInfoFileNameFactory, > > HttpFileContentInfoFactory, MimeFileContentInfoFactory and > > WebdavFileContentInfoFactory. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > > For additional commands, e-mail: dev-help@commons.apache.org > > > > > --0016369201f02c4397046ca63aaf--