Srilanka was known for its ancient glory same as INDIA. Strange defense mechanism mentioned in "Mahabharatha" was found in this ancient rock complex. This structure is believed to be the palace of daemon king Ravana and was mentioned in Ramayan. Our know history is limited and always stumble in front of endless questions.
Source youtube channel