SOA: Why do not use Erlang/OTP web servers as services?

前端 未结 3 537
栀梦
栀梦 2021-02-09 00:42

After reading the Service Oriented Architecture Principles site and the respective Wikipedia article I had a thought: the Erlang/OTP platform can be considered as an SOA platfor

相关标签:
3条回答
  • 2021-02-09 00:58

    SOA can be applied to many implementation technologies, not just SOAPy Web Services, and I've found it always has be beneficial. For instance, you can model your database views and stored procedures as services. You can model your java APIs are services. etc.

    Now, getting to your actual questions:

    So, the question is: Do you think that building a software application with the Service Oriented Architecture approach by using OTP webservers (Mochiweb) as Services is a good idea?

    No. Everyone is moving away from SOAP and towards REST; however building a software application with the Service Oriented Architecture approach by using OTP webservers (Mochiweb) as RESTful Services might be good idea.

    Can the additional XML processing layer destroy all the advantages of such approach?

    It depends what your objective is. If you are just adding an XML layer because you think it's "The Right Thing to Do™", then you will always have problems with the XML layer because it will be a solution looking for a problem to solve. If your objective is to decouple the server implementation technology from the client implementation, by creating commonly understood representations for your entities, then the additional XML (or JSON or whatever is most suitable) processing layer is worth it.

    0 讨论(0)
  • 2021-02-09 01:09

    The primary reason this is not done is because you would limit yourself to the protocol of SOA. Erlang implements the protocol of IP with some added points (monitors). While you can do it, I wonder if it would be worth it.

    In principle, Erlang already has all the tooling for the idea of SOA but without all the bloat of SOAP and WSDL :)

    0 讨论(0)
  • 2021-02-09 01:09

    This is our main application of Erlang: web services. We normally use Yaws Appmods and an article here can show you a lot on how its done. Erlang has been a good platform for SOA, because of the following:

    1. Side Effect free code is very easilly written and tested.
    2. Isolation: Processes in Erlang help isolate each service request in a clean way.
    3. Most Erlang Libraries like mochiweb, misultin and Chicago Boss have been built from ground-up to support SOA systems written in Erlang.

    Its a great idea to apply your own OTP application behind any one of these frameworks. Another great reason why erlang is suitable for SOA is redundancy. SOA systems need to be up. If a service request fails, its re-tried along a different path (which, of course at physical layer, its being handled by a different machine where you OTP app has been distributed).

    Give it a shot, great idea

    0 讨论(0)
提交回复
热议问题