You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Vicary Archangel <de...@gmail.com> on 2010/11/19 03:43:11 UTC

Question about streaming ability

I am an ActionScript developer and was intensively work under AMF against
PHP and Java, but I have particularly interest in SSJS.

I am new to apache communities and the Sling project. While I can found no
where but this mail list to ask questions, I'd put it here.

The question is how does Sling handle streaming? And can it send binary data
directly with pure JavaScript but not template things?

In fact I'm seeking the possibility to implement an AMF-HTTP channel in the
future.

If I have gone wrong place, please direct me to where I can ask this
question. =]

Thanks a lot.

cheers,
Vic.

Re: Question about streaming ability

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Vic,

Am Freitag, den 19.11.2010, 10:43 +0800 schrieb Vicary Archangel: 
> I am an ActionScript developer and was intensively work under AMF against
> PHP and Java, but I have particularly interest in SSJS.
> 
> I am new to apache communities and the Sling project. While I can found no
> where but this mail list to ask questions, I'd put it here.

Welcome !

You have reached the right place to ask questions on using Sling.

> 
> The question is how does Sling handle streaming? And can it send binary data
> directly with pure JavaScript but not template things?

Do you want to know whether Sling is able to just provide raw files like
any regular Web Server like Apache httpd ?

Yes, Sling can do that. In fact we recently added support for the
If-Range and Range headers to the Sling get servlet helping with
streaming of Multi-media content.

> 
> In fact I'm seeking the possibility to implement an AMF-HTTP channel in the
> future.

Of course you can also implement a Servlet (or even a script in a
language like Groovy or JavaScript [I think this is your main interest,
right ?] or whatever comes with support for Java Scripting API) to
generate the content to send to the client, which may well be some AMF
serialization.

So, just come back when further questions arise -- and of course if you
want to contribute, you are welcome, too ;-)

Regards
Felix

> 
> If I have gone wrong place, please direct me to where I can ask this
> question. =]
> Thanks a lot.
> 
> cheers,
> Vic.



Re: Question about streaming ability

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Am Montag, den 22.11.2010, 10:54 +0800 schrieb Vicary Archangel: 
> On Sat, Nov 20, 2010 at 3:46 AM, Justin Edelson <ju...@gmail.com>wrote:
> 
> > On 11/19/10 1:43 PM, Vicary Archangel wrote:
> > > Hi Justin,
> > >
> > > On Sat, Nov 20, 2010 at 12:39 AM, Justin Edelson <
> > justinedelson@gmail.com>wrote:
> > >>
> > >> Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
> > >> seems much simpler than writing your own RTMP server.
> > >>
> > >> Justin
> > >
> > >
> > > Thanks for the advise.
> > >
> > > It seems just a bit outta my expectation and interest if I run those
> > > Java thing
> > > inside Sling. My original thought is making the whole thing from back to
> > > front
> > > with JavaScript. (Says MongoDB at the back, along with Flash / AJAX)
> >
> > Out of the box, Sling's scripting harness only get invoked as part of
> > HTTP request processing. You'll have to write some bridge code in Java
> > to do something else.
> >
> > As I said, I don't know why you would do this instead of just using
> > BlazeDS.
> >
> > Justin
> >
> > >
> > > When there is already open source products there in Java, I believe
> > porting
> > > the
> > > whole thing into OSGi bundles will be only a handful of tasks.
> > >
> > > All I need is to confirm the ability of Sling in handling most of the
> > common
> > > used
> > > LCDS functionalities, before I start anything.
> > >
> > > Vic
> > >
> >
> >
> Yeah, you're right. If this is only to achieve the functionality, I can use
> anything. I can even have some workarounds in my apps and stick to my
> existing PHP classes.
> 
> When there is so much frameworks and Java web servers out there, I feel the
> fun comes from the unity of scripting languages in both client and server
> sides.
> 
> My first thought when I saw Sling is that an OSGi launchpad that supports
> scripting in processing requests in all three languages (JSP, SSJS and
> Scala), and doing everything Java supports (through calling OSGi bundles
> from the scripts). But what I learned is just a small portion of process is
> "scriptable".

What do you mean by "a small portion" ? Point is, that almost complete
request processing is in fact scriptable. The only things not scriptable
is the work being done by Sling on behalf of the developer:

  * Find the data to work on by resolving the URL. We present this
     as an instance of the  Resource interface to the request
  * Find a script or Servlet to call to process the request

The Script or Servlet can be written in plain Java (mostly regular
servlets) or any scripting language providing support for JSR 223 (Java
Scripting API). You are most interested in JavaScript it seems, so you
get this out of the box with Sling by our use of the Rhino
implementation.

Of course this is somewhat different to traditional web applications,
where the URL generally is first resolved to a Servlet being called and
the servlet then has to access/find the data itself.

Regards
Felix

> 
> There's nothing wrong with Sling, the concept does wiki and content driven
> websites very well. Just I might have gone a wrong place I guess.
> 
> Thanks for all of you in this thread anyways, you guys are really helpful.
> 
> Vic.



Re: Question about streaming ability

Posted by Vicary Archangel <de...@gmail.com>.
On Sat, Nov 20, 2010 at 3:46 AM, Justin Edelson <ju...@gmail.com>wrote:

> On 11/19/10 1:43 PM, Vicary Archangel wrote:
> > Hi Justin,
> >
> > On Sat, Nov 20, 2010 at 12:39 AM, Justin Edelson <
> justinedelson@gmail.com>wrote:
> >>
> >> Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
> >> seems much simpler than writing your own RTMP server.
> >>
> >> Justin
> >
> >
> > Thanks for the advise.
> >
> > It seems just a bit outta my expectation and interest if I run those
> > Java thing
> > inside Sling. My original thought is making the whole thing from back to
> > front
> > with JavaScript. (Says MongoDB at the back, along with Flash / AJAX)
>
> Out of the box, Sling's scripting harness only get invoked as part of
> HTTP request processing. You'll have to write some bridge code in Java
> to do something else.
>
> As I said, I don't know why you would do this instead of just using
> BlazeDS.
>
> Justin
>
> >
> > When there is already open source products there in Java, I believe
> porting
> > the
> > whole thing into OSGi bundles will be only a handful of tasks.
> >
> > All I need is to confirm the ability of Sling in handling most of the
> common
> > used
> > LCDS functionalities, before I start anything.
> >
> > Vic
> >
>
>
Yeah, you're right. If this is only to achieve the functionality, I can use
anything. I can even have some workarounds in my apps and stick to my
existing PHP classes.

When there is so much frameworks and Java web servers out there, I feel the
fun comes from the unity of scripting languages in both client and server
sides.

My first thought when I saw Sling is that an OSGi launchpad that supports
scripting in processing requests in all three languages (JSP, SSJS and
Scala), and doing everything Java supports (through calling OSGi bundles
from the scripts). But what I learned is just a small portion of process is
"scriptable".

There's nothing wrong with Sling, the concept does wiki and content driven
websites very well. Just I might have gone a wrong place I guess.

Thanks for all of you in this thread anyways, you guys are really helpful.

Vic.

Re: Question about streaming ability

Posted by Justin Edelson <ju...@gmail.com>.
On 11/19/10 1:43 PM, Vicary Archangel wrote:
> Hi Justin,
> 
> On Sat, Nov 20, 2010 at 12:39 AM, Justin Edelson <ju...@gmail.com>wrote:
>>
>> Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
>> seems much simpler than writing your own RTMP server.
>>
>> Justin
> 
> 
> Thanks for the advise.
> 
> It seems just a bit outta my expectation and interest if I run those
> Java thing
> inside Sling. My original thought is making the whole thing from back to
> front
> with JavaScript. (Says MongoDB at the back, along with Flash / AJAX)

Out of the box, Sling's scripting harness only get invoked as part of
HTTP request processing. You'll have to write some bridge code in Java
to do something else.

As I said, I don't know why you would do this instead of just using BlazeDS.

Justin

> 
> When there is already open source products there in Java, I believe porting
> the
> whole thing into OSGi bundles will be only a handful of tasks.
> 
> All I need is to confirm the ability of Sling in handling most of the common
> used
> LCDS functionalities, before I start anything.
> 
> Vic
> 


Re: Question about streaming ability

Posted by Vicary Archangel <de...@gmail.com>.
Hi Justin,

On Sat, Nov 20, 2010 at 12:39 AM, Justin Edelson <ju...@gmail.com>wrote:
>
> Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
> seems much simpler than writing your own RTMP server.
>
> Justin


Thanks for the advise.

It seems just a bit outta my expectation and interest if I run those
Java thing
inside Sling. My original thought is making the whole thing from back to
front
with JavaScript. (Says MongoDB at the back, along with Flash / AJAX)

When there is already open source products there in Java, I believe porting
the
whole thing into OSGi bundles will be only a handful of tasks.

All I need is to confirm the ability of Sling in handling most of the common
used
LCDS functionalities, before I start anything.

Vic

Re: Question about streaming ability

Posted by Justin Edelson <ju...@gmail.com>.
Please reply on the correct thread. This has nothing to do with the AMF
discussion.

Thanks,
Justin

On 11/19/10 11:50 AM, Zhongmiao Li wrote:
> Hi Everyone,
> 
> now I'm using HttpClient to upload file, but still unsuccessful!  The
> error code is 415, unsupported media, but the file I want to update is
> just a JPG!
> Before that, I can use 
> http://admin:admin@141.83.80.149:8080/content/nemoclient?sling:authRequestLogin=1
> to upload files!
> So  can someone help me to fix this error? Thanks very much!
> 
> HttpClient httpClient=new HttpClient();
> httpClient.getParams().setAuthenticationPreemptive(true);
> Credentials defaultcreds = new UsernamePasswordCredentials("admin",
> "admin");
> httpClient.getState().setCredentials(new AuthScope("141.83.80.149",
> 8080, AuthScope.ANY_REALM),  defaultcreds);
> 
> PutMethod put = new PutMethod(transferURL);
> InputStream stream;
>  stream = new FileInputStream(localFile);
>  RequestEntity entity = new InputStreamRequestEntity(stream);
>  put.setRequestEntity(entity);  
>  put.setDoAuthentication(true);
>  HttpClientParams params=new HttpClientParams();
> 
>   params.setIntParameter("sling:authRequestLogin", 1);
>  httpClient.setParams(params);
>   httpClient.executeMethod(put);
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Fri, Nov 19, 2010 at 8:39 AM, Justin Edelson <justinedelson@gmail.com
> <ma...@gmail.com>> wrote:
> 
>     On 11/19/10 10:21 AM, Vicary Archangel wrote:
>     > Hi Bertrand,
>     >
>     > The output of AMF requests is actually bitwise formatted
>     variables, seems
>     > somewhat like a pattern of data type, some delimiters and the variable
>     > contents.
>     >
>     > Basically AMF RPCs does not require channels other than HTTP, even
>     with data
>     > returns after a function call. Tho whole serialization/deserialization
>     > process only touches raw POST data and the http output stream, in byte
>     > level. I believe if PHP can handle this, Sling should be able to
>     do it even
>     > better as long as it is based on Java.
>     >
>     > What I seek more than AMFPHP is RTMP streams, which allows the
>     client to do
>     > true video streaming, in contrast to the PHP's pseudo streaming.
>     >
>     > RTMP streams, which must then implemented with TCP connections,
>     also enables
>     > some Flash things called Remote Shared Object, this involved in
>     > communication between http request threads with some sort of
>     synchronized
>     > data (either in memory or file system).
>     >
>     > There is two major open source AMF server that already implemented
>     RTMP
>     > streaming, written in Java.
>     > Red5 Server: http://osflash.org/red5
>     > BlazeDS: http://opensource.adobe.com/wiki/display/blazeds/BlazeDS
> 
>     Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
>     seems much simpler than writing your own RTMP server.
> 
>     Justin
> 
> 
>     >
>     > You can read the spec of RTMP alone here at
>     > http://www.adobe.com/devnet/rtmp.html.
>     >
>     > Hope I make it clear enough. =]
>     >
>     > Vic
>     >
>     > On Fri, Nov 19, 2010 at 5:29 PM, Bertrand Delacretaz
>     <bdelacretaz@apache.org <ma...@apache.org>
>     >> wrote:
>     >
>     >> Hi Vic,
>     >>
>     >> On Fri, Nov 19, 2010 at 3:43 AM, Vicary Archangel
>     <denvil@gmail.com <ma...@gmail.com>>
>     >> wrote:
>     >>> ...The question is how does Sling handle streaming? And can it send
>     >> binary data
>     >>> directly with pure JavaScript but not template things?...
>     >>
>     >> As Felix said, yes, using the HTTP request/response model.
>     >>
>     >>> In fact I'm seeking the possibility to implement an AMF-HTTP
>     channel in
>     >> the
>     >>> future.
>     >>
>     >> Where can we find a quick description of AMF-HTTP?
>     >>
>     >> I looked at http://en.wikipedia.org/wiki/Action_Message_Format and
>     >> that seems to imply that the client switches to something else than
>     >> HTTP after the initial request to the gateway URL. That would be
>     >> possible with Sling, but not out of the box.
>     >>
>     >> -Bertrand
>     >>
>     >
> 
> 
> 
> 
> -- 
> Best regards
> Li Zhongmiao
> Digital Media, College of Computer Science, Zhejiang University
> 


Re: Question about streaming ability

Posted by Zhongmiao Li <ma...@gmail.com>.
Hi Everyone,

now I'm using HttpClient to upload file, but still unsuccessful!  The error
code is 415, unsupported media, but the file I want to update is just a JPG!
Before that, I can use
http://admin:admin@141.83.80.149:8080/content/nemoclient?sling:authRequestLogin=1
to upload files!
So  can someone help me to fix this error? Thanks very much!

HttpClient httpClient=new HttpClient();
httpClient.getParams().setAuthenticationPreemptive(true);
Credentials defaultcreds = new UsernamePasswordCredentials("admin",
"admin");
httpClient.getState().setCredentials(new AuthScope("141.83.80.149", 8080,
AuthScope.ANY_REALM),  defaultcreds);

PutMethod put = new PutMethod(transferURL);
InputStream stream;
 stream = new FileInputStream(localFile);
 RequestEntity entity = new InputStreamRequestEntity(stream);
 put.setRequestEntity(entity);
 put.setDoAuthentication(true);
 HttpClientParams params=new HttpClientParams();

  params.setIntParameter("sling:authRequestLogin", 1);
 httpClient.setParams(params);
  httpClient.executeMethod(put);











On Fri, Nov 19, 2010 at 8:39 AM, Justin Edelson <ju...@gmail.com>wrote:

> On 11/19/10 10:21 AM, Vicary Archangel wrote:
> > Hi Bertrand,
> >
> > The output of AMF requests is actually bitwise formatted variables, seems
> > somewhat like a pattern of data type, some delimiters and the variable
> > contents.
> >
> > Basically AMF RPCs does not require channels other than HTTP, even with
> data
> > returns after a function call. Tho whole serialization/deserialization
> > process only touches raw POST data and the http output stream, in byte
> > level. I believe if PHP can handle this, Sling should be able to do it
> even
> > better as long as it is based on Java.
> >
> > What I seek more than AMFPHP is RTMP streams, which allows the client to
> do
> > true video streaming, in contrast to the PHP's pseudo streaming.
> >
> > RTMP streams, which must then implemented with TCP connections, also
> enables
> > some Flash things called Remote Shared Object, this involved in
> > communication between http request threads with some sort of synchronized
> > data (either in memory or file system).
> >
> > There is two major open source AMF server that already implemented RTMP
> > streaming, written in Java.
> > Red5 Server: http://osflash.org/red5
> > BlazeDS: http://opensource.adobe.com/wiki/display/blazeds/BlazeDS
>
> Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
> seems much simpler than writing your own RTMP server.
>
> Justin
>
>
> >
> > You can read the spec of RTMP alone here at
> > http://www.adobe.com/devnet/rtmp.html.
> >
> > Hope I make it clear enough. =]
> >
> > Vic
> >
> > On Fri, Nov 19, 2010 at 5:29 PM, Bertrand Delacretaz <
> bdelacretaz@apache.org
> >> wrote:
> >
> >> Hi Vic,
> >>
> >> On Fri, Nov 19, 2010 at 3:43 AM, Vicary Archangel <de...@gmail.com>
> >> wrote:
> >>> ...The question is how does Sling handle streaming? And can it send
> >> binary data
> >>> directly with pure JavaScript but not template things?...
> >>
> >> As Felix said, yes, using the HTTP request/response model.
> >>
> >>> In fact I'm seeking the possibility to implement an AMF-HTTP channel in
> >> the
> >>> future.
> >>
> >> Where can we find a quick description of AMF-HTTP?
> >>
> >> I looked at http://en.wikipedia.org/wiki/Action_Message_Format and
> >> that seems to imply that the client switches to something else than
> >> HTTP after the initial request to the gateway URL. That would be
> >> possible with Sling, but not out of the box.
> >>
> >> -Bertrand
> >>
> >
>
>


-- 
Best regards
Li Zhongmiao
Digital Media, College of Computer Science, Zhejiang University

Re: Question about streaming ability

Posted by Justin Edelson <ju...@gmail.com>.
On 11/19/10 10:21 AM, Vicary Archangel wrote:
> Hi Bertrand,
> 
> The output of AMF requests is actually bitwise formatted variables, seems
> somewhat like a pattern of data type, some delimiters and the variable
> contents.
> 
> Basically AMF RPCs does not require channels other than HTTP, even with data
> returns after a function call. Tho whole serialization/deserialization
> process only touches raw POST data and the http output stream, in byte
> level. I believe if PHP can handle this, Sling should be able to do it even
> better as long as it is based on Java.
> 
> What I seek more than AMFPHP is RTMP streams, which allows the client to do
> true video streaming, in contrast to the PHP's pseudo streaming.
> 
> RTMP streams, which must then implemented with TCP connections, also enables
> some Flash things called Remote Shared Object, this involved in
> communication between http request threads with some sort of synchronized
> data (either in memory or file system).
> 
> There is two major open source AMF server that already implemented RTMP
> streaming, written in Java.
> Red5 Server: http://osflash.org/red5
> BlazeDS: http://opensource.adobe.com/wiki/display/blazeds/BlazeDS

Have you looked at just running BlazeDS or LCDS inside Felix/Sling? That
seems much simpler than writing your own RTMP server.

Justin


> 
> You can read the spec of RTMP alone here at
> http://www.adobe.com/devnet/rtmp.html.
> 
> Hope I make it clear enough. =]
> 
> Vic
> 
> On Fri, Nov 19, 2010 at 5:29 PM, Bertrand Delacretaz <bdelacretaz@apache.org
>> wrote:
> 
>> Hi Vic,
>>
>> On Fri, Nov 19, 2010 at 3:43 AM, Vicary Archangel <de...@gmail.com>
>> wrote:
>>> ...The question is how does Sling handle streaming? And can it send
>> binary data
>>> directly with pure JavaScript but not template things?...
>>
>> As Felix said, yes, using the HTTP request/response model.
>>
>>> In fact I'm seeking the possibility to implement an AMF-HTTP channel in
>> the
>>> future.
>>
>> Where can we find a quick description of AMF-HTTP?
>>
>> I looked at http://en.wikipedia.org/wiki/Action_Message_Format and
>> that seems to imply that the client switches to something else than
>> HTTP after the initial request to the gateway URL. That would be
>> possible with Sling, but not out of the box.
>>
>> -Bertrand
>>
> 


Re: Question about streaming ability

Posted by Vicary Archangel <de...@gmail.com>.
Hi Bertrand,

Thanks for the info.

As I have gone through many tutorials and documentations around the Sling
website, there is only a few pages showing the SSJS part.

Then I came up with a simple question, can I even make
classes and functions
out of SSJS?

Vic

On Fri, Nov 19, 2010 at 11:37 PM, Bertrand Delacretaz <
bdelacretaz@apache.org> wrote:

> Hi Vic,
>
> On Fri, Nov 19, 2010 at 4:21 PM, Vicary Archangel <de...@gmail.com>
> wrote:
> > ...The output of AMF requests is actually bitwise formatted variables,
> seems
> > somewhat like a pattern of data type, some delimiters and the variable
> > contents....
>
> Ok, not a problem in Sling.
>
> >
> > ...Basically AMF RPCs does not require channels other than HTTP, even
> with data
> > returns after a function call. Tho whole serialization/deserialization
> > process only touches raw POST data and the http output stream, in byte
> > level. I believe if PHP can handle this, Sling should be able to do it
> even
> > better as long as it is based on Java....
>
> Ok, not sure what you mean with "returns after function call", but
> it's easy in Sling to integrate a servlet that returns anything in
> response to a specific HTTP request - you can have complete control of
> what's written to the servlet output.
>
> >
> > What I seek more than AMFPHP is RTMP streams, which allows the client to
> do
> > true video streaming, in contrast to the PHP's pseudo streaming.
> >
> > RTMP streams, which must then implemented with TCP connections, also
> enables
> > some Flash things called Remote Shared Object, this involved in
> > communication between http request threads with some sort of synchronized
> > data (either in memory or file system)....
>
> Ok, so if you need TCP connections outside of the java servlet model
> you'll need to implement some server-side components that manage
> sockets as needed and implement the protocol.
>
> Sling doesn't put any limitations on this, you can create an OSGi
> service that implements any suitable protocol.
>
> Hope this helps!
>
> -Bertrand
>

Re: Question about streaming ability

Posted by Ian Boston <ie...@tfd.co.uk>.
On 19 Nov 2010, at 15:37, Bertrand Delacretaz wrote:

> Ok, so if you need TCP connections outside of the java servlet model
> you'll need to implement some server-side components that manage
> sockets as needed and implement the protocol.
> 
> Sling doesn't put any limitations on this, you can create an OSGi
> service that implements any suitable protocol.


eg a smtp bundle [1] see the activate(...) method.

HTH
Ian


1 https://github.com/sakaiproject/nakamura/blob/master/bundles/smtp/src/main/java/org/sakaiproject/nakamura/smtp/SakaiSmtpServer.java

Re: Question about streaming ability

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Vic,

On Fri, Nov 19, 2010 at 4:21 PM, Vicary Archangel <de...@gmail.com> wrote:
> ...The output of AMF requests is actually bitwise formatted variables, seems
> somewhat like a pattern of data type, some delimiters and the variable
> contents....

Ok, not a problem in Sling.

>
> ...Basically AMF RPCs does not require channels other than HTTP, even with data
> returns after a function call. Tho whole serialization/deserialization
> process only touches raw POST data and the http output stream, in byte
> level. I believe if PHP can handle this, Sling should be able to do it even
> better as long as it is based on Java....

Ok, not sure what you mean with "returns after function call", but
it's easy in Sling to integrate a servlet that returns anything in
response to a specific HTTP request - you can have complete control of
what's written to the servlet output.

>
> What I seek more than AMFPHP is RTMP streams, which allows the client to do
> true video streaming, in contrast to the PHP's pseudo streaming.
>
> RTMP streams, which must then implemented with TCP connections, also enables
> some Flash things called Remote Shared Object, this involved in
> communication between http request threads with some sort of synchronized
> data (either in memory or file system)....

Ok, so if you need TCP connections outside of the java servlet model
you'll need to implement some server-side components that manage
sockets as needed and implement the protocol.

Sling doesn't put any limitations on this, you can create an OSGi
service that implements any suitable protocol.

Hope this helps!

-Bertrand

Re: Question about streaming ability

Posted by Vicary Archangel <de...@gmail.com>.
Hi Bertrand,

The output of AMF requests is actually bitwise formatted variables, seems
somewhat like a pattern of data type, some delimiters and the variable
contents.

Basically AMF RPCs does not require channels other than HTTP, even with data
returns after a function call. Tho whole serialization/deserialization
process only touches raw POST data and the http output stream, in byte
level. I believe if PHP can handle this, Sling should be able to do it even
better as long as it is based on Java.

What I seek more than AMFPHP is RTMP streams, which allows the client to do
true video streaming, in contrast to the PHP's pseudo streaming.

RTMP streams, which must then implemented with TCP connections, also enables
some Flash things called Remote Shared Object, this involved in
communication between http request threads with some sort of synchronized
data (either in memory or file system).

There is two major open source AMF server that already implemented RTMP
streaming, written in Java.
Red5 Server: http://osflash.org/red5
BlazeDS: http://opensource.adobe.com/wiki/display/blazeds/BlazeDS

You can read the spec of RTMP alone here at
http://www.adobe.com/devnet/rtmp.html.

Hope I make it clear enough. =]

Vic

On Fri, Nov 19, 2010 at 5:29 PM, Bertrand Delacretaz <bdelacretaz@apache.org
> wrote:

> Hi Vic,
>
> On Fri, Nov 19, 2010 at 3:43 AM, Vicary Archangel <de...@gmail.com>
> wrote:
> > ...The question is how does Sling handle streaming? And can it send
> binary data
> > directly with pure JavaScript but not template things?...
>
> As Felix said, yes, using the HTTP request/response model.
>
> > In fact I'm seeking the possibility to implement an AMF-HTTP channel in
> the
> > future.
>
> Where can we find a quick description of AMF-HTTP?
>
> I looked at http://en.wikipedia.org/wiki/Action_Message_Format and
> that seems to imply that the client switches to something else than
> HTTP after the initial request to the gateway URL. That would be
> possible with Sling, but not out of the box.
>
> -Bertrand
>

Re: Question about streaming ability

Posted by Zhongmiao Li <ma...@gmail.com>.
Thanks very much!  But most of the examples as well as the one you
provide are not based on HttpClient. So which version do you used as
the basic lib?
In HttpClient 4.1,  HttpClient is already an interface, so it's
impossible to use
HttpClient client= new HttpClient().
So I tried to use HttpClient 3.1, but then when running the program to
PostMethod  post = new PostMethod().... There is an error NoClassDefFoundError.

So how should I configure the project??  Thanks very much!!!

On 11/19/10, Bertrand Delacretaz <bd...@apache.org> wrote:
> Hi Vic,
>
> On Fri, Nov 19, 2010 at 3:43 AM, Vicary Archangel <de...@gmail.com> wrote:
>> ...The question is how does Sling handle streaming? And can it send binary
>> data
>> directly with pure JavaScript but not template things?...
>
> As Felix said, yes, using the HTTP request/response model.
>
>> In fact I'm seeking the possibility to implement an AMF-HTTP channel in
>> the
>> future.
>
> Where can we find a quick description of AMF-HTTP?
>
> I looked at http://en.wikipedia.org/wiki/Action_Message_Format and
> that seems to imply that the client switches to something else than
> HTTP after the initial request to the gateway URL. That would be
> possible with Sling, but not out of the box.
>
> -Bertrand
>


-- 
Best regards
Li Zhongmiao
Digital Media, College of Computer Science, Zhejiang University

Re: Question about streaming ability

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Vic,

On Fri, Nov 19, 2010 at 3:43 AM, Vicary Archangel <de...@gmail.com> wrote:
> ...The question is how does Sling handle streaming? And can it send binary data
> directly with pure JavaScript but not template things?...

As Felix said, yes, using the HTTP request/response model.

> In fact I'm seeking the possibility to implement an AMF-HTTP channel in the
> future.

Where can we find a quick description of AMF-HTTP?

I looked at http://en.wikipedia.org/wiki/Action_Message_Format and
that seems to imply that the client switches to something else than
HTTP after the initial request to the gateway URL. That would be
possible with Sling, but not out of the box.

-Bertrand