Microsoft Dynamics CRM Web Services
If you are looking for a middleware between Microsoft Dynamics CRM and any other application or system then you can simply create a SOAP Web Service. A custom SOAP service can work on all platforms of MS Dynamics CRM (CRM Online, CRM On-Premise).
There is need to create a simple SOAP request which can receive request from your application/system. After receiving request it should process and call the CRM library or plug-in to establish a connection with MS Dynamics CRM. For example if you want to create a new contact, your application should call SOAP service and SOAP service should first create an authentication using Dynamics CRM library then it should send the data to Dynamics CRM for creation of new contact.
Code for creating connections, getting and saving data to CRM should be in MS CRM Library. So when SOAP send request to CRM Library it should validate data and create a proper MS CRM format of record and finally to store it to CRM.