Skip to main content
Home Forums HTTP block device driver HTTP block device driver
Thread

HTTP block device driver

HTTP block device driver Networking 61 posts Dec 10, 2011 — Dec 4, 2012
Very, very cool. Have you tested under 7.0.1 or 7.1 for the Rocket Jockeys?

I've tested it with 7.1 and MacTCP and it doesn't work for a couple reasons, but at least one of them is interesting in why it doesn't work on 7.1 and does on 7.6.1.

When the File Manager on 7.1 does lookups, it does chained async reads. So when it traverses the filesystem, it does a read of one block, and from the completion routine of that read, it inspects the block and issues another read, and so on down the line until it finds what it is looking for. The HTTP Disk driver internally does chained MacTCP operations, so a read of the HTTP Disk issues an async TCPCreate, and from the completion routine of that, issues a TCPOpen, TCPSend, TCPRecv, TCPClose, TCPRelease, and when finally done, calls the original caller's completion routine. That chain gets huge, which means the stack gets huge, runs into the heap and boom hang.

The "solution" is to call the IO's completion routine from IO an interrupt, which is easily accomplished with the Deferred Task Manager. But the catch is, MacTCP processes received packets (indirectly) from the NIC's interrupt handler. The NIC interrupts when it gets a packet, interrupt handler eventually hands the data to MacTCP, etc. So, when the HTTP Disk returns an IO through an interrupt handler in this situation, the File Manager then issues another read operation, which then goes to MacTCP to open a new connection to the server. The TCP SYN goes out, but the SYN ACK is never processed because we're all from an interrupt handler, the TCP open times out, the IO fails, and bad news.

None of this is a problem on 7.6.1 because the File Manager does things differently and the stack never grows too large and there's no problem.

Anyway, knowing is half the battle, right? Now that I know what the problem is, I've got some ideas on what to do to fix it.

Nice to see these updates. I am getting some instability with Basilisk II with "Read Only" disabled, "unimplemented trap", but my emulated environment might just be acting up. I'll test it out with real hardware soon. I have to say this driver is pretty genius, it is so tiny and works really seamlessly with the OS, sort of like a modern dropbox, but without being annoying. :b&w:

One thing I was wondering from a design of a control panel perspective, is do control panels support copy/paste? I don't know if I ever tried pasting something into a control panel, there was probably was never a need. I tried with HTTP Disk and it didn't work... it's not an issue, I am just curious.

The unimplemented traps are undoubtedly Debugger calls when something with networking went unexpectedly. Is there any chance you could install macsbug, and when it happens type:

Code:
stdlog
go
stdlog will dump a bunch of information to a log file on the desktop, and go will resume execution (which may or may not work, but hey, better than an unimplemented trap. maybe.)

What System version & OT/MacTCP are you using? What server are you connecting to? Apache or a service or?

Control Panels can support copy/paste, but they need to do so explicitly. I haven't added that yet.

I can't get MacBug (6.6.3) to work in Basilisk. Instead of a system bomb, when it is installed the program just completely crashes. Sometimes I also get a hostname error after clicking "Mount". Here is what gets dumped in my terminal, perhaps this info is useful:

Code:
Illegal instruction: 4e7a at 03fe789c
Caught SIGSEGV at address 0x74f46163
D0: 001e0100 D1: 000000ff D2: 00000065 D3: 000901e0 
D4: 000001c7 D5: 00000000 D6: 00000000 D7: 00040003 
A0: 00000c30 A1: 03fe6038 A2: 001dfd30 A3: 0009c278 
A4: 0009c278 A5: 03fe6226 A6: 000d0ffa A7: 03fe243c 
USP=00000000 ISP=03fe243c MSP=00000000 VBR=00000000
T=00 S=1 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=7
FP0: nan FP1: nan FP2: nan FP3: nan 
FP4: nan FP5: nan FP6: nan FP7: nan 
N=0 Z=0 I=0 NAN=0
Segmentation fault
Oh well, looks like Basilisk II doesn't support macsbug. Thanks for trying.

What's your OS/networking config? Are you using OT or MacTCP?

OS 7.5.5 with OT 1.1.2 according to the TCP/IP control panel.

I made a graphic for your CP, if you are interested... I found the disk in the HyperCard clipart stack.

cloud-dithered2.png

Might I suggest it officially be called Cloud 9? :)

I was inspired by tt's graphic, and I made a couple Control Panel icons myself.

Cloud-9-Color.gif

Cloud-9.gif

I like those!

Why 9? Isn't it for System 7? ;)

Very pretty icons!

Very nice, I like them both tt and olePigeon. The current icon was whipped up by a friend that is way more graphically inclined than I.

I'll see if I can figure out how to do the GUI magic to scale them down for the smaller icons and generate the icon masks and stuff.

Thanks guys!

Cool icons. The stock ones are cool too. Just to clarify, my graphic was intended for inside the control panel GUI. :b&w:

I can generate a full set for you in ResEdit.

Why 9? Isn't it for System 7?
Yeah, but it's a fairly famous colloquialism. :p But Cloud 7 could be fun, too. :)

A full set in ResEdit would be great!

Also, good idea on the graphic in the CP, tt. That hadn't even occurred to me! I'll see what I can figure out there.

Thanks again both of you, this is awesome.

Thanks! That looks awesome. I'll integrate it in this weekend.

How's this for including your graphic, tt?

cloudcp1.PNG

I'll plan on integrating these graphics changes, maybe a couple other minor changes, and throw together a little release on Sunday if my weekend goes as planned.

Hi,

That looks very reminiscent of the MobileMe/iCloud preference pane in Mac OS X 10.6 and up:

icloud_setup-258718.jpg

Fascinating!!

c

Cloud 7 0.5.3.cpt.hqx

New version. Changes are:

- Renamed by popular demand

- olePigeon's icon set

- tt's graphic in the CP

- opens the MacTCP driver on demand instead of during boot. This hopefully avoids problems on boot on systems that either don't have MacTCP/OT, or it hasn't loaded yet.

- Fixed up the CP handling to work on System 6. Functionality hasn't been tested, it just shouldn't crash when opening it. :)

Cool, yeah thanks for including it, I tinkered with the shading a little more. olePigeon, feel free to improve... It does look a lot like iCloud, I was trying to go for a hybrid of 1991 and 2012, so I guess that's what happened. Name-wise CloudFloppy could bridge the eras, but sounds kind of funny. :b&w: bbraun, a tiny suggestion is to center your © and name at the bottom to balance out the rest of the window.

clouds-dithered3-b.png

Hi,

I also have a small suggestion regarding the icon vs. full-size window graphic. They're inconsistent. The icon has a small compact Mac in the cloud, while the window graphic has a floppy disk.

Perhaps either replacing the Mac with a disk on the icon, or the disk with the Mac on the window graphic will resolve this. Frankly, I like the floppy better, but I'll leave the decision as to what stays for the designer(s) to figure out.

Other than that, it looks quite good!!

I must download this sometime and try it out.

c

p.s. Maybe the Serial disk driver can be merged into this somehow to make an all-in-one solution for connecting classic Macs to various forms of modern-ish network storage.

Very nice graphics, but I've got another suggestion:

How about doing a riff on the AAUI Icon with the center dot replaced by the Compact?

Man, people are picky about icons.

*strokes TenFourFox icon, about which he still gets mail roughly once a week

It's not so much being picky as trying to be helpful by comrades that aren't able to help in the actual code development process . . .

. . . think of it as a creative focus group/development process for the eventual packaging, we've got a long tradition of collaboration in UI development.

Shouldn't be too hard to make up different versions of the icon. I'll whip some up and peeps can vote on it, I don't mind. Gives me an excuse to use my vintage Macs for something other than games. :D

Thanks everyone!

Cloud 7 0.5.4.cpt.hqx

This includes tt's updated cloud image, centering-ish of © line, and a bug fix when connecting after a disk image had been mounted, unmounted, remount->sadness.

FWIW, all of the image placement is handled in the resources. If you open up the control panel in ResEdit, 'DITL' resource -4064 is the control panel. Control Panels are a bit weird because everything is shifted right by the same size as the System 6 Control Panel where it had all the different CPs in a vertical list on the left. System 7 maintains the shift for compatibility. Which means all of ResEdit's auto-centering and stuff doesn't really work so good. Additionally, ResEdit displays things in a different font than the system uses for CPs, so the visual alignment in ResEdit doesn't reflect actual use. All of these can be programmatically set at runtime, but I haven't done that, I'm just using the 'DITL' resource for placement.

The cloud graphic is 'PICT' resource 128, although size changes to the graphic need to be reflected in the 'DITL' item.

Anyway, that's just an FYI for anyone that wants to play with the CP layout themselves. If anyone does mess with this, feel free to paste the resources you've changed into a new file, and send it to me.

CC_333: regarding the combination of this and Serial Disk, that's something I can look at down the road. Serial Disk (I feel) is fairly solid right now. I haven't had problems using it in a variety of configurations, etc. While HTTP Disk/Cloud 7 works well in some configurations, I don't feel it is quite to the same quality as the Serial Disk yet. So, for the moment, I'd like to develop them separately. Down the road, if/when they catch up to each other in development, combining them might work well.

Thanks everyone for the suggestions, the graphics, and the interest!

Some additional icon options:

cloud7.gif.63e1889cdbdf743977fbc21573a3a98a.gif


OlePigeon: I like #130 and 131. Icon #131, in particular, is pretty much what I had in mind (basically a scaled down version of tt's graphic).

Since it has to do with storage, a disk in the icon seems logical to me.

Isn't there a way to get a real copyright symbol (like this: ©), rather than ©? It's Option + G for me on OS X 10.8. Perhaps Systems 6 through 7.5.x are different somehow?

c

It's always been option-G.

Oh, OK!

It shouldn't be a problem then.

©

mp.ls