codingecho

日々の体験などを書いてます

Cloud Dataflow

GAE, GKE と Cloud Dataflow を比較する

やりたかったこと リクエストするためにREST APIを使用したいリクエストはほとんど 0 req/sec だが1日に数度 50 req/sec ぐらいになるプロジェクトには専属の開発や運用をする人はいないGoogle Cloud Platformを使いたい TL;DR やりたかったことにフィットし…

Apache Beamで自作パッケージを使う方法

Cloud Dataflow pipeline上で自作パッケージを使う場合は setup.py を作成して --setup-file オプションで指定しなければなりません。 以下のようなディレクトリ構成で main.py が my-package に依存していたとします。 Dataflow |- my-package/ |- helper.p…

Google Cloud Dataflow上でReadFromDatastoreを使わずにCloud Datastoreからデータを取得する

TL;DR google-cloud-datastoreの代わりにCloud Datastore’s helper methodを使用する。 より詳しく Apache Beam pipelineのインスタンスを作る直前にCloud Datastoreからデータを取得したいと思い ReadFromDatastore を Cloud Dataflow上のapache_beam.io.gc…

Compare GAE, GKE and Cloud Dataflow

Requirements for us Use REST API for receiving requestsRequests a system we are developing spike up about 50 req/sec or almost 0 req/secThe project doesn't have a developer or operator exclusivelyWe use Google Cloud Platform TL;DR We decid…

Run Apache Beam process with local dependency

If you run Cloud Dataflow pipeline with some your local package, you must create setup.py and specify --setup-file option. Assume that you have a directory structure like below and main.py depends on under the my-package packages. Dataflow…

Read data from Google Cloud Datastore without ReadFromDatastore On Google Cloud Dataflow

TL;DR Use Cloud Datastore's helper method instead of google-cloud-datastore. More Details I wanted to read data from Datastore before running an Apache Beam's pipeline that uses ReadFromDatastore from apache_beam.io.gcp.datastore.v1.datast…