mardi 6 octobre 2015

web service manager - is that amn implementation of service locator pattern

I am using Spring+maven+hibernate configuration for writing Rest ful web services. Now, these web services are used by mobile applications and through web applications. I have a requirement to create something like a web service manager ie.., In the controller , instead of having many methods mapping to different services, I should have only one url and based on the parameter to that url , I should be able to route the request to different services.

  1. I read about Service Locator pattern.Should I use this pattern for my requirement? Can I use service locator with Spring? From what I read, service locator seems to offer a way to identify the services but that is what my controller is doing in spring. Am I right in my understanding ?

  2. Service locator uses some cache to access the services faster . In that case, should it not be implemented on the client(Web application side) instead of the server side ?

  3. Please help me understand the service locator pattern. Should I know JNDI in order to understand this pattern?

Aucun commentaire:

Enregistrer un commentaire