5 ms·
> That's because DOS webservers can only keep track of 8- or 16-ish concurrent requests Is that because of the lack of official 'forking'/threading, or due to
by pixelesque 3y ago
> That's because DOS webservers can only keep track of 8- or 16-ish concurrent requests
Is that because of the lack of official 'forking'/threading, or due to the limitations of whatever TCP stack is being used for the listen() / accept() calls? (or something else?)
- jstanley 3y agoI wrote a web server for CP/M, the issue there was that the C library could only hold the state of a small number of FILE* at a time, because they were allocated statically.
- rzzzt 3y agoFor DOS, "FILES=nn" in CONFIG.SYS controls the number of data structures it allocates for open file handles: https://pcdosretro.github.io/config.htm#FILES https://pcdosretro.github.io/config.htm#FILES But I'm not sure if accepted sockets fall into this category.
- skissane 3y ago> But I'm not sure if accepted sockets fall into this category. For the HTTP server in this article, no. It contains an embedded TCP/IP stack (linked into the HTTP server executable), which expects to talk to a network card driver TSR using the "Packet Driver" API (normally INT 0x60, but the interrupt to use is configurable). Network connections completely bypass the files subsystem in the DOS kernel Nowadays, the vast majority of people doing TCP/IP on DOS [0] use Packet Driver, and what I just said is true for anyone using that. However, historically there were a huge array of DOS TCP/IP stacks, all implemented differently. It would be (somewhat surprising) news to me if any of them represented individual network connections as files in the DOS kernel, but not having looked at them all, I can't confidently say. [0] which is almost all hobbyist/retrocomputing: I'm sure there are a few embedded systems running DOS surviving, but most of those likely don't do networking, and many of the few that do may be running something other than TCP/IP, so any remaining production TCP/IP use under DOS is likely quite rare
- ikari_pl 3y agoI was thinking about cpm online software too! what hardware do you run it on? any links?
- jstanley 3y agoSure. I ran it on an RC2014. I have a blog post: https://incoherency.co.uk/blog/stories/rc2014-web-server.html https://incoherency.co.uk/blog/stories/rc2014-web-server.htm... And a github repo: https://github.com/jes/cpmhttpd https://github.com/jes/cpmhttpd
- queuebert 3y agoAnd even if heap allocated, there might be a static pointer array tracking them. In the DOS days, dynamic memory allocation was to be avoided if possible. Machines did not handle running out of memory gracefully. Often we'd unnecessarily fix the size of things to avoid run-time uncertainty. A scientific Fortran code I once saw allocated all of the memory it would need at the beginning of the code in an array called 'a'. Then from there it would dole out portions to other parts of the program using common blocks.
- pklausler 3y agoI suspect what you’re trying to describe was the use of blank COMMON as a dynamic storage pool. The anonymous COMMON block begins at the address after the last named block.
- emmanueloga_ 3y agoought to be enough for anybody ... :-p I was surprised to find out there is a TCP/IP stack for DOS, I remember still having to depend on non-MS software as late as Win 3.1 to connect to the internet [1], never heard of "LAN manager" [2] but apparently it did have (some?) support. Btw, according to its author, "mTCP is a hobby project that I started in 2005." [3] -- 1: https://en.wikipedia.org/wiki/Trumpet_Winsock https://en.wikipedia.org/wiki/Trumpet_Winsock 2: https://en.wikipedia.org/wiki/LAN_Manager https://en.wikipedia.org/wiki/LAN_Manager 3: http://brutmanlabs.org/mTCP/ http://brutmanlabs.org/mTCP/
- smackeyacky 3y agoYou could get all kinds of network stacks for msdos. Net ware, 3Com XNS, a weird proto Microsoft network I can’t recall the name of, banyan vines, decnet . Weird stuff for ibm token ring networks. And yep TCP as well. When lan manager was released you could run it over a choice of networks TCP included, because the original lan manager ran on Unix as well as OS/2 as the server.
- toast0 3y ago> a weird proto Microsoft network I can’t recall the name of, NetBIOS / NetBEUI ?
- smackeyacky 3y agoNetBEUI - that's it.
- ryukoposting 3y agoIt could he hardware limits, but I doubt it. Plenty of microcontrollers are running HTTP servers right now, and those are happy enough.