Web application integration with Drupal

We want to build a web application, that is specific to our domain, but also include forums, blogs etc in this application. Some integration points to Twitter and Facebook are also required. There will also be a desktop application that connects to our web application for uploading data and downloading configuration and reports.

The question is, can we extend Drupal to host both the regular modules and our web application? (There will be business entities and their properties and daily data uploaded from the desktop application) Or can Drupal be integrated with external applications? As an example, users and roles need to be same and consistent across both. We may also want data from the web application searchable in Drupal.

I know this is a bit vague, but I cannot reveal more. I am very new to content management and I just wanted to know if someone has built this kind of application.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/2/feed