microservices

org.springframework.web.client.ResourceAccessException: I/O error on GET request for in Microservices

旧时模样 提交于 2019-12-06 07:37:36
I am developing microservices code from the link : https://github.com/sivaprasadreddy/spring-boot-microservices-series . In this code base, I was successfully able to start the services like "config-service" , "service-registry" , "shoppingcart-ui" , "zipkin-server" etc, but when I tried to start the "inventory-service" , I got the below error. Error below for reference:- org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8200/v1/secret/inventory-service": Connect to localhost:8200 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed:

Microservices - how to solve security and user authentication?

做~自己de王妃 提交于 2019-12-06 07:32:05
问题 There is a lot of discussion about microservice architecture. What I am missing - or maybe what I did not yet understand is, how to solve the issue of security and user authentication? For example: I develop a microservice which provides a Rest Service interface to a workflow engine. The engine is based on JEE and runs on application servers like GlassFish or Wildfly. One of the core concepts of the workflow engine is, that each call is user centric. This means depending of the role and

java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented. in Spring Boot

試著忘記壹切 提交于 2019-12-06 04:48:10
I am developing Spring Boot Microservices example. In this example, I used config-server and licensing-service and deployed successfully on docker . When I call the REST endpoint : http://localhost:8080/v1/organizations/1/licenses , I got the below error. To solve this error, I went through many links already, but none of the solutions worked for me yet. The refer links : I have taken actual code reference from : https://github.com/carnellj/spmia-chapter3 Method org.postgresql.jdbc4.Jdbc4Connection.isValid(int) is not yet implemented https://sbforge.org/jira/browse/BITMAG-508 Error: java.sql

azure service fabric reliable dictionary linq query very slow

社会主义新天地 提交于 2019-12-06 04:40:40
问题 I have a reliable dictionary in service fabric stateful service. I have a simple linq expression. I am using Ix-Async package for building an asyncenumerable. using (ITransaction tx = this.StateManager.CreateTransaction()) { var result = (await customers.CreateLinqAsyncEnumerable(tx)) .Where(x => x.Value.NameFirst != null && x.Value.NameFirst.EndsWith(n, StringComparison.InvariantCultureIgnoreCase)) .Select(y => y.Value); return await result.ToList(); } The data is organized into 2 partitions

How to tell from Npgsql exception if the call is worth a retry (transient fault strategy)

ε祈祈猫儿з 提交于 2019-12-06 02:45:24
I'm writing a service which will be connecting to a remote postgres server. I'm looking for a good way to determine which exceptions should be treated as transient (worth retrying), and how to define an appropriate policy for connecting to a remote database. The service is using Npgsql for the data access. The documentation says that Npgsql will throw a PostgresException for sql errors and an NpgsqlException for "server related issues". So far the best I have been able to come up with is to assume all exceptions that are not PostgresExceptions should be treated as possibly transient, worth

Most efficient way to communicate between multiple .NET apps

心已入冬 提交于 2019-12-06 02:44:33
问题 Currently i have a setup where my clients (web apps, iOS app etc) talks to my backend API .NET web app (Nancy) via REST calls. Nothing special. I now have a requirement to split this API up into microservices, where each service can be individually upgraded/deployed. My main API (public) will just perform authentication, then call into one of my microservices, which will be in my private network. What's the different ways i could communicate between my main API and other microservice API's?

Heroku load balancer vs Netflix zuul

空扰寡人 提交于 2019-12-06 02:16:34
问题 According to this answer https://stackoverflow.com/a/41811770/2849613 I would like to get a little bit more information about best practices with microservices on Heroku. The question is which approach is better? Install every services as independent app, and use one of them as REST "proxy" (for example Netflix Eureka)? Or Create docker based approach with, for example Netflix Zuul as a load balancer? On my own I see already some pros and cons of both approaches: Pros : better scalability

Java application: Sequence workflow pattern

情到浓时终转凉″ 提交于 2019-12-05 22:06:26
I have a spring web application. When a user calls save endpoint, system should execute many external calls to save the state in multiple microservices. However, those steps depend on each other. In other words I have a sequence of steps to perform. sequence pattern Just calling a set of steps one by one is not a big deal, I can just create class for each step and call them one by one doing appropriate modifications between the steps. However, each of the steps can fail and if it happens it should be properly reported to the user. Here is a pseudo-code for a straight forward solution: var

Microservices - RestTemplate UnknownHostException

孤街浪徒 提交于 2019-12-05 18:58:06
I have a simple setup with a Eureka service registration server, a service for the public API and a service that gets called from the public API using RestTemplate. Eureka tells me that the services are successfully registered, but when I call the service @Service public class MyServiceService { @Autowired private RestTemplate restTemplate; private final String serviceUrl; public MyServiceService() { this.serviceUrl = "http://MY-SERVICE"; } public Map<String, String> getTest() { Map<String, String> vars = new HashMap<>(); vars.put("id", "1"); restTemplate.setRequestFactory(new

Dynamic Scalable and adaptive architecture

我是研究僧i 提交于 2019-12-05 18:42:17
I am a PhD student in Cloud Computing, I plan to use the microservices based architecture with consul and zeromq for my research project. I had few questions that I am finding hard to understand. Can someone help me out in sharing their experience. We have microservices based on dockers, We have zeromq and we have consul. Can you mention how we could combine all the three together to have a dynamic adaptive environment? Though I understand as to what zeromq, docker and consul is individually, I am still unable to get a clear picture of how all of them function as a whole.We have docker