Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

View debasishg's full-sized avatar
🏠
Working from home

Debasish Ghosh debasishg

🏠
Working from home
Programmer at large. Author: Functional and Reactive Domain Modeling (Manning 2016), DSLs In Action (Manning 2010). Father. Husband. Seinfeld fanboy
View GitHub Profile

A study on how the Model Context Protocol (MCP) compares to traditional control plane architectures for orchestrating agentic applications. It contains the technical differences, expert and community opinions, and examines any evidence of real-world adoption or use cases for both approaches.

Introduction

TheModel Context Protocol (MCP) is a recently proposed open standard (originating from Anthropic) that defines how AI models (especially LLM-based agents) connect to external tools and data sources in a consistent way. By contrast,traditional “control plane” architectures in agentic AI refer to custom or framework-based orchestrators that manage how one or multiple AI agents invoke tools, coordinate tasks, and enforce policies. This report compares MCP with traditional control-plane designs for orchestrating agentic applications, focusing on technical differences in architecture and communicat

@debasishg
debasishg /dod.md
Last activeDecember 17, 2025 05:40
Data oriented design, hardware awareness, cache awareness in data structures & algorithms
@debasishg
debasishg /fix.md
CreatedSeptember 30, 2024 16:10
fix for error in cargo build with rdkafka

The error you're encountering seems to occur during the build process forlibrdkafka, which is being built and linked statically as part of your Rust project that uses therdkafka crate. Here's a breakdown of possible causes and solutions:

This error suggests that the build process is hitting some system resource limits, possibly related to the number of parallel jobsmake is trying to run. The default behavior ofmake is to run jobs in parallel, which can sometimes overwhelm system resources.

Solution:Try limiting the number of jobsmake runs in parallel by setting theMAKEFLAGS environment variable:

export MAKEFLAGS="-j1"
#[derive(Debug)]
enumMyError{
Io(std::io::Error),
Parse(pest::error::Error<Rule>),
}
#[derive(Debug)]
structStoreError(MyError);
impl std::fmt::DisplayforStoreError{
@debasishg
debasishg /trait_bound.md
Last activeJanuary 23, 2024 05:51
Rust Idiom (Trait Bounds)

Trait bounds in Rust are really powerful and also offers lots of idiomatic ways to constrain your model. Bounds are for enforcing constraints even in other languages like Scala, but Rust offers them at a different level.

Here's one example from the book Rust for Rustaceans (a great book BTW).

Suppose you want to construct aHashMap<K, V, S>, whose keys are some generic typeT, value is ausize, you can write bounds likeT: Hash + Eq,S: BuildHasher + Default.

pubfndoit<T>(value:T)
@debasishg
debasishg /ocaml-domain-modeling.md
Last activeFebruary 27, 2025 04:22
OCaml domain modeling

One of my favorite comments on abstraction and parametricity ..

Parametricity can be thought of as the dual to abstraction. Where abstraction hides details about an implementation from the outside world, parametricity hides details about the outside world from an implementation.

When using OCaml as the implementation language, you abstract usingADTs (Abstract Data Types) and make your abstraction parametric usingfunctors. And bind all of the algebras together usingModules.

Abstraction

(* Modules - the signature of functions and types with no
implementation whatsoever. Pure interfaces.*)
module typeOrderedType=sig
typet
valcompare :t ->t ->int
end
(* Note we don't specify any representation for the implementation of a
[heap]. Just the facts that define a heap - an ordered element, an
abstract type and a bunch of functions*)
@debasishg
debasishg /exists.ml
CreatedOctober 12, 2023 16:47— forked fromjonsterling/exists.ml
existential quantifier in OCaml
(* an abstract signature for instantiations of the existential quantifier*)
module typeEXISTS=
sig
(* the predicate*)
type'a phi
(* the existential type*)
typet
(* the introduction rule*)
@debasishg
debasishg /algebraic.md
Last activeOctober 26, 2023 23:11
a brief intro to algebraic domain modeling

When we talk about the algebra of an operation, we talk about the signature of the operation, and how, starting from the input, we can just "follow the types" to lead to the implementation of that operation.

Consider the following operationgenerateTrades as part of a domain serviceTradingService. The idea is to generate all trades that happened on the day (input to the operation) and executed by the user (input to the operation) in the back-office of a securities trading organization.

In the example below, note the following 2 principles that form the core of the algebraic modeling:

  1. The sequence of steps mentioned in the specification of the method as comments and correspond one-to-one to thetypes of the operations used in implementinggenerateTrades. I have annotated the steps in the implementation below.
  2. The implementation ofgenerateTrades iscompletely decoupled from the implementation of the operations likequeryExecutionsForDate, `getAccountNoF
NewerOlder

[8]ページ先頭

©2009-2025 Movatter.jp