Results 1 to 10 of 10

Thread: Java Web server / HTTP proto question

  1. #1
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts

    Java Web server / HTTP proto question

    Hello,

    I have written a web server in java which is running as a stand alone app (not plugged in to tomcat)

    When the server is running the network stops responding for shared files on the host computer, i recieve the following header info on the server intermitently

    OPTIONS / HTTP/1.1
    translate: f
    User-Agent: Microsoft-WebDAV-MiniRedir/5.1.2600
    Host: ironchickenpi
    Content-Length: 0
    Connection: Keep-Alive

    i am assuming this has something to do with windows' routing / fileshareing

    1. would this be the cause of my network problems
    2. would it fix it if i forwarded them to the destination
    3. how do i do that

    cheers

  2. #2
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    you could be locking out your network card using exclusive calls.

    Make sure the app you have written binds it to a port/socket on the card not just "the card"
    It is Inevitable.....


  3. #3
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    Thanks for the reply ikonia, this could indeed be the case as i am using my own port pooling for incoming connections, i will research it a bit more and find out exactly how java maintains its control over connections, ta.

  4. #4
    Goat Boy
    Join Date
    Jul 2003
    Location
    Alexandra Park, London
    Posts
    2,428
    Thanks
    0
    Thanked
    0 times in 0 posts
    Could be that the JVM is looking for an exclusive lock on the file while windows is attempting to access the file?

    Sounds like an interesting project. How much code has it taken you to get a web server built?
    "All our beliefs are being challenged now, and rightfully so, they're stupid." - Bill Hicks

  5. #5
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts
    interesting yet a strange project a Java webserver seems an paradox in its self
    It is Inevitable.....


  6. #6
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    we are writing a multiplayer game for mobile phones - the server portion of it deals with requests from the client using the HTTP protocol. The mobile network gateways use the http 1.1 standards aggressivly so we force feed them headers to passify them. The actual game data is sent in the content chunk of the request/response data using application/octet-stream as content type.

    We are using java for three reasons 1 development time is far quicker for a webserver because all the protocol crap is there built in. 2 the client is in j2me (java for mobiles) again increasing the speed of development on the server because java has connection streams which directly link to each other, so the 'building' of requests/responses is far simpler. 3 im sure there was another ... something to do with the database connectivity being easier... oh yes clearly as it is a game server its main purpose in life is not web serving it is processing, threading, database access, game ticks, etc. all of which is quicker in java (to develop) and probably more reliable than something we could write in another language, maybe not c#, but that is java isnt it?

    i cant really tell you how long the web server connection bitty is because it is integrated with a heap load of game crap, also im not the one actually writing it. and the guy who is isnt here now, although just to set up a webserver capable of simple http responses to simple requests your looking at about 300 lines. for a multi threaded version that could handle similtanous requests probably about 500.

    however take that with a pinch of salt as we have written a server that blocks windows from working properly
    Last edited by Purple; 01-09-2004 at 12:40 PM.

  7. #7
    ?!
    Join Date
    Sep 2004
    Posts
    1,045
    Thanks
    2
    Thanked
    6 times in 5 posts
    Quote Originally Posted by Purple
    Hello,

    I have written a web server in java which is running as a stand alone app (not plugged in to tomcat)

    When the server is running the network stops responding for shared files on the host computer, i recieve the following header info on the server intermitently

    OPTIONS / HTTP/1.1
    translate: f
    User-Agent: Microsoft-WebDAV-MiniRedir/5.1.2600
    Host: ironchickenpi
    Content-Length: 0
    Connection: Keep-Alive

    i am assuming this has something to do with windows' routing / fileshareing

    1. would this be the cause of my network problems
    2. would it fix it if i forwarded them to the destination
    3. how do i do that

    cheers
    I'd call that a good firewall too

  8. #8
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS
    Quote Originally Posted by ikonia
    interesting yet a strange project a Java webserver seems an paradox in its self
    java has no use in applets, its popularity lies in large enterprise applications.

    i wrote a fully functional (i could interface to it with OE) POP3 server with java as a simple task on my degree, though it wasn't very scalable.

  9. #9
    IRN-BRU(tm)
    Join Date
    Aug 2004
    Location
    Milton Keynes
    Posts
    484
    Thanks
    8
    Thanked
    9 times in 7 posts
    definatly, as long as you have large processing power, which all PCs as well as servers have these days java is great. C programs take ages to develop, debug and port to platforms. java is the way to go for large enterprise applications. Although some of the Sun coding is not brilliant.

  10. #10
    ?!
    Join Date
    Sep 2004
    Posts
    1,045
    Thanks
    2
    Thanked
    6 times in 5 posts
    Quote Originally Posted by Purple
    definatly, as long as you have large processing power, which all PCs as well as servers have these days java is great. C programs take ages to develop, debug and port to platforms. java is the way to go for large enterprise applications. Although some of the Sun coding is not brilliant.
    There's now modes to allow raw assembler code insertations if your feeling brave.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My own web server
    By r1zeek in forum Software
    Replies: 4
    Last Post: 12-07-2004, 07:23 PM
  2. Web Server issue...?
    By joshwa in forum Software
    Replies: 13
    Last Post: 29-11-2003, 12:00 AM

Posting Permissions

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