hadrian's wall worked rather well for a few centuries.
1. it was never intended to 'keep the scots out' - it was an economic control device.
a. besides giving the troops something to do, it defined the limit of the empire whose further expansion was deemed too costly to continue.
b. it had gates every mile or so with a few troops at each gate (too few to prevent a concerted break-thru), major gates every 10 miles or so. these were economic control points in that they were there to deliberately let the barbarians in/out for trade (and to tax them & charge a toll.) and to funnel them to the gates where they could enter/leave on approved business.
they only failed when the govt. could no longer afford to keep paying the troops stationed on the wall, liberal welfare policies in rome where all voters were 'bought' by distribution of foodstuffs and entertainment being the major expense that caused the liberal cutbacks of unnecessary troops (after all, they were at peace, who needs troops).
as long as the troops were there it was easier for the barbarians to pay their taxes and tolls to trade thru it than to take a chance at smuggling & getting caught or fighting thru it.
2. more parallels. the troops manning the wall, and some of those that built it were auxillary troops. non-citizens enlisted in the army who would gain their coveted roman citizenship after 20 years service. when i was aboard ship in the coast guard, our stewards were all phillipino who were enlisted under just those terms. they became US citizens after retirement.
the non-citizens who followed the rules were welcome, and could join the club by working to serve the emipire. non-citizens who tried to get the same privs without following the rules were crucified.
rome lasted, in one form or another from 760bc until the 1400's ad., so what they did kinda worked.