In the story I'm working on, there's an island kingdom that has historically been attacked by invaders from the mainland. This island kingdom's culture is akin to that of ancient Djibouti or Eritrean people, while the invaders share more similarities to the Ottomans.
My question is what would it take for these island people to successfully fend off invaders for centuries? Sure, they may know more about the climate/topography of their own home (the region is supposed to have strong winds), but what kind of fortifications would they have to build in order to survive as an independent nation? I ask because I'm not particularly familiar with medieval warfare and defenses beyond moats, catapults, and walls.
EDIT: Yes, my question is more geared towards what resources will it take to defend against a larger mainland invader. As I mentioned climate could work in their favor, such as strong winds, but some of their own ingenuity could be incorporated with this advantage... possibly bolstered by it as well. I had no plans on having these islands experience regular volcanic activity, but their use of this natural phenomena could be entertained as well.