Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  http server tutorials  (Read 1106 times)
0 Members and 1 Guest are viewing this topic.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Posted 2004-09-06 15:57:11 »

OK, this is one of those "I have no idea where to look for this info, but a lot of people round here probably have overlapping interests" OT questions...

  Where can I find information on how to implement an HTTP server? (not the HTTP protocol, but the server itself)

More specifically, I'd like a reference for people who want e.g. tutorials on writing HTTP servers that are a complement to the RFC. Personally, I've built up knowledge of the differnt HTTP servers - their architectures, their implementation details, their performance tricks etc - from many small observations and many different sources over the years. But when people ask "how do you do this?" I can't find any easy pointers. The best I can come up with is "Uh, well you could try reading the Apache source code..." but that's not a good solution really Sad.

Or, even better, would be sites that compare and contrast web server implementation details (I know these exist - I've read articles on this topic going back many years; but I can't remember where particular articles were nor would they be so relevant today).

The biggest problem I find is I can't seem to construct google searches with any value. I keep hitting one billion variants of people trying to help each other install apache. (any search with "web server" or "http server" in on the web itself are, ahem, a bit hopeful Sad). I'm still trying, but ... anyone got some bright ideas? I've moved on to trying specialist searches (e.g. trying to find stuff specifically on how HTTP servers implement file transfer - just basic stuff like articles containing text saying "stream, don't read-it-all-into-a-buffer-then-flush it (because you won't be able to serve many files at once, nor any large files at all)" etc).

malloc will be first against the wall when the revolution comes...
Offline t_larkworthy

Senior Duke


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #1 - Posted 2004-09-07 22:57:14 »

A take it you want to implelemt the whole thing
so just a servlet in a tomcat container would not be good enough
i.e.
http://java.sun.com/products/servlet/

Jeez why the hell you you want to do the whole thing?

This seems to be the area you would need to know about

http://www.developer.com/java/other/article.php/1488051

This assuming you would like to stick the way J2EE has abstracted the Http process.

Maybe I am complicating things. If you want the http server to be just a static page server. Well it would be just a matter of on listeneing on a port. Descrabling the garbase that comes in. Then bundling some garbage back according to the RFC spec that was build from a cached copy of the files you are serving. Still, why you wouldn't use apache that would surely be much more effecient.

Refine the question  

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline dranonymous

Junior Duke




Hoping to become a Java Titan someday!


« Reply #2 - Posted 2004-09-08 02:40:48 »

I have a solution that I think makes sense, you can tell me if you agree.  Search on this -

embedded web server

You'll stop getting all those apache related articles.  Since you want to write something from scratch, it appears, examining hardware embedded solutions should give you a good reference point.  The design philosophy will be somewhat different than say Apache or Tomcat, but you also won't have to deal with all the 'extra' stuff you might not care about - php, server side stuff, tons of security issues, massive configurability, etc.

Any way, here are two links I thought might prove informative -

http://www.computer.org/internet/v2n3/w3design.htm

http://www.microcontroller.com/wp/NSC_CR16/embedded_web_server.htm

Regards,
Dr. A>
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #3 - Posted 2004-09-08 08:40:02 »

Quote
I have a solution that I think makes sense, you can tell me if you agree.  Search on this -

embedded web server


Ah, good idea! You're absolutely right that I want to prune all the PHP stuff etc, but unfortunatly I might find I lose a lot of the software-related stuff that I *do* want (e.g. efficient streaming as mentioned earlier); but I'm sure I'll get a lot closer than I have been - 20 pages of refined google searches and I found only one useful resource - and that isn't even HTTP specific Sad.

c.f. next post for more details on reasoning.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2004-09-08 08:43:34 »

Quote

  Where can I find information on how to implement an HTTP server? (not the HTTP protocol, but the server itself)
...
More specifically, I'd like a reference for people who want e.g. tutorials on writing HTTP servers that are a complement to the RFC.
...
Personally, I've built up knowledge of the differnt HTTP servers
...
Or, even better, would be sites that compare and contrast web server implementation details (I know these exist


Quote
A take it you want to implelemt the whole thing


I don't want to implement anything - I want information I can provide to others which explains how to implement it.

Quote

so just a servlet in a tomcat container would not be good enough


I want tutorials on *how* to implement things; running tomcat is the answer to a different kind of question.

Quote

Jeez why the hell you you want to do the whole thing?


HTTP servers are an excellent way for beginners to try out their programming expertise on real-life, non "toy" servers.

- everyone has a free client to test with
- protocol debugging is very simple due to HTTP's base format (use telnet to manually connect)
- HTTP is a very well known protocol, so most tools have special support (e.g. packet sniffers always have support for decoding HTTP packets)
- it has some of the best RFC's compared to the other non-trivial protocols
- it is an extremely general-purpose protocol, useful for many real-life situations; it is used in a lot of games (though they don't tell you that)
- it has advanced practical features, like resuming of downloads

However, I don't want to write a whole book on "how to write an HTTP server"; I *could* do it, but I've got better things to do with my life and I'm 99% sure that most of the info for this is already out there, and well-written by others.

Quote

This assuming you would like to stick the way J2EE has abstracted the Http process.


Not really; J2EE hasn't so much abstracted HTTP as mangled it IMHO. There's little of practical use that implementors can learn from looking at J2EE servlets.

malloc will be first against the wall when the revolution comes...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (37 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (52 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (42 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!