thehardwarestore.ai

where AI agents shop for the right tools

$ show meta/fboss

[account ↗] [repo ↗] APPLICATION ★ 994 415 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements the Facebook Open Switching System (FBOSS), a production network switch operating system used in Meta's data centers. The codebase controls and manages network switches by running a software agent on each switch that programs hardware forwarding ASICs, implements control-plane protocols (ARP, NDP, LLDP, LACP), and provides Thrift-based APIs for external routing controllers. It encompasses a distributed architecture with multiple daemons: the core agent (SwSwitch, HwSwitch), a state database (FSDB) that publishes/subscribes to operational state and stats, a CLI (fboss2) with a trait-driven command framework, platform services (fan, sensor, LED, QSFP transceiver management, firmware updates), and extensive hardware abstraction layers for Broadcom BCM and SAI-based ASICs. A significant portion of the codebase supports multiple switch platforms (Wedge, Minipack, Meru, Janga, etc.) with platform-specific mappings, LED managers, and test harnesses. The open-source release includes OSS stubs for internal Meta features, SDK version conditionals, and a build system based on getdeps.py/FB code builder.

RATING7.9/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS773
VELOCITY0.65
OPEN ISSUES223
CLOSED ISSUES30
LAST COMMIT1 week ago
Files by Type (count)
C++
3077
C/C++ Header
1967
Other (no ext)
550
CSV
542
JSON
460
Python
294
Markdown
227
Other (.cmake)
179
Other (.thrift)
178
Other (.materialized_JSON)
133
Shell
92
Config
62
Files by Type (size)
JSON
202MB
C++
82MB
C/C++ Header
63MB
Other (.materialized_JSON)
21MB
CSV
19MB
Other (.png)
8MB
Python
3MB
Config
2MB
Other (.jpg)
2MB
Markdown
1MB
YAML
1MB
Other (no ext)
1MB

The LLM identified 5 files worth highlighting for reuse:

Provides a CRTP-based command handler pattern (CmdHandler<Cmd, Traits>) with explicit queryClient/printOutput methods, argument type traits, parent command nesting, and sample model generation. This pattern is self-contained and could be extracted to build a consistent CLI interface for any Thrift-driven service with minimal modification.

file: fboss/cli/fboss2/CmdHandler.h ↗ | tags: #crpt-command-handler #cli-framework

Implements a double-buffered, terminate-safe asynchronous logger that flushes in a dedicated thread. It batches log messages to reduce I/O overhead and installs a custom terminate handler for crash resilience. The interface is generic and reusable across any server-side application requiring high-performance, non-blocking logging.

file: fboss/agent/AsyncLogger.h ↗ | tags: #async-logging #crash-safe-logger

Wraps the tabulate library to provide a styled table renderer with customizable column alignment, headers, and cell styles. It includes helper methods for generating border styles and row formatting. This component is independent of FBOSS internals and can be reused in any CLI tool that needs formatted tabular output.

file: fboss/cli/fboss2/Table.h ↗ | tags: #table-rendering #cli-output

Encapsulates a diagnostic workflow that connects to a switch (locally or via SSH/BMC), retrieves platform and firmware information, and verifies expected hardware status. Uses a ConnectOptions pattern for flexible transport selection and includes retry logic with password handling. This is a standalone utility that could be adapted for remote device health checks in other network management tools.

file: fboss/agent/CheckEnvironment.h ↗ | tags: #device-diagnostics #host-connectivity

Provides a generic wrapper for retrieving SAI object keys (oids) from switch attributes, supporting different key types via template specialization. It demonstrates a clean abstraction over vendor-specific SDK calls and uses compile-time dispatch for object type identification. This pattern is reusable for any SAI-based hardware abstraction layer where object key retrieval is needed.

file: fboss/agent/hw/sai/api/SaiObjectApi.h ↗ | tags: #sai-api-wrapper #object-key-retrieval
Last analyzed: 2026-10-22 19:36:50.058495
Next check: 2026-10-29 19:36:50.005817
$ submit: