Layer7 API Management

  • 1.  Difference between Policy and Service

    Posted Aug 19, 2016 07:02 AM

    Hello All,

     

    Can someone please explain me the difference between Policy and Services. Also I noticed there is slight color differences in REST Policy and REST Service created on Policy Manager. So i got confuse



  • 2.  Re: Difference between Policy and Service
    Best Answer

    Posted Aug 19, 2016 03:53 PM

    We have a lot of nomenclature problems with that definition.  Our developers like to refer to everything as "policy development".  As far as the gateway is concerned there does seem to be a definitive difference.  I consider anything that is "addressable" via a gateway URL to be a "service".  These are mostly created from the "publish" functions in the Policy Manager main menu, SOAP Web Service, Web API (REST), etc.  This may seem misleading to some, as the actual "service" may be something you route to from the gateway, with the gateway providing only "management" functions (security, authentication, orchestration, etc.).

     

    A "policy" on the other hand tends to refer to fragments.  These are things you can include in a "service" but are not directly addressable themselves.  You can't get to them via a url.  In programming terms one might refer to them as sub routines.  I believe in product speak these also include Encapsulated Assertions (EA's), which have broader utility and flexibility than fragments, but still are not directly callable from outside the gateway.

     

    At least that's my interpretation.



  • 3.  Re: Difference between Policy and Service

    Posted Aug 23, 2016 01:50 AM

    In context of CA API Gateway,

    Policies are reusable code segments which can be used in multiple Services by using Include Policy Fragment Assertion.

    You cannot expose a Policy as an API, Its the Service which is exposed as a API.

     

    Regards,

    Ganesh



  • 4.  Re: Difference between Policy and Service

    Posted Aug 23, 2016 10:05 AM

    In short a policy is the 'code' behind the service. It describes how the service behaves. The service is how the policy is exposed to the outside world.

     

    Ganesh Reddy: interesting description. It made me wonder about another question: what is the difference between a service and an API in your opinion.



  • 5.  Re: Difference between Policy and Service

    Posted Aug 24, 2016 03:45 PM

    MichielHelder In my opinion Technically Service and API are same but difference being the exposure. Service is API wrapped over HTTP.

    Correct me if i am wrong.



  • 6.  Re: Difference between Policy and Service

    Broadcom Employee
    Posted Aug 25, 2016 07:37 PM

    My understanding might not be accurate, but I thought,  from the view of developer, policy and service are the same, but to  the gateway, they are different entities, (ie. store in different tables). A main difference is that service has a resolution path, but policy hasn't.

    And to gateway, service and API are the same.