When caravans arrive, I mobilize my military and (if I've built it up enough to do so), send a squad or two to help protect it. Entryway defenses can only extend so far, and don't do any good if the goblins appear on the far side of the map and hit the wagons three hundred steps from the nearest trap.
As far as defending the depot itself goes, I don't use all that airlock stuff. I'm too forgetful, and would probably wind up locking out half the caravans. Plus, I like to let attackers get nice and deep into a shooting gallery before butchering them so that I can kill as many as possible before they flee far enough to escape my wrath. Don't get me wrong, the Corridor o' Doom itself is as long as deep as anybody else's would be, it's just that there's another fifty (or two hundred, in the case of one of my forts
) steps' worth of seemingly-empty canyon/causeway in front of it.
To do this, I usually wind up with a convoluted mess of a defense grid. The general layout typically looks something like this:
Bunkers====barracks===Stairs to barracks
|
Front Gate==Entry hallway==Depot==Forward storage area
|
Stairs to rest of fort
|
Rest of fort
This keeps my civilians (mostly) out of the way of my soldiers, keeps children well away from the line of fire, and keeps enemy melee troops a ridiculously long walk from my Marksdwarves. The forward storage area is a compromise between convenience and defense: it's close to the depot to cut down on pathfinding problems when loading up for caravans, but almost entirely reliant on chained animals to keep thieves away.
The bunkers are only seperated from the entryway by a row of Fortifications and a channel. Marksdwarves are initially deployed to rearward bunkers, with melee troops hanging out at the depot as backup. When the enemy gets to the front gate, there's a sacrificial critter chained there to spot ambushers and subsequently get turned into practice ammo by ambushers (and siegers, for that matter). When the enemy gets to the entry hallway, they suddenly find themselves being caged and slaughtered by traps, peppered by fortification-protected Marksdwarves, hammered by siege engines, and thrashed by at least a dozen heavily-armored melee troops. If an enemy punches through that, then they
deserve to win
. After all of that, when the enemy breaks, they have to flee through a hail of XBow fire before they even see daylight.
The main downside is that if something like a snatcher or thief gets in, it has no trouble getting away because it's almost impossible to get troops from the barracks to their stations in anything resembling a decent amount of time. Of the dozen or so thieves killed in my current fortress, only one has been shot, with the rest being chopped up by lumberjacks or beaten to death by haulers.