You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Ryan Moquin <fr...@gmail.com> on 2007/12/16 06:11:23 UTC

Servicemix and streaming...

I'm not sure how valid of a question this is... but I was wondering about
streaming resources and SOAs, in particular servicemix.  Has anyone tried to
implement any sort of streaming content with servicemix?  I'm wondering
about the suitability of SOAs for that sort of task, or if that is something
that you wouldn't want to do, or really isn't applicable for whatever
reason.  Has anyone tried or has any thoughts one way or other on the
topic?  I didn't seem to find anything that addressed this when I search on
google, but I may not be searching correctly.

Thanks!

Re: Servicemix and streaming...

Posted by Ryan Moquin <fr...@gmail.com>.
I was really thinking multimedia content.  Not because I necessarily want to
do it or think it's a good idea, I'm just assessing capabilities as if
something like that is possible, or if servicemix was build to be able to
handle it.  I would guess not, but it's more of a curiosity as I plan our
new services for our application.

On Dec 18, 2007 3:44 PM, Gert Vanthienen <ge...@skynet.be> wrote:

> Ryan,
>
> What exactly do you mean with streaming content?  If you're looking for
> a way to stream multimedia content (like a shoutcast server would), an
> ESB is probably not your best choice.
>
> There are a few possibilities to use streaming content inside ServiceMix
> though.  Currently, the normalized message contains an XML body and
> (optionally) attachments.  The XML in the body can be represented by
> e.g. a StreamSource and in fact this happens in ServiceMix all the time
> (e.g. when servicemix-file reads a file, it will actually send out a
> StreamSource).  It allows us to transfer really large XML document
> without having to load them entirely into memory.  The drawback of this
> approach is that the stream can only be read once.
>
> As far as the attachments are concerned, these are transferred using the
> Java Activation Framework.  If you can create a DataSource
> implementation to hold the stream you want to transfer, you should be
> able to use streaming for attachments as well.  In fact, ServiceMix
> already has a StreamDataSource class that allows you to send an
> InputStream in the attachments.  If you want a code example for that,
> just take a look at the BinaryFileMarshaler class.
>
>
> Gert
>
> Ryan Moquin wrote:
> > I'm not sure how valid of a question this is... but I was wondering
> about
> > streaming resources and SOAs, in particular servicemix.  Has anyone
> tried to
> > implement any sort of streaming content with servicemix?  I'm wondering
> > about the suitability of SOAs for that sort of task, or if that is
> something
> > that you wouldn't want to do, or really isn't applicable for whatever
> > reason.  Has anyone tried or has any thoughts one way or other on the
> > topic?  I didn't seem to find anything that addressed this when I search
> on
> > google, but I may not be searching correctly.
> >
> > Thanks!
> >
> >
>
>

Re: Servicemix and streaming...

Posted by Gert Vanthienen <ge...@skynet.be>.
Ryan,

What exactly do you mean with streaming content?  If you're looking for 
a way to stream multimedia content (like a shoutcast server would), an 
ESB is probably not your best choice.

There are a few possibilities to use streaming content inside ServiceMix 
though.  Currently, the normalized message contains an XML body and 
(optionally) attachments.  The XML in the body can be represented by 
e.g. a StreamSource and in fact this happens in ServiceMix all the time 
(e.g. when servicemix-file reads a file, it will actually send out a 
StreamSource).  It allows us to transfer really large XML document 
without having to load them entirely into memory.  The drawback of this 
approach is that the stream can only be read once.

As far as the attachments are concerned, these are transferred using the 
Java Activation Framework.  If you can create a DataSource 
implementation to hold the stream you want to transfer, you should be 
able to use streaming for attachments as well.  In fact, ServiceMix 
already has a StreamDataSource class that allows you to send an 
InputStream in the attachments.  If you want a code example for that, 
just take a look at the BinaryFileMarshaler class.


Gert

Ryan Moquin wrote:
> I'm not sure how valid of a question this is... but I was wondering about
> streaming resources and SOAs, in particular servicemix.  Has anyone tried to
> implement any sort of streaming content with servicemix?  I'm wondering
> about the suitability of SOAs for that sort of task, or if that is something
> that you wouldn't want to do, or really isn't applicable for whatever
> reason.  Has anyone tried or has any thoughts one way or other on the
> topic?  I didn't seem to find anything that addressed this when I search on
> google, but I may not be searching correctly.
>
> Thanks!
>
>