Streaming data to the client whilst allowing the client to work

Discussion in 'ASP .Net' started by John, Aug 25, 2005.

  1. John

    John Guest

    Hi all,

    I have an (well, what I think to be, at least) interesting question:
    Is it possible to stream data down to the client and, after a certain amount
    of data has been streamed, allow the client to begin interacting with that
    data whilst still streaming data down?

    Also, if it is possible, how would one go about coding this? Would some sort
    of predfined bit of streaming be finished and notify the client (i.e. some
    form of Javascript call after each section of streaming has completed)

    Could someone please send me either some coding examples to begin with as a
    starter or, more importantly, a few links to sites that have successfully
    implemented this?

    Thanks a lot in advance

    Regards
    John.
     
    John, Aug 25, 2005
    #1
    1. Advertising

  2. John

    mathlec Guest

    Basicaly, streaming is not something we do in a web situation.
    The server provide static version of pages wich are then shown to the
    user by a browser..

    I often see the web like a printer. You can manipulate the source, but
    once it's printed.. it's over. If you want to move something, you have
    to redo the source.

    But if you're ready to read and do some research.. start by looking for
    XmlHTTP and how it's used.

    You may find this
    (http://support.microsoft.com/default.aspx?scid=kb;en-us;893659)
    article -pretty- interesting.
     
    mathlec, Aug 25, 2005
    #2
    1. Advertising

  3. John

    Lucas Tam Guest

    "John" <> wrote in news::

    > I have an (well, what I think to be, at least) interesting question:
    > Is it possible to stream data down to the client and, after a certain
    > amount of data has been streamed, allow the client to begin
    > interacting with that data whilst still streaming data down?


    Yes... it's called AJAX, Javascript Remoting, or Client Side Callbacks.

    : )

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
     
    Lucas Tam, Aug 25, 2005
    #3
  4. John

    John Guest

    Mathlec/Lucas Tam - thanks a lot!

    Let the reading begin...

    "John" <> wrote in message
    news:...
    > Hi all,
    >
    > I have an (well, what I think to be, at least) interesting question:
    > Is it possible to stream data down to the client and, after a certain
    > amount of data has been streamed, allow the client to begin interacting
    > with that data whilst still streaming data down?
    >
    > Also, if it is possible, how would one go about coding this? Would some
    > sort of predfined bit of streaming be finished and notify the client (i.e.
    > some form of Javascript call after each section of streaming has
    > completed)
    >
    > Could someone please send me either some coding examples to begin with as
    > a starter or, more importantly, a few links to sites that have
    > successfully implemented this?
    >
    > Thanks a lot in advance
    >
    > Regards
    > John.
    >
     
    John, Aug 25, 2005
    #4
  5. John

    John Rivers Guest

    oh yes

    you can bodge up callbacks

    by coding an img element to load a new image
    passing parameters in the url

    voila!

    two way communication!

    watch out if you are using single threaded session object though
    cos you won't get the requests

    it is the same technique spammers use to determine if your email
    is real

    <img src="http://spam.scum.com?email=" width="0"
    height="0"/>

    that is why preview pane in outlook is fraught with danger!
    as soon as the email is previewed they know a human looked at it


    John wrote:
    > Hi all,
    >
    > I have an (well, what I think to be, at least) interesting question:
    > Is it possible to stream data down to the client and, after a certain amount
    > of data has been streamed, allow the client to begin interacting with that
    > data whilst still streaming data down?
    >
    > Also, if it is possible, how would one go about coding this? Would some sort
    > of predfined bit of streaming be finished and notify the client (i.e. some
    > form of Javascript call after each section of streaming has completed)
    >
    > Could someone please send me either some coding examples to begin with as a
    > starter or, more importantly, a few links to sites that have successfully
    > implemented this?
    >
    > Thanks a lot in advance
    >
    > Regards
    > John.
     
    John Rivers, Aug 25, 2005
    #5
  6. John

    John Rivers Guest

    One simple technique I have used (first saw it in gifwizard.com in
    1994)
    is to output the html page to the browser

    then open a
    <script language="javascript">

    and now you can keep streaming javascript commands
    which can interact with dhtml dom and do anything

    gifwizard used it to update a statusbar

    <table id="statusBar" style="width:0px;" bgcolor="#ff0000">
    <tr>
    <td></td>
    </tr>
    <table>

    statusBar.style.width = 10; //or something
    statusBar.style.width = 20; //or something
    statusBar.style.width = 30; //or something
    etc.

    although i usually use functions with very small names
    like "s(1);" to keep the stream small

    as long as you don't response.end the client will
    keep an http connection open for a very long time
    indeed

    you can even clear the document and send
    a new page if you want ... it works fine

    obviously it might stress out the client
    if the stream becomes too big over time!

    hope that helps


    John wrote:
    > Hi all,
    >
    > I have an (well, what I think to be, at least) interesting question:
    > Is it possible to stream data down to the client and, after a certain amount
    > of data has been streamed, allow the client to begin interacting with that
    > data whilst still streaming data down?
    >
    > Also, if it is possible, how would one go about coding this? Would some sort
    > of predfined bit of streaming be finished and notify the client (i.e. some
    > form of Javascript call after each section of streaming has completed)
    >
    > Could someone please send me either some coding examples to begin with as a
    > starter or, more importantly, a few links to sites that have successfully
    > implemented this?
    >
    > Thanks a lot in advance
    >
    > Regards
    > John.
     
    John Rivers, Aug 25, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?R2FyeQ==?=
    Replies:
    2
    Views:
    474
    Wasi Rehman
    Oct 29, 2004
  2. =?Utf-8?B?UmFuZHkgR2FkaW5nYW4=?=

    "An error was encountered whilst attempting to start your session.

    =?Utf-8?B?UmFuZHkgR2FkaW5nYW4=?=, Jan 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    361
    =?Utf-8?B?UmFuZHkgR2FkaW5nYW4=?=
    May 10, 2005
  3. Alan Silver
    Replies:
    1
    Views:
    4,680
    Alan Silver
    Jul 6, 2005
  4. Richard
    Replies:
    5
    Views:
    413
    Hywel Jenkins
    Dec 28, 2004
  5. Sunfire
    Replies:
    7
    Views:
    470
    Sunfire
    Nov 10, 2007
Loading...

Share This Page