🍣
Matsuri-tech Backend Weekly 2023-05-08

myuon

myuon

2023年5月8日
MBW

社内向けに、バックエンド関連のニュースや業務で発生したQ&A、利用しているライブラリなどの情報を定期的に書いています。

社内向けに、バックエンド関連で気になったニュースや業務で利用しているソフトウェアなどのリリース情報などを発信していきます。

# Rust 1.69.0のリリース

Announcing Rust 1.69.0 | Rust BlogEmpowering everyone to build reliable and efficient software.Announcing Rust 1.69.0 | Rust Blog

Rust 1.69.0がリリースされました。

1.29.0に入った cargo fix コマンドが、思ったほど使われていないからなのか警告メッセージに明記されるようになったのは面白いと思います。 かく言う筆者も使ったことはないコマンドなので、これを機に積極的に使っていこうと思います。

# Mojoのアナウンス

Mojo 🔥: Programming language for all of AIMojo combines the usability of Python with the performance of C, unlocking unparalleled programmability of AI hardware and extensibility of AI models.Mojo 🔥: Programming language for all of AI

新しいプログラミング言語Mojoがアナウンスされました。 Pythonと互換性のある言語で、パフォーマンス、特に並列処理あたりを強く意識した設計のようです。

いくつか新規の文法要素なども追加しており、近年のAltJSを始めとする、「既存の流行っている言語と互換性を持たせつつ改善した処理系を提供する」という流れに沿った言語かなと感じました。 また、個人的にはMLIRを内部的に使っているのはかなり面白い&先進的な取り組みだなと思いました。Low-level IR in Mojoなどを参照

現状はまだWaitlist状態でGAではありませんが、話題になったため取り上げてみました。

# Vercel Storageの発表

Introducing storage on Vercel – VercelNew to the Vercel dashboard: Vercel KV, Vercel Postgres, and Vercel BlobIntroducing storage on Vercel – Vercel

(バックエンドではなくフロントのニュースですが、関係ありそうなのでこちらにも…)

Vercelがストレージ関連サービスをいくつかリリースしました。Vercel KV、Vercel Postgres、Vercel Blobなどです。 Vercelはいよいよフロントエンドのホスティングサービスからクラウドサービスプラットフォームになろうとしているという印象があります。

KVはCloudflare Workers KVあたりの競合になりそうですが、PostgresやBlobがあるのはかなり面白いと思います。 実際にmBaaSを使いたい場面でRDBやオブジェクトストレージが必要になる場面での選択肢は Supabase くらいしか知りませんでしたが、うまくいけばこの界隈で覇権を握る可能性を秘めていると思います。

本格的なWebアプリ開発がVercelで全て完結する未来もそう遠くはないかもしれません。

# AWS NEWS

ここ1ヶ月くらいのニュースで気になったものをいくつかピックアップします。

# RekognitionのDetectFaces APIで顔が隠れている状態を検出できるようになった

Amazon Rekognition launches face occlusion detection to improve identity verification accuracyAmazon Rekognition launches face occlusion detection to improve identity verification accuracy

Amazon Rekognitionの顔検出APIが、顔が別のオブジェクトなどで隠れているかどうかをレスポンスに含めてくれるようになりました。

ドキュメントによると、以下のようにFaceOccluded propertyにbooleanとその信頼度が含まれるようになっています。 これにより、人の顔写真を撮ってもらうサービスで顔が隠れていたら撮り直させる、などの使い方ができるようです。

      "FaceOccluded": {
        "Value": true,
        "Confidence": 99.99726104736328
      }

# S3のデフォルトの設定が変わってBlock Public Accessが使われるようになった

Amazon S3 now applies two security best practices to all new buckets by defaultAmazon S3 now applies two security best practices to all new buckets by default

以前からも告知されていましたが、新規のS3バケットに関してACLは廃止になり、S3 Block Publick Accessという仕組みが使われるようになりました。 以下のブログに詳細があります。

Heads-Up: Amazon S3 Security Changes Are Coming in April of 2023 | Amazon Web ServicesUpdate (4/27/2023): Amazon S3 now automatically enables S3 Block Public Access and disables S3 access control lists (ACLs) for all new S3 buckets in all AWS Regions. Starting in April of 2023 we will be making two changes to Amazon Simple Storage Service (Amazon S3) to put our latest best practices for bucket security into […]Heads-Up: Amazon S3 Security Changes Are Coming in April of 2023 | Amazon Web Services

# Amazon Connectで日本の無料通話(フリーダイヤル?)の料金が下がった

Amazon Connect reduces Japan toll-free inbound minute rateAmazon Connect reduces Japan toll-free inbound minute rate

Amazon Connectで日本のフリーダイヤルとの通話で料金が46%下がったそうです。 toll-freeというのはおそらく0120から始まるフリーダイヤルのことを指しているのではないかと思うのですが、このように各国のフリーダイヤルに特別対応などしているのは面白いなと思って取り上げました。

# Amazon製のCode AI: CodeWhispererの公開

Amazon CodeWhisperer is now generally availableAmazon CodeWhisperer is now generally available

AI Code Generator - Amazon CodeWhisperer - AWSAI Code Generator - Amazon CodeWhisperer - AWS

AmazonはCodeGuruなど、コード関連のAIも以前からやっている印象でしたが、Copilotの対抗と思われるCodeWhispererを公開しました。

Code Security Scanなどのユニークな機能もあるようです。

# Lambdaがresponse payload streamingに対応

AWS Lambda introduces response payload streamingAWS Lambda introduces response payload streaming

Introducing AWS Lambda response streaming | Amazon Web ServicesToday, AWS Lambda is announcing support for response payload streaming. Response streaming is a new invocation pattern that lets functions progressively stream response payloads back to clients. You can use Lambda response payload streaming to send response data to callers as it becomes available. This can improve performance for web and mobile applications. Response streaming […]Introducing AWS Lambda response streaming | Amazon Web Services

Lambdaからレスポンスを返す際に、paylaodをstreamingにできるようになりました。 これにより巨大なデータを返す際にTTFBを短くできたりするようです。

現状ではNode14系のみの対応で、以下のようにawslambdaパッケージを使う必要がありそうです。

exports.handler = awslambda.streamifyResponse(
    async (event, responseStream, context) => {
        responseStream.setContentType(“text/plain”);
        responseStream.write(“Hello, world!”);
        responseStream.end();
    }
);

ドキュメントに名言はされていませんが、背景にはChatGPTなどのAIサービスで軒並みレスポンスをstreamで返していることなども影響しているのかなと感じています。

# OpenSearch ServiceでMulti-AZ with Standbyデプロイに対応

AWS announces Multi-AZ with Standby for Amazon OpenSearch ServiceAWS announces Multi-AZ with Standby for Amazon OpenSearch Service

端的にいうと新しいデプロイタイプの追加です。説明によると1インスタンスがスタンバイとして起動し、フェイルオーバー時にスタンバイインスタンスに切り替わるなどの処理を行うようです。 以前はOpenSearch Serviceではインスタンスの管理をこちらで行う機能が存在せず、障害が起きたとしても自由に再起動なども難しかったためこのような機能が追加されるのはありがたいです。

以下に詳細があります。

Configuring a multi-AZ domain in Amazon OpenSearch Service

# RDS for PostgreSQLがpgvector拡張に対応

Amazon RDS for PostgreSQL now supports pgvector for simplified ML model integrationAmazon RDS for PostgreSQL now supports pgvector for simplified ML model integration

生成AIなどで最近話題のembedding用のDBですが、pgvectorをサポートしました。 やはりAWSも最近の生成AIブームをかなり意識しているようです。

# その他のニュース

多すぎてもあれなので、以下にまとめます。