microservices

Microservices: How to store source code of many microservices?

我是研究僧i 提交于 2019-12-02 17:02:58
Currently, I have 20 microservices for one project. And every microservice stored in separate GIT reposotiry. Subsequently, the number of services will increase to 200 (or more) . Every service has unit tests and integration tests. Every service has build in TeamCity (Continuous integration server). Question: How to store source code of 200 microservices for one project? In one repository or in separate repositories? Unless those micro-services are tightly coupled (meaning it wouldn't make sense to download only some of them, and you would only work with all of them), keeping them each in a

Data Consistency Across Microservices

点点圈 提交于 2019-12-02 16:56:48
While each microservice generally will have its own data - certain entities are required to be consistent across multiple services. For such data consistency requirement in a highly distributed landscape such as microservices architecture, what are the choices for design? Of course, I do not want shared database architecture, where a single DB manages the state across all the services. That violates isolation and shared-nothing principles. I do understand that, a microservice can publish an event when an entity is created, updated or deleted. All other microservices which are interested in

Where does Elixir/erlang fit into the microservices approach? [closed]

随声附和 提交于 2019-12-02 15:45:20
Lately I've been doing some experiments with docker compose in order to deploy multiple collaborating microservices. I can see the many benefits that microservices provide, and now that there is a good toolset for managing them, I think that it's not extremely hard to jump into the microservices wagon. But, I have been experimenting with Elixir too, and I am quite fond of the benefits that provides by itself. Given that it encourages packing your code into multiple decoupled applications, and supports hot code upgrades, how would you mix docker with elixir (or erlang, for that matter)? For

What is the best way to communicate between microservices in vertx, by web client or some middleware?

纵然是瞬间 提交于 2019-12-02 14:12:10
I have not done much in vert.x microservices, but I ran into the doubt of knowing the best way to communicate with each other miscroservices vert.x, using some middleware or web client, I do not know, or any other way that vert.x allows me. There's an infinite of possibilities to allow vert.x microservices to communicate between them, each with pros and cons and with more or less relevance depending on the context. Here is 3 common ways : 1) Using the native vert.x eventBus ( asynchronous logic) : https://vertx.io/docs/vertx-core/java/#event_bus (and you can use the Hazelcast Cluster Manager

How to bring a gRPC defined API to the web browser

本小妞迷上赌 提交于 2019-12-02 14:04:01
We want to build a Javascript/HTML gui for our gRPC-microservices. Since gRPC is not supported on the browser side, we thought of using web-sockets to connect to a node.js server, which calls the target service via grpc. We struggle to find an elegant solution to do this. Especially, since we use gRPC streams to push events between our micro-services. It seems that we need a second RPC system, just to communicate between the front end and the node.js server. This seems to be a lot of overhead and additional code that must be maintained. Does anyone have experience doing something like this or

How does data denormalization work with the Microservice Pattern?

时光总嘲笑我的痴心妄想 提交于 2019-12-02 13:57:33
I just read an article on Microservices and PaaS Architecture . In that article, about a third of the way down, the author states (under Denormalize like Crazy ): Refactor database schemas, and de-normalize everything, to allow complete separation and partitioning of data. That is, do not use underlying tables that serve multiple microservices. There should be no sharing of underlying tables that span multiple microservices, and no sharing of data. Instead, if several services need access to the same data, it should be shared via a service API (such as a published REST or a message service

GraphQL and Microservice Architecture

天大地大妈咪最大 提交于 2019-12-02 13:47:25
I'm trying to understand where GraphQL is most suitable to use within a Microservice architecture. There is some debate about having only 1 GraphQL schema that works as API Gateway proxying the request to the targeted microservices and coercing their response. Microservices still would use REST / Thrift protocol for communication thought. Another approach is instead to have multiple GraphQL schemas one per microservice. Having a smaller API Gateway server that route the request to the targeted microservice with all the information of the request + the GraphQL query. 1st Approach Having 1

Can containers share a framework?

橙三吉。 提交于 2019-12-02 09:53:30
I'm aware that Docker containers can share a data volume but is it possible for them to share frameworks? For instance, if i have two .NET services running on IIS can I just share the framework between them? Yes you can, what you usually do is Alternative A: create a busybox image and COPY your framework, expose the location as a volume VOLUME /opt/framework/ FROM alpine COPY framework /opt/framework VOLUME /opt/framework COPY busyscript.sh /usr/local/bin/busyscript RUN chmod +x /usr/local/bin/busyscript CMD ["busyscript"] While the busyscript.sh looks like #!/bin/sh #set -x pid=0 # SIGTERM

Does Using Opaque Access Tokens Make My Server Stateful?

风流意气都作罢 提交于 2019-12-02 06:43:53
问题 I am trying to understand statelessness in restful APIs in the context of authentication. Here's the scenario: The user logs in. The server verifies the username and the password, and generates an opaque access token. It caches some information related to this token - for example, the expiration time, the userId, whether this token was explicitly invalidated before it expired, etc. The token is sent to the client, and the client sends it with every future request. List item Fielding's

Accessing Models and ORM across various Django instances [Microservice Architecture]

冷暖自知 提交于 2019-12-02 05:49:40
I've a Django Rest Project backed by Postgres Database. Now each app under this project has to decoupled and to be moved into different server. But in the current views there are places where i've to import models from another app and perform operations through ORM. Keeping this in mind, how can i access the models from different apps (which will be running as separate django instance on different servers) and also perform Queries on them. ? 来源: https://stackoverflow.com/questions/51035005/accessing-models-and-orm-across-various-django-instances-microservice-architect