microservices

Spring MVC - Calling a rest service from inside another rest service

荒凉一梦 提交于 2019-12-04 13:50:37
问题 I'm currently having a really weird issue with calling one REST service from inside another one and I could really use a hand in working out what I'm doing wrong. So first off, a bit of context: I have a webapp which calls off to a REST service to create a user account (for the sake of this explanation, the endpoint is localhost:8080/register). Earlier in the user journey I've called a different service to create the user's login credentials localhost:8090/signup but I need to check a few

Not able to read configuration from Consul in spring-boot application

℡╲_俬逩灬. 提交于 2019-12-04 13:41:17
问题 I am creating a Spring Boot application, which will read configuration like DB properties from Consul . But I am not able to read the key value from Consul using my application. Following is, what I am trying to do. **pom.xml** <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0<

What's a valid @MessagePattern for NestJS MQTT microservice?

三世轮回 提交于 2019-12-04 13:24:13
I'm trying to setup a MQTT Microservice using NestJS according to the docs . I've started a working Mosquitto Broker using Docker and verified it's operability using various MQTT clients. Now, when I start the NestJS service it seems to be connecting correctly (mqqt.fx shows new client), yet I am unable to receive any messages in my controllers. This is my bootstrapping, just like in the docs: main.ts async function bootstrap() { const app = await NestFactory.createMicroservice(AppModule, { transport: Transport.MQTT, options: { host: 'localhost', port: 1883, protocol: 'tcp' } }); app.listen(()

Microservices UI Frontend with Java and ReactJS Server Side Rendering

走远了吗. 提交于 2019-12-04 12:17:48
问题 My current design is to have clients connect to my (Java) Web API Gateway using a browser, the Web API Gateway will call each (Java) microservice to get their JSON data and return it to the UI component that made the request on the client. The only client side rendering will be from each ReactJS UI component for recurring requests to the gateway. On the server side the full HTML view will be rendered prior to being sent back to the client. Client browser ▼ (Request Dashboard View) Web API

Does Kong support API Aggregation

放肆的年华 提交于 2019-12-04 11:06:40
We are just researching a couple of API gateways, in particular Kong . Looking through their documentation it seems they support request/response transformation. However, if I understand this correctly, this seems limited to headers. Does Kong support API Aggregation like Netflix does it? No, by default one http request into Kong will only match to one upstream url. The Kong request and response transformation plugins handle simple Header, Body and Query String manipulation but Kong doesn't handle API aggregation. Obviously, Kong is very easy to modify via it's own plugin mechanism but

Microservice data replication patterns

感情迁移 提交于 2019-12-04 10:36:38
In a microservice architecture, we usually have two ways to communicate 2 microservices. Let’s say service A needs to get information from service B. The first option is an remote call, usually synchronous over HTTPS, so service A query an API hosted by service B. The second option is adopting an event-driven architecture, where the state of service B can be published and consumed by service A in asynchronous way. Using this model, the service A can update its own database with the information from the service B’s events and all queries are made locally in this database. This approach has the

azure service fabric reliable dictionary linq query very slow

半腔热情 提交于 2019-12-04 10:23:59
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 with around 75,000 records in each partition. I am using Int64 range as the partition key. In the

Most efficient way to communicate between multiple .NET apps

拜拜、爱过 提交于 2019-12-04 08:45:51
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? Pros/cons of each approach? The communication needs to be realtime - e.g request comes in from a browser

What are the option to API gateway with docker?

痞子三分冷 提交于 2019-12-04 08:35:27
问题 I've created several RESTful microservices and dockerized them. Now I want to have a web-based UI for them and the ability to create users and grant permissions to them to use some of the APIs. I know that I need some kind of API gateway. My first thought was that I always could do that bruteforce way: create some django app that would serve UI and proxy all request to APIs by hand, but this seems very dull. Maybe there are some alternatives? I've ready about Tyk, but can't find any

Communication Between Microservices

烈酒焚心 提交于 2019-12-04 07:26:37
Say you have microservice A,B, and C which all currently communicate through HTTP. Say service A sends a request to service B which results in a response. The data returned in that response must then be sent to service C for some processing before finally being returned to service A. Service A can now display the results on the web page. I know that latency is an inherent issue with implementing a microservice architecture, and I was wondering what are some common ways of reducing this latency? Also, I have been doing some reading on how Apache Thrift and RPC's can help with this. Can anyone