I'm fairly new to developing with multiple tech stacks so I was wondering if it was possible to combine the two together?
For example, with an express backend that already maps requests like /about and /contact I want to have a spring application that maps a request for /service in its MainController and use other classes like MainService.java.
I currently have a social-media type of application built on Node and an AWS image upload app built with Spring so I was curious if it was possible to connect these two apps so that users can upload images using the Spring app.
If this is possible, what other benefits can it provide? or is it bad practice?
If the two applications are restful u can turn in micro-services Architecture to use a service discovery which can recognize the two applications and another application to be the Api gateway that can play the role of proxy to redirect requests.
multiple languages micro-services
service discovery
api gateway.
Otherwise if u are apps are not restful u can simply make a http requests to link them.
Related
So I'm trying to use Application Gateway in Azure and trying to do the following:
Single domain (app.mydomain.com) with path based routing to different web apps
like: http://app.mydomain.com/app1
http://app.mydomain.com/app2
Any idea how to configure it in Application Gateway?
I'm keep getting 502 Error when I did the routing to my web apps.
Any idea how to configure it in Application Gateway?
If you want to use path-based routing in the Application Gateway.
Sure, it is possible.
We can use the routing rules to point to a specific backend pool. That backend pool will point to whatever servers you want handling that request.
For more information you could following this tutorial. And you also could refer to this blog to get more detail steps
I have a GraphQL server using graphql-yoga based on an Node JS express server running on Google App Engine.
Basically, the server exposes an HTTP endpoint with a single route accepting POST requests returning a JSON result, which is consumed by a mobile application.
It doesn't handle user authentication.
From what I understand, it is possible to use Google Cloud Endpoints to deploy an ESP (Extensible Service Proxy) in front of my server in App Engine.
It exposes an API with a secure endpoint that handles user authentication via Firebase Auth, Auth0 or Google Sign In.
Are my assumptions correct? I've deployed both with an open API specification that contains the right secure parameters but, without any bearer token, all requests are accepted.
Reference documentation: https://cloud.google.com/endpoints/docs/openapi/authenticating-users
ESP cannot run in front of your application on App Engine Standard the same way it can on App Engine Flex. That mostly has to do with the difference in architectures of those runtimes --- App Engine Flex is based on deploying containers (including multiple at a time), whereas App Engine Standard does not currently support multi-container deployments.
Because of this, we have the Endpoints Frameworks that add similar functionality as a library for applications based on App Engine Standard --- but this is only supported for the Python and Java runtimes.
Unfortunately, this means that if you're sticking with the combination of Node + App Engine Standard, there isn't currently a way to use Cloud Endpoints.
Using the App Engine Flexible Environment, I'm preparing to deploy an Angular 4 client and am looking into Cloud Endpoints to handle my node.js/express microservices as it seems to simplify securing and authenticating endpoint requests, and I wanted to clarify a few things:
Do I use cloud-endpoints as an API Gateway which routes requests to the individual microservice backends or are the microservices supposed to be built as individual endpoints-apps themselves?
Do I host the Angular 4 app statically (server agnostic), and make endpoint requests directly to the Gateway/microservice from the ng client, or is the app hosted through a server framework (e.g. node.js/express) which then passes on the request along to the Gateway/microservice
Endpoints is an API gateway, but it currently only routes to a single backend. On Flex, it's whatever app you deploy. The Endpoints proxy sits in front of your backend, transparently to the client, and the client requests will pass through the gateway. See the docs for how to set up your Flexible environment.
In conjunction with a dispatch.yaml directive to handle routing, you can use GCE as a gateway to multiple microservices running as services in a given project.
You can call the services directly or proxy through a server.
We are splitting rest api monolith into microservices and we encountered following issue
Let us assume the following
project is asp.net mvc, hosted on iis
project is hosted on dedicated server (not a cloud)
monolith rest api had urls defined such as www.domain.com/orders/ www.domain.com/tickets/ etc
When splitting monolith to microservice, ideal situation would be that we end up with
ms1 -> www.domain.com/orders/
ms2 -> www.domain.com/tickets/
Since microservices do not usually correlate with resources this could get messy, for example one microservice could serve more then one resource, or on resource could be served by more then one microservice.
fe.
www.domain.com/tickets/ (ms1)
www.domain.com/tickets/reports (ms2)
or
www.domain.com/tickets (ms1)
www.domain.com/orders (ms1)
What would be solution for this?
Use IIS rewrite to match resource with microservice
fe. GET www.domain.com/tickets/5 via iis rewrite to call -> ticketsms.domain.com/tickets/5
Use API gateway to route request to proper microservice endpoint
fe.
GET www.domain.com/tickets/5 via API gateway to call -> ticketsms.domain.com/tickets/5
So basically the primary goal is to have full rest api apear like
GET www.domain.com/tickets/5
GET www.domain.com/orders/5
POST www.domain.com/orders/
GET www.domain.com/invoices/100
etc
So are iis rewrite and api gateway are the only two options here?
Should microservices be exposed directly to the clients, or should they go trought API gateway. Is API gateway overkill in this scenario?
The API gateway definitely adds value - what you split is your implementation into smaller units (the microservices) - it allows you to manage, monitor and govern the API interfaces centrally as a single unit, separately from the implementation(s).
Exposing individual microservice endpoints might not be easy to manage - for instance, you would need to apply access control policies separately to each.
Looking for some insight/advice.
I'm creating an app where I want to expose an API that will be used by 3rd parties as well as my own web and mobile apps. Looking at the MEAN stack to do this. My thinking is that I should create 2 apps:
Express-based API app that talks to the MongoDB. No UI, just RESTful endpoints.
Angular-based web app with the UI. Does this app require Express? This app will hit the API endpoints to get/put data to the backend. Can Angular run on its own or does it need Express/Node. My thoughts were for Angular to handle the UI page routing and Express to handle the API routes.
Also, in the mix, is an iOS mobile app and Android app. These will also hit the API for data.
My background is heavy Java/Spring/Hibernate/Spring Boot and .Net. So, explaining MEAN stack as it relates to Java technology/frameworks would help!