开发者

RDBMS GRANT privileges vs REST services

There are many services with REST interface. However they use REST rather than allow开发者_JAVA技巧 operate with database. Why no love to RDBMS? Is this insecure or something?


Now I understand your question more I could provide this anwer.

In general, there are a lot of possible reasons for having your datamodel exposed through a web service instead of allowing connection to the database directly.

Protocol The most use protocol for internet communication is HTTP. The advantage of using this protocol rather than database communication protocols is therefore big. Routers and ISP's have the HTTP channels open by default and know how to handle then. Database connections are often using proprietary protocols and their own ports.

Open standards The communication protocol used needs to be acceptable for a big audience. For example, OData can be such a protocol, exposing your datamodel in a standard and queryable way.

Scalability Web services offer ways to be stateless and in with that restriction scale easily. The provider can choose to put more webservers in action to handle increaing load. This is harder to achieve with just the Database system alone.

Authentication While also a database system has the ability to authenticate users, the number of supported systems is often limited and management of the authentication troublesome. Web services offer a multitude of systems and are often provided out-of-the-box by a web server system.

Technology abstraction End programmers do not care about the database technology use to implement the data model. And that also goed for the provider, that wants to have the flexibility to change its database technology without the end users noticing it. The level of abstraction can be provided by offering a solid and stable web interface layer.

Manageability While protocols like Odata often expose the datamodel 1-on-1 to the end user, it is possible for the provider to make adaptions from the physical datamodel. This is done by making a separation between the physical datamodel provided by the database and the logical datamodel provided by the service.

Not sure if you are satisfied with one or more of the reasons, but that would be the general architecture considerations for having a service layer on top of a RDBMS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜