I'm considering building a simplest defending trap system. using water flow to flush enemies to a certain point and keep them their, while the rest of the enemies keep entering the trap system. when they are all assembled, close the room to drown them, or use upright spike traps to harvest them. I prefer the latter for there may be some invaders who do not breath.
problem is that how fast can water flow flush the enemies, and can it keep a huge number of them in limited tiles.
brief side view:
←water flow
WWW
WWW
_____||...___WWW
W=Wall
||=bridge wall
...=floor grate
==============update I==============
considering there may be building destroyers can destroy grate, and wiki suggests that fortification will not block creatures in flow, I come up with next version of the design:
Side view:
←water flow
WWW Z2
F SWWW Z1
[Fort]____...H || SWWW Z0
W = wall
F = fortification
... = floor grate
H = hatch
S = upright spike trap
|| = bridge
in this design, the flow will first fill the Z0 channel up, but will keep flowing in Z1 level, pushing creatures from right to left. enemies may attempt to climb up to Z1 floor from Z0 channel, but will be continously pushed back and for those who can frequently climb on the Z1 floor, there is also a S trap prepared for them (although I think it won't be neccesary). after the butchering, lay down the bridge and harvest the goblinite. for evil enviroment, drop bodies first through Hatches (don't know if dwarves can dump bodies directly through grate or not)