开发者

Using REST as Business Logic Layer ,Con and Pro [closed]

开发者 https://www.devze.com 2023-04-08 14:46 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_JS百科 Closed 11 years ago.

Using REST as Business Logic Layer ,Con and Pro [closed]

I am thinking of creating an Application as i shown in the figure, i am creating the presentation layer in PHP, where JAX-RS REST Service is working as Business Layer and JPA as Data Object Layer

My Question is

1)Is this arch secure?

2)Is this arch Scale?

3)IS there any other problem in my Arch?


This is a quite generic question (e.g. like "I am going to by a car. 1) is it fast 2.) is it secure")

However, there are some things to say here:

  1. The question is not, if the "architecture" is secure, but if you can make the services that you are using secure. If you are using e.g. Tomcat for the rest services, they will be as secure as you can make tomcat secure.
  2. Since there is (or should be) no state in REST-services, this should scale well, provided you find the right granularity for your services and do not introduce artificial state-handling. If you attach a load-balancer in front of the REST-Services, each call could be sent to another machine (or process). This will most likely lead to the database being your bottleneck.
  3. Yes and no. What you describe as architecture is very generic. Basically there is no problem in it if you do it right. But you can produce a lot of problems with it if you do it wrong.

Conclusion: Security and scale will depend on the details and the components you are using. Basically an architecture-type like the on you chose should provide a good basis for a scalable architecture (and implementation).

0

精彩评论

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

关注公众号