Servoy Data Stream Plugin

Questions and answers on developing, deploying and using plugins and JavaBeans

Servoy Data Stream Plugin

Postby cybersack » Sat Feb 19, 2005 8:41 am

Hi all :)

A few weeks back I wrote a media-playback plugin.
Whilst I have not yet had time to complete the Capture integration into Servoy, I have had time to optimize the way data is loaded into and out-of the SQL database which sits behind Servoy.

The functions I have created allow the user to stream binaries into & out of the database via the Servoy script API by way of a new plugin which has support basically for:

READ from Servoy : plugin.streamFieldTo[File/Url]()
and
WRITE to Servoy : plugin.stream[File/Url]ToField()

Why do this ?
Two key reasons:
1. avoiding out-of-memory errors : small buffers used for streams
2. UI responsiveness : the UI continues to work for the User whilst a potentially long IO event takes place (particularly one that might time out)

If anyone is interested in using the plugin, please reply to this posting.

ps : these streaming functions will be fitted onto the Media Manager plugin to optimize its performance, and the Capture support for Servoy is about 2 weeks away.

cheers
julian
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby Jan Blok » Sat Feb 19, 2005 8:26 pm

Well that fairly easy to do, make a server/client combo plugin like the open source mail plugin (java files are in the jar) and in the server plugin get a server java.sql.connection en recieve streaming data from the client plugin via RMI and apply to the connection
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby cybersack » Sat Feb 19, 2005 10:48 pm

Thanks Jan.

That will fit in nicely with the ConnectionProvider interface I pass thru the delegate classes that perform the streaming.

I assume you expose the entire jdbc 2 api on the connection.

I'll take a look at the source you suggest.
I guess it means also that I need to care about RemoteException and that might change an interface i have...but worse things have happened ;)

ciao
Julian
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby Jan Blok » Sun Feb 20, 2005 12:50 am

Servoy works on Jdbc 1 and onwards and we have no dependency on jdbc 2, so we dont require this from the database drivers.
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby cybersack » Mon Feb 21, 2005 11:04 pm

Hi Jan.

In your reply you stated
<quote>
in the server plugin get a server java.sql.connection
</quote>

What technique should I use in that environment ?
Should I simply: ?
try
{
connection =
DriverManager.getConnection(
jdcUrl,
login.getUsername(),
login.getPassword());
}
catch(){}
finally(){}


or.....is there a server-side Servoy connection-manager that I should use ?

thanks in advance
julian
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby Jan Blok » Mon Feb 21, 2005 11:08 pm

see http://developer.servoy.com/docs/plugin-api/ the com.servoy.j2db.plugins.IServerAccess
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Postby cybersack » Wed Mar 02, 2005 8:32 am

Hi there.

If you are interested in using this plugin, please send me an email to:
julian@practica.com.au
That way I can create a licence for you.

I will release a package which bundles together the DataStream and MediaManager plugins.

They are bundled, but decoupled.

You do not need to use the MediaManager playback/import screens unless you want to. One form is devoted to the DataStream plugin and one form is devoted to the MediaManager plugin.

The purpose of the sample file is to illustrate how data streams can be utilized in a concurrent or in a blocking fashion.
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby faheemhameed » Thu Mar 03, 2005 11:07 am

Is this plugin helps to play the audio / video file within servoy? If so will that be streaming instead of loding the whole file and start playing?

When can we have a demo version?

My email is hameed@pilot.com.hk

Thanks
Hameed
Pilot simple software
Hong Kong
User avatar
faheemhameed
 
Posts: 763
Joined: Wed Sep 10, 2003 7:23 am

Postby cybersack » Thu Mar 03, 2005 12:31 pm

Yes, A/V playback occurs with the Media Manager plugin.
The Media Manager plugin uses the functions of the Data Stream plugin.

The data is streamed to the player from the database (by using a connection supplied by the Servoy server).

Also, when you save media, it is streamed into the database using a jdbc connection in a similar way (from the file or url you specify).

I am right now packaging the release.
It will be available by the weekend.

julian
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby cybersack » Sun Mar 06, 2005 11:07 am

Hi all.

I have released a bundle of the DataStream and MediaManager plugins.

You can download it from : http://www.practica.com.au/cybersack/me ... 1.0rc1.zip

If you don't yet have a licence, then email me to obtain one.

cheers
Julian
julian@practica.com.au
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby cybersack » Mon Mar 07, 2005 4:44 am

The rc1 zip file I just published has a few items missing :(
I will re-deploy (to an rc2) this evening and the release notes will include an instruction also to remove any existing "cybersack.jar".

Sorry......it was late and I was sleepy.

I'll get it done as soon as I'm home from work today (remember I'm on Australian time, so 09:00 EU time is ~ 19:00 here.

thanks
Julian
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby cybersack » Mon Mar 07, 2005 11:38 am

Hi all. Sorry about the false start !

The missing files have been included and a new release has been cut.

In addition, new licences have been generated (and emailed to you if you are on my list).

You can download the plugins and demo applications from : http://www.practica.com.au/cybersack/me ... 1.0rc2.zip

If you don't yet have a licence, then email me to obtain one.

cheers
Julian
julian@practica.com.au
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

media manager benefits?

Postby megaquests » Mon Mar 07, 2005 12:45 pm

many thanks SalernoJ

is there a solution/website or anything with a real simple example/demo of what is possible with this plugin..

what are the benefits of using it?

thanks
megaquests
 
Posts: 91
Joined: Mon Mar 01, 2004 1:09 pm
Location: Brighton, UK

Postby cybersack » Mon Mar 07, 2005 1:02 pm

The DataStream plugin represents a technology solution for better performance and greater application robustness.

The MediaManager plugin represents a small application framework for managing AV media utilizing the DataStream technology.

Once you install the plugin and import the solution, there are 2 forms.

The form "streams" is dedicated to the use of streaming data in/out of the database - a technique which is quite different to assignment of media columns (made possible, for example, in the servoy method editor).
eg. mediaColumn=_some_value_ (a byte array)

Streaming minimizes memory usage and allows the user to continue work with the UI whilst the long-running I/O tasks complete (if the task is run asynchronously). Streaming data from point-to-point rarely leads to non-recoverable errors which may arise from OutOfMemory conditions.

The form "media" is devoted to the playback (and soon, capture) of movies.
It utilizes the DataStream plugin to move the data around.
The UI's are intended to provide a convenient playback and management UI for your own media databases.

I hope this answers your question.

julian
User avatar
cybersack
 
Posts: 302
Joined: Sun Jan 02, 2005 1:17 am

Postby Jan Blok » Tue Mar 08, 2005 4:18 pm

Additional comment:
Servoy loads blobs/media from the db in memory in the servers sent it as one object to the client, works fine for several MB's.
When streaming you can handle gigabytes of blob data ,without using memory at all, it gets streamed like a tv channel.

Great addition to have for large media users!
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam

Next

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 29 guests