Hello Julien,

On Tue, 04.10.2005 at 13:55:24 +0200, Julien Anguenot <[EMAIL PROTECTED]> wrote:
> Toni Mueller wrote:
> > I'd like to talk to (external or internal) SQL databases and access
> > files on the file system (reading and writing raw data with Python)
> > from within a custom product. Unfortunately, in all documentation I
> > found so far, this whole area is not described in too much detail.
> 
> It's really depending on the use case you're having :

I see - I was too imprecise. Let's try to clarify:

> 1. You want your attached files within CPS to be stored on the filesystem:
> For storing binaries (such files) on the filesystem you may use the
> "Disk File Field". Visit the portal_schemas/file/ and change the
> 'normal' "CPS File Field" (named `file`) as a 'CPS Disk File Field'. It
> will work transparently and stores binaries on the filesystem for the
> File content type. (note, you can do this for other types as well)

This sounds very interesting!

> 2. You want to have views on external filsystem folders :
> https://svn.nuxeo.org/trac/pub/browser/CPSLocalFS/trunk/

Well, this is another thing I'll probably come back to in a different
project. Having played around with Plone and plain Zope so far, I
already had these LocalFS-variants somewhat in focus, but also found
that these don't work well without additional help eg. by FAM.

> 3. You want to talk with an SQL database from CPS.

Yes, this is the main thing to do first. There are some SQL databases I
need to access, and which contain only simple data, but lots of items.

> You can use the standard Zope DAs corresponding to your database (check
> zope.org) And add ZSQL Method within the skins directories.

Well... now how do I ensure that the operation external database comes
out as a transaction in relation to non-cooperating foreign
applications which also access these databases?

> 4. You want to mirror data from your CPS to an external SQL database.

Partially - one other application is that I'll get mixed storage like
eg. in Plone, one other idea that crossed my mind was to try to port
Hornet to CPS, but I really don't know much about CPS right now.

> You can use the CPS event service and code a specific subscriber related
> to your application that listen to events and stores filtered
> information within the SQL database.

> 5 . You wanna change ZODB over SQL
> 
> Here, it's more tricky ;)

Not quite, but when trying to handle six-digit numbers of items
efficiently, ZODB might not always be the best choice.

> I suggest you to check what Florent wrote in his blog over there :
> http://blogs.nuxeo.com/sections/blogs/florent_guillaume/2005_08_11_object_relational

Thank you for this link!


Best,
--Toni++

_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users

Reply via email to