What objects can/should be shared/reused?

オープン
#166 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
azure, node.js, sql, typescript

調査の方向性

既存の client/session/operation のライフサイクルに関するガイダンスと、issue に記載された hello-world シーケンスから始め、次に Azure Functions HTTP-trigger シナリオと比較します。各オブジェクトがいつ完了するのか、何を再利用できるのか、要求されている cleanup と再初期化の動作を文書化し、ガイダンスが singleton に関する質問に回答していることを確認します。

索引モデルが issue の本文から書いたものです。

説明

question

Reading through and the documentation doesn't seem to be clear on how to handle long running processes that fetch data at intervals over time.

The "hello world" paradigm that we see here:

  1. Get a client
  2. Get a session from the client
  3. Perform an operation on the session
  4. Close the operation
  5. Close the session
  6. Close the client

If we have something like an http trigger in an Azure functions instance, what can be reused:

  • Can we share a client as a singleton, or do we need a new one for each http request that comes in and executes a query?
  • Can we share a session as a singleton, or do we need a new one for each http request that comes in and executes a query?

If resources can be used as singletons, what's the recommended error handling to make sure that they get cleaned up & reinitialized if there's an error?

The only guidance is just
"After you finish working with the operation, session or client, it is better to close it, each of them has a respective method (close())."

The basic question here: at what point do we consider ourselves "finished" working with each object?

主要言語
TypeScript
スター
36
フォーク
50
平均マージ
13時間 46分
マージ済み PR(30日)
9

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

databricks/databricks-sql-nodejs のほかの issue

databricks/databricks-sql-nodejs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。