Search code examples
javadatabaseapiarchitecturedata-access-layer

How to shield a DB?


I have to provide an access to my semantics. Currently, it is an RDBMS but later I'll probably use additional non-RDBMS data sources (graph, hadoop etc).

The consumers of my semantics are located inside company domain/intranet but run on remote servers. Moreover, as we are in design stage, it is unclear what technology they will use for implementing their business logic (Java/C or other). I think it would be a bad idea to provide to external modules of our SW a direct access to my Data Model over JDBC/ODBC (because i do not want to be committed to RDBMS only).

The plan is to create an API to access my semantics. The API is basically, CRUD. Current candidate is REST API using Spring.

My concern is that the access over REST might be slow. Preferably the technology would be Java-based. However, C-base and others are welcome as well.

I wonder: what alternatives to REST shall I consider? The only requirement except for the speed of access is that it must be easy to implement and maintain.

I'd appreciate your suggestions.


Solution

  • For just internal calls behind company firewall, RMI would allow to create arbitrary complex API with multiple methods that accept and return complex data structures. CORBA will also do. These technologies are part of JavaSE.

    From the newer technologies, Google protocol buffers may not be bad for this task.