storing video/audio in a database

Ruslan Zasukhin sunshine at public.kherson.ua
Sat Jul 8 08:12:56 CDT 2006


On 7/8/06 6:40 AM, "Jared Smith" <smith.sgt at gmail.com> wrote:

Hi Jared,

> Wow, thank you both for the quick reply! If I hadn't gone out for a
> couple hours I would've replied sooner.
> 
> Sean: Interesting, I'm a newbie so I wasn't aware of BLOB fields. If
> they hold video/audio than they're what I'm looking for. A quick
> Google reveals that they also hold pictures, RTF files, etc, so they
> seem to be pretty flexible...

BLOB can store ANY binary data.
In Valentina you can even set Compression for a BLOB field.

> Ruslan: No, not Director. I'm actually a new Revolution developer, and

I see. Note that Revolution is text-oriented IDE.
It have not very good work with Binary data as far as I have see.

> I'd like to make an app that stores media content locally and syncs it
> to a server so that the user can access his stuff from anywhere as
> long as the app is downloaded (I also want to do streaming but forget
> that for now). I figure this will mean putting an embedded Valentina
> database in the app and Valentina Server on the server to store the
> content online, and then having some mechanism to sync them.

It seems that synch task should become soon high priority.
More and more developers talk about it.
Ivan, we need start think about this task soon...
 
> I wasn't aware that putting videos/audio in databases is a bad idea.

Well, not so strong...just for Director developers, which usually prepare
CD/DVD simply there is no any major advantage to put into db such data.

> Is it a speed issue?

Up to now, video-audio have consider ONLY Director developers.

> I guess I could stream it to a folder on the
> user's harddrive, but I don't know how I'd sync it to the server then.

> Also, I was hoping to make the app self-contained, having its own
> storage structure separate from the rest of the computer.

Okay, Valentina have for this many features. One of them which perfectly
will work even in Revolution is

    VBLOB.ToFile( path )
    VBLOB.FromFile( path )

Note, that in new Vserver 2.4 we have these methods working in client/server
also. Client point some file on his HDD and this file go to remote server.
And can be reverse operation.

--------
NOTE: We have currently small limit...in Valentina 1.x BLOBs did allow store
files bigger of RAM thanks to parameter OFFSET. You could read/write BLOB
data by parts. 

Developing Valentina 2.0 we have not implement this, and it seems nobody
complains...Today RAM is huge on computers, and unlikely some body  will
want store into DB file of 2Gb size ... Db of size 2Gb itself is considered
big even today by many developers.


Streaming ... May be this OFFSET feature could be useful,
    but again, what size of your movies you expect ?
    if it is 1-10-30 MB you can use ToFile() method to extract some
    movie from DB to TMP location on disk, then stream it.


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list