[rust] How to use shared memory between wasm and js?
- summary: rustwasm/wasm-bindgen#2225
- example: https://github.com/Ciantic/rust-shared-wasm-experiments
1つのアプリケーションを機能別にAPIとして切り出したもの。大規模化・複雑化が進むにつれ、開発コストおよび新規メンバーの参入コストが高くなるため、2014年頃から流行りだした。対して、もともとの1枚岩のアプリケーションはmonolithicと呼ばれる。日本だとモノリスとも言われる。
小さくなったのは良いが、「連携設定」「APIのセキュリティ」「リトライ処理」などコストが増した。また、個数の増加に伴い、新しいMSを追加したときの影響範囲も分かりづらく、それらを解消するために「監視体制」「サーキットブレイク」なども必要となり、複雑性を増していった。
private def current_environment_from_env
ENV["SENTRY_ENVIRONMENT"]? || "default"
private def detect_release_from_env
ENV["SENTRY_RELEASE"]?
Let's consider some value holder. For example, Try monad. For simplicity, Let's assume it only works with Int32
.
record Success, value : Int32
record Failure, value : Exception
# some try object
try : Success | Failure = Success(1)
Use the interface to prevent missing documents.
class SomeLib
module Interface
abstract def foo : String
abstract def bar : String
Int
→ Array(Time)
)$ fdisk -l
...
Disk /dev/vdb: 2 TiB, 2147483648000 bytes, 4194304000 sectors
...
Thousands (or even tens of thousands) of queues should be no problem at al
a ?? b # => a.typical_zero? ? b : a
def T#typical_zero?
self == T.typical_zero
def T.typical_zero
nil