×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Sep 2007
    Posts
    2

    Question Maximum HTTP connections that can be opened in parallel

    Hi

    Is there any limit for maximum number of http connections that can be opened in parallel? If exists, how can we find it?

    Considering a multi threaded implementation, each HTTP connection would be opened in a separate thread. how many of these can exist at a given moment of time?

    There is a limit for max streams that can be opened from connections, exceeding that would give a max connections opened error pop-up on device. But how can we find the max limit for opening http connections?

    -M

  2. #2
    Nokia Developer Champion
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Maximum HTTP connections that can be opened in parallel

    well to find the limit you could just make a midlet who simply tries to continuesly open connections on individual threads and see where it stops or is unable to...
    If I remember correctly the maximum number of open connections is device-dependant...
    Regardign threads : afaik there is no specific limit, it's obviously smart to keep the number of threads as low as possible, after all the more you have the more the cpu has to be shared, the more compelx the software becomes (and thus bug-prone)...

  3. #3
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Maximum HTTP connections that can be opened in parallel

    Quote Originally Posted by Tiger79 View Post
    If I remember correctly the maximum number of open connections is device-dependant...
    You remember correctly. On some devices, the maximum can be: two.

    Worth noting that, in many implementations, Connections are "open" until they (and all associated streams) are explicitly closed. They won't magically close themselves.

    I recommend you make no more than one call to openInputStream() (or openDataInputStream(), don't call both), and one to openOutputStream() (likewise openDataOutputStream()).

    Quote Originally Posted by Tiger79 View Post
    Regardign threads : afaik there is no specific limit
    Any device complying with JSR-185 or JSR-248 is required to support a minimum of ten threads, creatable by the developer.

    Quote Originally Posted by Tiger79 View Post
    it's obviously smart to keep the number of threads as low as possible, after all the more you have the more the cpu has to be shared, the more compelx the software becomes (and thus bug-prone)...
    I would regard this as extremely good advice.

    Graham.

  4. #4
    Nokia Developer Champion
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Maximum HTTP connections that can be opened in parallel

    aha ! look at that ! a minimum requirement, that's what I'd like to see more often
    Specifically without some kind of maximum :P
    Anyways thanks Graham for the more specific information, to be honest networking isn't my speciality (maybe cause I'm not very interested in it )...

  5. #5
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Maximum HTTP connections that can be opened in parallel

    An alternative to using multiple HTTP connections could be multiple sockets: f.ex. on Series 40 platform multiple sockets can transfer data at the same time (i.e. in parallel).

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

Similar Threads

  1. Replies: 1
    Last Post: 2002-12-27, 07:44
  2. Replies: 1
    Last Post: 2002-11-26, 11:59
  3. Replies: 1
    Last Post: 2002-11-22, 21:40
  4. Replies: 0
    Last Post: 2002-11-21, 14:56
  5. Nokia phones and HTTP connections - known constraints?
    By sandie_quinn in forum Mobile Java General
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •