Expose Services to local environment for production - database

I am planning to move different service to Swisscom Application Cloud, but I have a problem on database access.
My setup is a web application and a local service sharing the same database, unfortunately the local service can't be moved to the cloud at the moment, there is a way for my local service to access the database in the cloud?
I think using the service connector in production is not a good idea
I know the best solution would be to avoid direct access to the database from the local service and expose REST API from the web application but that's out of budget

You are right: External service access to database services running in the cloud is not possible and the service connector is not suitable for permanent use.
This is by design: The services in the marketplace are meant to be used by the apps running there - the apps themselves should expose their functionality over HTTPS preferably. We'd like to avoid allowing external access to the databases; this would open the door for a lot of external (legacy) apps with a complete different set of requirements.
So the solution that fits the architecture best is indeed your suggestion: Expose the data needed for the legacy service as part of the apps' Web API.
Since that is out of question, it might make sense to host the database outside of the cloud (i.e. where the local service runs or on some 3rd party provider) and connect your app in the cloud to this externally running database.

Related

How can I deploy an angular-spring-postgres application on gcp?

I'm new to GCP and currently, I try to deploy all my applications on their services.
For an application in a single container I use CloudRun which I already really like.
Now I want to deploy an application that uses Angular in the frontend and spring in the backend and a SQL-DB (Postgres). Every part of this is in its own separated container.
Should I use for this purpose although CloudRun or does GCP have more suitable services I should consider to use if I want to host a scalable and serverless Application? So is there such a thing as the best practice for Frontend-backend architecture applications on GCP?
I recommend you to use these services:
Cloud SQL to host the database. It's managed for you and efficient
Cloud Run for the business tier (the spring application).
Be careful, with spring the cold start can take several seconds. I wrote an article on this (the article is quite old and the perf are now better on Cloud Run, but the latency on the first request exists (and take 5 - 7s for an hello world container)). Add several CPU (4 is a good number) to speed up the cold start or use the --min-instance parameter for this (or other solution that you can find in one of my articles)
For the front end, I recommend you to host the static files on Cloud Storage.
To serve this on internet, put a Load Balancer in front of this
Create a serverless network endpoint group (NEG) for Cloud Run service
Create a Cloud Storage backend to serve the static files.
Use the domain that you want and serve it in SSL
Optionally, use CDN to cache your static files.
CloudRun runs stateless containers. It doesn't make a distinction between frontend and backend, or worker jobs.
You can run your frontend, backend, admin code base as Cloud Run service.
Next to these you setup Cloud SQL for your operational database, and connect the Cloud Run services with the Cloud SQL connector so they are able to use for read/write queries.

Accessing Azure VNet from Azure Logic App

I have a Logic App and, in my workflow, I need to call a service that is deployed in a vnet. So far my research points me to using API Management to talk to the VNet resource, or to reimplement my workflow as an Azure Function.
Since the resources, blog posts, etc, I am finding are several months-old, I thought I asked you here. Are these indeed the options I have?
Asumming that:
Your VNET is locked down
Your service is an HTTP service (either RESTful or SOAP)
the VNET doesn't allow HTTP calls from outside.
Then you have a couple of options:
Use On-Premises Data Gateway. The OPDG is an agent that you can deploy on a VM in your VNET and would allow you to call HTTP endpoints. You need to create a Custom Connector which uses the OPDG. This is in preview, and unfortunately the documentation is not there yet, but I've implemented it. OPDG has no cost, you pay just for the VM and traffic.
Deploy your APIM within the VNET and deploy App Gateway on top which will allow access from outside the VNET. This requires more work (networking) and you will need to pay more.
Deploy APIM outside the VNET, get your own static IP, and only allow HTTPS traffic from your APIM to your VNET. Some people might not like this option, but you can consider it.
HTH

Deploy and connect build application into Bluemix PaaS?

I already deploy my application with eclipse and built in database (generated from AssestDB of the application). I want now to manage the application and deploy it with IBM bluemix PaaS, to manage Mobile Data.
What is the best DB I must use when coding before deploy into Bluemix?
If you want to configure your local test environment in order to minimize migration problems when deploying your application on Bluemix, you should replicate the target environment on your local one, as much as possible.
If you are planning to use the Mobile Data service on Bluemix please consider that it is built on Cloudant NOSQL Database, and it offers a further layer of abstraction that allows you to directly persist objects (if you are familiar with the concepts of class, object etc..).
You could also directly connect from a local application to a DB service instance running on Bluemix.

how to connect Google App Engine PaaS to DaaS

I want to connect my GAE Java project (Paas) to third party Cloud SQL (DaaS), I just want to know is it possible or not!
Details:
With my basic fundamental knowledge on J2EE I'm doing some hacks onGoogle App Engine (Java) PaaS, since Google cloud-sql for GAE is paid I want connect the GAE to any third party cloud SQL service (DaaS) like nuvola which offers free service for limited time period. Developers pain point is Google Cloud storage/ sql doesn't allow free space for developers unlike other platforms like Parse, kinvey etc will do.
update: URL Fetch API we can do that, I'm not sure it's the right way or not! also URL Fetch API Calls are Outgoing Bandwidth are billable!!
If you want to connect to external systems, the recommended way to integrate with them would be via Web Services.
You have 2 options:
Look out for a Web Service (typical REST with JSON/XML data) for your chosen data service provider in the cloud. You can then integrate your GAE app via URL Fetch API.
There is also a likelihood that your data provider also provides client libraries (Java, Python, etc) which you can easily integrate into your application. That would ease the integration.
App Engine also supports Sockets, but they are currently in Preview and available only for Paid Applications.

Google app engine only as database store

I am currently developing a php application hosted in my server. I want to store the database data in a more secure place rather than my own server. Can I use google app engine only to store and retrieve data without creating a java or python app? If thats possible how can I access data? Using a special service or I can directly connect to db like connecting to a mysql server and execute sql commands lik select, insert etc?
Storing your data on App Engine will not magically grant you extra security. If an attacker compromises your server, they will be able to compromise the interface you have to your datastore and do whatever they wish.
A much better approach would be to learn best-practices for secure web development, and endeavour to ensure your app will not be compromised.
They have a module called remote_api, but it has some restrictions. Check it out:
http://code.google.com/intl/fi-FI/appengine/articles/remote_api.html
There is no direct way to access datastore in App engine. I assume you use mysql or other relational database for your php application. But app engine provide a schemaless object datastore. In that case you need some java or python app for preparing data to store in datastore. Check below links as well.
http://code.google.com/appengine/docs/java/datastore/
https://stackoverflow.com/questions/1466420/google-app-engine-external-database

Resources