並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 31 件 / 31件

新着順 人気順

transactionの検索結果1 - 31 件 / 31件

  • 本当にtransactionは必要なのか? - 急がば回れ、選ぶなら近道

    前提 前提ですが。 transaction=Consistency/Isolationを担保する仕組みの話とする。 一般にtransactionが持つべき属性はACIDと言われる。C/Iに比べて、A/Dが“わかりやすい”のでAtomic/Durableの属性の方が人口に膾炙しているが、現在のtransactionではA/Dネタはあまり話題にならない。A/Dネタはローカルだけで見るのであれば普通にfile system /storageの話になる。元来Atomic/Durableはtransactionのコンテクストでは専らlogging / recoveryの話だった。そして、これは非同期のepoch-basedになるとそれ自体の取り扱い優先度が下がる。現代的なtransactionでは、「現時点ではread committedが保証されているFS/storageでA/Dの問題は(ある程度

      本当にtransactionは必要なのか? - 急がば回れ、選ぶなら近道
    • モジュラモノリスにおけるトランザクション設計の考え方 / transaction design on modular monolith

      モジュラモノリスにおいてトランザクションはどうあるべきなのかについて整理している資料が少ない気付きがあったので「簡易的に」整理しました

        モジュラモノリスにおけるトランザクション設計の考え方 / transaction design on modular monolith
      • ActiveRecord::Base.transaction(joinable: false)を使ってはいけない - SmartHR Tech Blog

        注意喚起の記事になります。タイトルが結論です。 既にこの問題に言及している記事はいくつかあるのですが*1、私は気付かずに踏んでしまったので、タイトルで「おっと、うちは大丈夫かな」と思ってもらえるようにこの記事を書いています。 joinableとは何か 問題として挙げているjoinableオプションですが、これはネストしたトランザクションの挙動に影響を与えます。少しややこしいので、サンプルコードを見せながら説明します。 # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "activerecord", "7.

          ActiveRecord::Base.transaction(joinable: false)を使ってはいけない - SmartHR Tech Blog
        • GitHub - small-tech/jsdb: A transparent, in-memory, streaming write-on-update JavaScript database for Small Web applications that persists to a JavaScript transaction log.

          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

            GitHub - small-tech/jsdb: A transparent, in-memory, streaming write-on-update JavaScript database for Small Web applications that persists to a JavaScript transaction log.
          • 【Laravel】 DB::transaction と クロージャの中身をモックするユニットテスト

            TL;DR クロージャを引数として受け取るメソッドをモックし,かつ渡されたクロージャ内で呼ばれるメソッドもアサートしたい場合は with(\Hamcrest\Core\IsInstanceOf::anInstanceOf(Closure::class)) andReturnUsing(fn (Closure $closure) => $closure()); を使うことで実現できる メソッドチェーンでそれぞれのメソッドをモックする場合は andReturn($user = Mockery::mock(UserContract::class)); のように,メソッドの戻り値を新たにモックし,変数に格納することで,次のメソッドのモックは,前のメソッドの返り値(のモック)を使うことができる はじめに PHP でテストを書く上ではほぼ必須と言って良いおなじみのモックライブラリ Mockery .

              【Laravel】 DB::transaction と クロージャの中身をモックするユニットテスト
            • Serverless Microservices - Saga Transaction - Qiita

              CloudNativeがここまで進化するとインスタンスの仮想化技術をベースとしたシステムなど使いたくなくなってしまいます。 私は新たにシステムを構築する際、必ずServerless Firstの考え方で設計をしていきます。 その中でAWS Lambda、Amazon DynamoDBを中心にMicroservicesの設計をしていくのですが、 ACIDの部分をどう対処するかが一番悩むところです。 今回はServeice間のTransactionに関する話を自分なりに整理していきたいと思います。 図1 Saga Design Pattern Sagaは複数のサービスにまたがるトランザクションを実装するためのマイクロサービスアーキテクチャパターンです。 複数のマイクロサービス間でデータ一貫性を実現するもので、Sagaには2つのパターンがあります。 1. Choreography-based S

                Serverless Microservices - Saga Transaction - Qiita
              • GitHub - starpos/develop-transaction-system: Source code of the book "Develop A Transaction System" (in Japanese).

                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                  GitHub - starpos/develop-transaction-system: Source code of the book "Develop A Transaction System" (in Japanese).
                • マイクロサービスのための新製品「Oracle Transaction Manager for Microservices」を徹底解説

                  オラクルは近々、マイクロサービスアプリケーション向けに「Oracle Transaction Manager for Microservices(以下、TMM)」をリリースする。まず導入としてマイクロサービスに関する課題を説明し、次にTMMの概要やサポート範囲、最後にオラクルの今後の展望を明かす。 マイクロサービスにおける課題、オラクルの解決策 まずはマイクロサービスの対極にある従前のモノリシック(アプリケーション)から確認しよう。これは1つの巨大岩のようなものだ。内部でローカルトランザクションを実行するため、データベースが絶えず更新され、モジュール間には多数の依存関係があり、コードもテーブルも膨大な数を抱えている。巨大な固まりなので、保守の困難さなどさまざまな課題を抱えている。 一方、マイクロサービスはより小さな独立したモジュールで構成されるもので、各モジュールは個別に開発・テスト・デプ

                    マイクロサービスのための新製品「Oracle Transaction Manager for Microservices」を徹底解説
                  • Release 1.0 · starpos/develop-transaction-system

                    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                      Release 1.0 · starpos/develop-transaction-system
                    • Microservice and Transaction Management1 マイクロサービストランザクションの動向 - Qiita

                      はじめに はじめまして。日立製作所 クラウドビジネス推進センタの西谷と申します。ひょんな思い付きから、技術投稿を始めることにしましたので、よろしくお願いします。 今回は、マイクロサービスの最難関とも呼ばれているトランザクション管理について連載していこうと思います。 以下のような連載を考えてますが、LGTMいっぱいくれたら執筆をもっとがんばろうと思います 笑。 マイクロサービストランザクションの動向(今回) トランザクションの原則:ACID特性とCommitment Ordering1 トランザクションの原則:ACID特性とCommitment Ordering2 合意理論からみる2Phase CommitとMicroserviceマイクロサービス 結果整合性は本当に整合するのか ゴール マイクロサービスでトランザクション管理する主流の考え方を大まかに理解する。 マイクロサービスとは何か マ

                        Microservice and Transaction Management1 マイクロサービストランザクションの動向 - Qiita
                      • Amazon Athena Apache IcebergテーブルフォーマットによるACID Transactionを試してみました! #reinvent | DevelopersIO

                        Icebergの強みを活かす INSERT INTOで300万レコードのデータコピー 普通のAthenaのテーブルと比較して、オーバヘッドが生じることが確認できました。上記では、1レコードINSERTでも7秒かかったりしたので、300万レコードをINSERT INTOしたときの時間がどうなるのかを確認したいと思います。 上記のテーブルからパーティションを取り除いて、INSERT INTOでデータのコピー先のテーブルを作成します。 CREATE TABLE iceberg_table ( id int, data string, category string) LOCATION 's3://<mybucket>/iceberg_table/' TBLPROPERTIES ( 'table_type'='ICEBERG', 'format'='parquet', 'compaction_bi

                          Amazon Athena Apache IcebergテーブルフォーマットによるACID Transactionを試してみました! #reinvent | DevelopersIO
                        • 虹ぐらし on Twitter: "【注意喚起】先程クレカ会社から電話があって「Apple Payで今朝3回大きな額の買い物された形跡がありますがあなたですか」と言われたのでいいえと答えると、「ではこのtransactionをキャンセルしますね」と言われ、クレカの有効期限、後ろの3桁の番号を聞かれ、さらに→続く"

                          • Rails 7: with_lockでもtransactionのロック戦略引数を指定可能になった(翻訳)|TechRacho by BPS株式会社

                            概要 元サイトの許諾を得て翻訳・公開いたします。 英語記事: Rails 7 adds optional transaction arguments to with_lock | Saeloun Blog 原文公開日: 2022/03/23 原著者: Murtaza Bagwala サイト: blog.saeloun.com 日本語タイトルは内容に即したものにしました。 コンカレンシーの制御には、具体的には2種類のメカニズムがあります。悲観的ロックと楽観的ロックです。 楽観的ロック 楽観的ロック(optimistic locking)モデルは、複数のユーザーが同じレコードを更新しようとすると、他のユーザーもそのレコードを更新しようとしていることを通知せずに更新を許可するコンカレンシー制御です。レコードの変更は、レコードがコミットされるときにだけバリデーションされます。あるユーザーがレコード

                              Rails 7: with_lockでもtransactionのロック戦略引数を指定可能になった(翻訳)|TechRacho by BPS株式会社
                            • Reinventing the Transaction Script | F# for fun and profit

                              This page contains links to the slides and code from my talk “Reinventing the Transaction Script”. Here’s the blurb for the talk: The Transaction Script pattern organizes business logic as a single procedure. It has always been considered less sophisticated and flexible than a layered architecture with a rich domain model. But is that really true? In this talk, we’ll reinvent the Transaction Scrip

                                Reinventing the Transaction Script | F# for fun and profit
                              • Microservice and Transaction Management3 : 合意理論からみる2Phase CommitとMicroservice - Qiita

                                Microservice and Transaction Management3 : 合意理論からみる2Phase CommitとMicroservicemicroservicesTransactionCAPSAGApaxos はじめに 日立製作所クラウドビジネス推進センタの西谷淳平です。今までの連載の中では、分散トランザクションのACID特性と、その背後に潜む分散トランザクションの原則であるCommitment Orderingに着目し、Microservicesで流行っているSagaデザインパタンの整合性担保能力を語りました。その中で、SagaデザインパタンはIsolationだけではなく、A/Cの特性が失われているという事実を指摘し、その結果としてデータ破壊が起こり得るということを説明しました。 そして、Sagaにおける並行制御機能の欠落を埋めるには2Phase Lockの仕組みを導

                                  Microservice and Transaction Management3 : 合意理論からみる2Phase CommitとMicroservice - Qiita
                                • Well-organized Transaction Script - リファクタリングの妥協的手法 -

                                  設計ナイト2022 Related Links: p.7 https://speakerdeck.com/qsona/developing-masterdata-management-tool-by-using-vscode-extension p.18 https://higayasuo.hatenablog.com/entry/20080519/1211183826 p.30 https://speakerdeck.com/qsona/architecture-decision-for-the-next-n-years-at-studysapuri

                                    Well-organized Transaction Script - リファクタリングの妥協的手法 -
                                  • RailsのTransactionの使い方について - Qiita

                                    はじめに はじめまして。 railsを使用した開発を行っている実務経験1ヶ月のひよっこです。 業務の中でトランザクションの処理の実装を担当させていただく機会がありましたので復習のために投稿させていただきます。 下記投稿の内容は http://markdaggett.com/blog/2011/12/01/transactions-in-rails/ という内容を一部和訳したものとなっています。 対象 railsを触り始めたばかりの初学者向けの内容となっております。もちろん経験者の方大歓迎です。不足している部分や間違っている部分ありましたらご指摘いただけますと大変嬉しいです。 Transactionの目的 複数のSQL文の変更に対して、全てのアクションが成功した際にDBの変更を発生させるという条件を守らせるために使用するのがTransationの目的です。Transactionにより、データ

                                      RailsのTransactionの使い方について - Qiita
                                    • 大量購入を支える 決済トランザクション設計 / EC Payment Transaction Architecture

                                      GMO Developers Night #10 ペパボ EC テックカンファレンス 2020.06.24 https://pepabo.connpass.com/event/179445/

                                        大量購入を支える 決済トランザクション設計 / EC Payment Transaction Architecture
                                      • InnoDBデータベースでmysqldumpする時は、single-transactionとskip-lock-tablesのオプションをつけよう | Masyus Work

                                        MySQLでInnoDBのデータベースをダンプしようとした時の話。 mysqldump -uhogehoge -pfugafuga -h masyus.work > dump.sql シンプルに書くとこんな感じのコマンドになるかと思うが、実はちょっとしたLOCKの罠があったので解説してみる。検証したMySQLバージョンは5.7.26、データベースはInnoDBを使用。 暗黙で--lock-tablesが有効になっている もっと細かく言うと、 --opt というオプションがデフォルトで有効になっている。--optは複数のオプションを一括で有効にするオプションで、詳細は端折るがその複数のオプションの中の1つが--lock-tablesというわけだ。 参考) https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldu

                                          InnoDBデータベースでmysqldumpする時は、single-transactionとskip-lock-tablesのオプションをつけよう | Masyus Work
                                        • Distributed transaction patterns for microservices compared | Red Hat Developer

                                          As a consulting architect at Red Hat, I've had the privilege of working on legions of customer projects. Every customer brings their own challenges but I've found some commonalities. One thing most customers want to know is how to coordinate writes to more than one system of record. Answering this question typically involves a long explanation of dual writes, distributed transactions, modern alter

                                            Distributed transaction patterns for microservices compared | Red Hat Developer
                                          • A comparison of transaction models in distributed document databases

                                            A distributed document database is a NoSQL database that stores semi-structured data, usually in a format similar to JSON, and is horizontally scalable across multiple machines. Document databases are very convenient for modern application development, because modern application frameworks and languages are also based on semi-structured objects instead of tabular data. They are often a better fit

                                              A comparison of transaction models in distributed document databases
                                            • MySQLエラー調査: Table definition has changed, please retry transaction - shallowな暮らし

                                              はじめに こんにちは、id:shallow1729です。小ネタですが、先日”ERROR 1412 (HY000): Table definition has changed, please retry transaction”というエラーに出会ったのでそれの調査をします。MySQL8.0.31をベースにします。 エラーの意味 まずエラーメッセージで調べると以下の公式ドキュメントが出てきました。 https://dev.mysql.com/doc/refman/8.0/en/innodb-consistent-read.html Consistent read does not work over ALTER TABLE operations that make a temporary copy of the original table and delete the original ta

                                                MySQLエラー調査: Table definition has changed, please retry transaction - shallowな暮らし
                                              • 【書き起こし】Payment distributed transaction case study &#8211; Rui Gao【Merpay Tech Fest 2021】 | メルカリエンジニアリング

                                                【書き起こし】Payment distributed transaction case study – Rui Gao【Merpay Tech Fest 2021】 Merpay Tech Fest 2021は、事業との関わりから技術への興味を深め、プロダクトやサービスを支えるエンジニアリングを知れるお祭りで、2021年7月26日(月)からの5日間、開催しました。セッションでは、事業を支える組織・技術・課題などへの試行錯誤やアプローチを紹介していきました。 この記事は、「Payment distributed(分散)transaction case study」の書き起こしです。 Rui Gao氏:皆さん、こんにちは。本日は「Payment distributed(分散)transaction case study」というテーマで発表させていただきます。 まず、簡単に自己紹介させてください

                                                  【書き起こし】Payment distributed transaction case study &#8211; Rui Gao【Merpay Tech Fest 2021】 | メルカリエンジニアリング
                                                • An In-Depth Analysis of Distributed Transaction Solutions

                                                  This article summarizes five distributed transaction solutions and analyzes their features. By Daosu This article summarizes five distributed transaction solutions and analyzes their features: XA Specification, TCC, Saga, Local-Message-Based Distributed Transactions, and Transactional-Message-Based Distributed Transactions. Considering its length, I recommend that you add it to your favorites and

                                                    An In-Depth Analysis of Distributed Transaction Solutions
                                                  • P of EAA: Transaction Script

                                                    Transaction Script Organizes business logic by procedures where each procedure handles a single request from the presentation. For a full description see P of EAA page 110 Most business applications can be thought of as a series of transactions. A transaction may view some information as organized in a particular way, another will make changes to it. Each interaction between a client system and a

                                                    • Go Microservice with Clean Architecture: Transaction Support

                                                      In order to support the transaction in the business layer, I tried to get a Spring like declarative transaction management in Go, but couldn’t find it, so I decided to write one. Transaction is easy to implement in Go, but it is pretty difficult to get it right. ( Please note, there is a new version of it which greatly simplified it and also extracted the transaction code into a third-party lib. T

                                                      • Reinventing the Transaction Script (NDC London 2020)

                                                        The Transaction Script pattern organizes business logic as a single procedure. It has always been considered less sophisticated and flexible than a layered architecture with a rich domain model. But is that really true? In this talk, we'll reinvent the Transaction Script using functional programming principles. We'll see that we can still do domain-driven design, and still have code which is decou

                                                          Reinventing the Transaction Script (NDC London 2020)
                                                        • Blockchain Transaction Visualizer - TxStreet.com

                                                          Cryptocurrency (Bitcoin, Ethereum etc) blockchain live transaction visualizer. Every tx is a person, and they fill up buses which represent blocks.

                                                            Blockchain Transaction Visualizer - TxStreet.com
                                                          • ​UTXO (Unspent Transaction Output) in Crypto Blockchains

                                                            Every blockchain uses different record-keeping methods. In this guide, we will understand the UTXO (Unspent Transaction Output) method that Bitcoin and some other cryptocurrency blockchain networks use. We will also see how it differs from traditional banking systems’ popular account/balance method. What is UTXO? UTXO, or Unspent Transaction Output, is a fundamental concept in cryptocurrency, part

                                                              ​UTXO (Unspent Transaction Output) in Crypto Blockchains
                                                            • MySQL 8.0.20 で導入された binlog transaction compression をハイパー雑に検証する - それが僕には楽しかったんです。

                                                              はじめに 前提環境と検証方法 リリースノートの文献 やってみた perfomance_shema をみてみる 余談 さいごに 2020/04/29 4:42 2020/04/29 11:43 2020/04/29 12:08 はじめに どうも、共通新人研修がビジネス職よりで割とコードとか書いている暇がなかったけんつです。 今週からはエンジニアの研修で RFC と格闘することが強制されて息を吹き返してます。 MySQL 8.0.20 がリリースされて、めちゃくちゃ気になったのが binlog 圧縮。 他にも検証をしていたのだけど、なんか急に気になったので全てを放り投げて調べてみたくなった。 zstd というアルゴリズムを用いて binlog を可逆圧縮する機能が追加になったので、どれだけ圧縮されるのか調べてみた。 MySQL の運用に関わったことがなく、完全に趣味で追っているので binlo

                                                                MySQL 8.0.20 で導入された binlog transaction compression をハイパー雑に検証する - それが僕には楽しかったんです。
                                                              • Firestoreのtransactionの使いどころと使い方

                                                                この記事は Firestoreのtransaction(以下、トランザクションと表記)の機能と、具体例を用いたJavaScriptのコードとセキュリティルールの書き方を紹介します。 対象読者 "トランザクション"という言葉になじみのない初心者向けの内容が中心です。 後半のトランザクション使用時のセキュリティルールの書き方は、中級者にも参考になるかと思います。 環境 firebase: 9.1.3 react: 17.0.2 Firestoreのトランザクションを構成する要素 Firestoreのトランザクションには大きく2つの要素が含まれています。 複数ドキュメントの一括書き込み ドキュメントのロック(排他制御) それぞれどのようなものか、みていきましょう。 複数ドキュメントの一括書き込み 複数ドキュメントの一括書き込みとは、複数のドキュメントを書き込むとき、すべてのドキュメントが書き込ま

                                                                  Firestoreのtransactionの使いどころと使い方
                                                                1