How to distinguish between different service objects under the same class? - eclipse

Different service providers could register different service implements for the same service class. When I want to use the service, how to distinguish between these implements ?

The ServiceReference object for a service will provide access to metadata for the service including the service properties specified when the service was registered, and also the bundle which registered the service.

Related

Azure Service Fabric ASP .net with remoting listener

I have a service externally exposed via HTTPS which I also want to use internal to my cluster via service remoting. I know I can setup the listener in the CreateServiceListeners method, but the problem I have is that I will need to implement the interface from that same StatelessService class which doesn't work as the method is implemented in the Controller. Is this possible and if so, is there an example I can look at?
I would recommend this:
Move the implementation logic to a separate class.
Use Dependency Injection to pass that class to your service and controller.

Register multiple microservice instance with same name on development enviroment

we have a eureka server deployed on server and developers for development purpose register their microservices with it. but when some developers that work on same microservice, register own microservice's instance on eureka [sure with their local ip address] get wrong instance. developer can't change instance name because other services call their service with service name. what's best pattern for our problem?
Another approach to make the developers register their microservices as OUT_OF_SERVICE so then the services will not be called by the rest of services registered in Eureka but they can interact with the rest of services registered.
You can set it as out fo service by adding this to the application.yml:
eureka:
instance:
initialStatus: OUT_OF_SERVICE

How to expose REST services to internal and external parties?

I have couple of modules which communicate internally through REST services. Now I want to expose some of the REST services to third parties. Though I have provided authentication JWS but still have some doubt:
What design should I follow to expose only few REST services to third parties
In case if I need to remove any third party exposed REST service, my current application with communication among the modules should still work.
Do we have any framework available to expose few REST services to third parties.
One way of achieving this would be by deploying next to your already existing app (let's call it internal) the very same app, but on a different port (let's call this one public). Your REST service should communicate just as before, through the internal one; however you can add an exception in the firewall for that new port so that the public rest service can be accessible by third parties. You could then have an access control policy that states which endpoints (REST services) can't also be accessed from the public app.
Of course specifying which technologies you're using would probably get you more tailored solutions.

Bluemix public CF App protect/private REST Endpoint

I have a public Bluemix CF APP which exposes a REST Service. I would like to have the option, that the public url bound to the CFApp would be inaccessible from outside. The REST Service itself should only be usable from other CF Apps in my org, for example over API Management. I don't want to implement an own security mechanism for it, because API Management provides already everything I need to control, which clients will access my service. So some kind of private route inside Bluemix public, only available to runtimes and services in my Bluemix organisation.
This is not currently possible with IBM Bluemix, due to limitations in Cloud Foundry.
All bound routes are accessible from the external network.
If you want to have a private API exposed, you have the following options.
Add authentication to the REST API, managing the credentials as a user-provided service bound to all the apps. The API will be accessible externally but only by users with the credentials.
Use an application service, like a message queue, to expose an internal RPC-style API. Applications can bind to the same service and it will only be accessible internally.

Spring Integration annotation implementation with multiple gateway

I have a requirement to implement a serial web service call to 2 web services, say ServiceA followed by ServiceB. I implemented this using xml, having two separated gateways for each service and all, I wanted to know how to do this using annotation. How will I mention which service activator goes with which gateway.
Thanks