Which protocol is used to communicate with google firestore - google-cloud-platform

I am using google firestore as my DB with a spring web service. I am using com.google.firebase package to build data access layer and to query the database.
Can someone please tell me what protocol is used underneath for communication between application and database. Is it TCP or something else ?
Atul

The protocol is well documented. You can access it via a REST API or a gRPC API.

It is http over TCP. All Internet traffic runs on TCP or UDP but there are usually higher protocol on top of the low level transport layer.

Related

Expose SOAP Service from SAP?

I've created a SOAP Service in ABAP, which perfectly works inside the network.
Now I wan't it to be called from outside and I haven't really found any tutorial.
Most likely a SAP Web Dispatcher or a reverse proxy is required, but how to use them?
Or is there an easier way to make the endpoint "public" and callable from the "outside"?
Making it public not part of SAP system. You need to configure your network to allow incoming request. Generally you need to configure your firewall. You need to open a port on firewall and redirect it to your SAP server http/https port. It will also create a risk for opening http/https port to outside. You must sure about limit your your web service user authorizations and changing all default passwords and using update date SAP system for security patchs.
For more get security I prefer to use a proxy server like nginx/apache to just serve your SOAP service over it.
Usually it is done thourgh reverse-proxies, to minimize risk of attacks from public Internet.
The general schema looks the same, although there are multiple variations depending on the company
The oldest and the most traditional reverse-proxy for SAP systems is a Web Dispatcher
SAP Web Dispatcher it includes load balancing and HTTP filtering
https://informatik.rub.de/wp-content/uploads/2021/11/2_sap-secure-configuration.pdf
https://wiki.scn.sap.com/wiki/display/SI/FAQ+Web+Dispatcher
https://blogs.sap.com/2021/05/09/landscape-architecture-sap-web-dispatcher-deployment/
SAP Gateway is a framework for exposing functionality as REST/SOAP web-services
https://blogs.sap.com/2018/04/15/sap-odata-service-get-consume-rest-service/
The tutorial for configuring SAP Web Dispatcher + SAP Gateway together
https://help.sap.com/saphelp_uiaddon10/helpdata/en/ec/342f1809c94d2b817ba772fe69e43f/content.htm?no_cache=true
The other options for reverse-proxy for SAP:
nginx
Apache
...
You are free to choose any reverse proxy on the market depending on your environment.

Proxy in between device and Google IoT Core using MQTT?

I have a situation where I want to use Google IoT Core to support bi-directional communication between my devices and existing GCP stack. The trouble is, some of my devices cannot connect to GCP's MQTT bridge because they are blocked from reaching it directly. The communication must instead go through my own hosted server. In fact, some devices will not be allowed to trust traffic either inbound or outbound to anything but my own hosted server, and this is completely out of my control.
Basically all suggested solutions that I have found propose the use of MQTT over WebSockets. WebSockets consume too many system resources for the server I have available, and so MQTT proxy over WebSockets is extremely undesirable and likely is not even feasible for my use case. It also defeats the purpose of using a lightweight, low-bandwidth protocol like MQTT in the first place.
To make matters more complicated, Google IoT Core documentation explicitly says that it does not support bridging MQTT brokers with their MQTT bridge. So hosting my own MQTT server seems to be out of the question.
Is it even possible to create a proxy -- either forward or reverse -- for this use case that allows for native, encrypted, full-duplex MQTT traffic? If so, what would be the recommended way to achieve this?
If you have hybrid set-up, meaning you have on-premise servers and a cloud server and you want to bridge them using Google IoT by using MQTT.
You can try in this github link, upon checking this MQTT broker has been tested to Google IoT. Since Google IoT is not supporting 3rd paryt MQTT broker.

Is it possible to use AWS Application Loadbalancer with RSocket?

Is it possible to use AWS Application Loadbalancer for RSocket?
An AWS Application Loadbalancer can also be used for WebSocket connections and my project uses RSocket with WebSocket as its transport. This made me wonder if it is possible to use this loadbalancer for RSocket aswell.
On one hand I would think it is possible to use this loadbalancer, as it only receives a connection and passes this to the target RSocket server.
On the other hand, if all RSocket frames go through the loadbalancer, it might not know how to handles these frames, which would make it not possible to use.
I couldn't find much about RSocket and loadbalancing online besides this post .But this is client side loadbalancing and I was looking for server side loadbalancing.
And this post .But this uses LoadBalanceSocketClient while I want to find out if an AWS Application Loadbalancer can be used.
Here follows a simple diagram of what I would like to have (if possible):
The RSocket client connects to the loadbalancer which passes the connection to a RSocket server (for example server A). Then the client and RSocket server A can communicate.
AWS will see this as a typical websocket service. So as long as it lets HTTP/1.1 connections through and lets them upgrade to WebSocket there shouldn't be a problem. This is very standard so it shouldn't be an issue. Ideally it won't see individual frames of the traffic, and you app will handle all frames on a single WebSocket connection. But it looks like the API Gateway support does deal with individual messages https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-set-up-websocket-deployment.html. You should ignore the RSocket client load balancing, and focus on AWS WebSocket routing.
As an example, with GCP (instead of AWS) the complexity is that this bumps you up from AppEngine Standard to Flexible. The demo site https://demo.rsocket.io/ is deployed to GCP and exposes websockets.
The additional kink, is that you possibly want stateful routing if you want client resumption.

Google Cloud Run - Does it support non http protocol for inbound request or outbound requests?

I have an existing application that I was trying to deploy it to google cloud run, but the application can't connect to an external NATS services. It seems that cloud run only supports http, websockets, and gRPC for outbound connections and traffic. It doesn't seem that an application can make a pure TCP/IP connection with binary data from a cloud run application.
Just looking for someone to confirm this. I have not been able to find any documentations that explicitly states the inbound and outbound limitations of cloud run.
Note: my app can connect to REDIS though.
Thank you for your help.
There's no outbound protocol limitation.
In terms of inbound, Cloud Run only supports HTTP/1 and HTTP/2 (which includes gRPC) over TLS (HTTPS). That said, server-streaming is not supported (e.g. websockets or streaming gRPC calls).
Therefore, you cannot serve with arbitrary TCP wire protocols on Cloud Run.
Yes according with this document, Cloud Run just support HTTP, WebSockets and gRPC by the moment, also here is pointed the http requests not supported, I suggest you create a feature request, if the petition earns enough people popularity this feature can be added to Cloud Run

WSO2 ISO8583 Initiate and Maintain Connection with Server

We've configured WSO2 using the below ISO8583 endpoint to receive messages and communicate with a RESTful API.
https://docs.wso2.com/display/ESBCONNECTORS/Configuring+ISO8583+Inbound+Operations
The provider we're integrating with are expecting that we will initiate the connection with their server on the 5000 port, and only then will they begin sending transactions to us. I'm primarily experienced with RESTful APIs so I'm not familiar with WSO2 and opening and maintaining a socket connection. How do I need to configure WSO2 to create and maintain the connection with the host / port from which we expect all transaction to then originate?
I assume this will be via the ISO8583 connector however need guidance.
https://docs.wso2.com/display/ESBCONNECTORS/Configuring+ISO8583+Connector+Operation
Could you please elaborate more on your requirements. While reading the description, I do not think that you have a requirement to consume ISO8583 standard messages. Please use this connector only if you are consuming ISO8583 standard messages.
You can refer to the documentation on the inbound endpoint in document [1] to further clarification regarding the listening inbound endpoint, in which you can define a host and a port. Please elaborate more on the type of messages that need to be consumed how to interact with the backend to provide with a more infomative answer
[1]-https://docs.wso2.com/display/EI650/WSO2+EI+Inbound+Endpoints