Reputation: 1977
I have a core application and a provider application.
The provider application is added dynamically. It needs to register itself to the core. Originally I assumed the providers will have a public IP and would register there IP to the core and the core would call them when it needs some service. (Or connect to a VPN and the IP would be accessible)
This approach became hard to manage and there was overhead when checking the status of the provider.
I thought of some alternatives and don't know which one to use
Those are the ideas I have and I'm not sure on how to structure them for best performance and cleaner code.
What other option do I have?
@cool suggested that I use a discovery server and it makes more sense. The providers themselves contain a list of devices. Does it make sense to publish them separately? They all would have the same IP but device Id will be associated with the metadata (perhaps the id would be part of the url).
Upvotes: 0
Views: 749
Reputation: 1786
It sounds like what you need is a discovery service like eureka. What it does basically discovering/providing services as you need in your case. You can check out the details from spring-eureka
Upvotes: 1