Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# New Video - https://youtu.be/J6YVX7E5QPE
# New Video - https://youtu.be/wP1wz6MhxcI

[<img src="assets/263.png?raw=true">](https://youtu.be/J6YVX7E5QPE)
[<img src="assets/264.png?raw=true">](https://youtu.be/wP1wz6MhxcI)

# Consulting

Expand Down
Binary file removed assets/263.png
Binary file not shown.
Binary file added assets/264.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,4 @@
- [256 - Terraform AWS VPC Tutorial - Public, Private, and Isolated Subnets](../lessons/256)
- [258 - Redis vs Valkey performance](../lessons/258)
- [259 - Rust vs C++ Performance: Can Rust Actually Be Faster?](../lessons/259)
- [260 - ZeroMQ vs Aeron: Best for Market Data? Performance (Latency & Throughput)](../lessons/260)
3 changes: 3 additions & 0 deletions lessons/247/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Actix vs Axum vs May vs Ntex

Actix vs Axum vs Rocket vs Warp
15 changes: 15 additions & 0 deletions lessons/247/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
services:
postgres:
image: postgres:17.6
ports:
- 5432:5432
environment:
POSTGRES_USER: myapp
POSTGRES_DB: store
POSTGRES_PASSWORD: devops123
networks:
- private

networks:
private:
42 changes: 21 additions & 21 deletions lessons/247/may-app/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions lessons/247/may-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "may-app"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
mimalloc = { version = "0.1", default-features = false }
may = { version = "0.3", default-features = false }
mimalloc = { version = "0.1.48", default-features = false }
may = { version = "0.3.51", default-features = false }
may_minihttp = "0.1"
may_postgres = { git = "https://github.com/Xudong-Huang/may_postgres.git", default-features = false }
num_cpus = "1.16"
serde = {version = "1.0", default-features = false }
serde_json = {version = "1.0", default-features = false }
may_postgres = { git = "https://github.com/Xudong-Huang/may_postgres", default-features = false }
num_cpus = "1.17.0"
serde = { version = "1.0.219", default-features = false }
serde_json = { version = "1.0.143", default-features = false }
yarte = { version = "0.15", features = ["bytes-buf", "json"] }
buf-min = { version = "0.7", features = ["bytes"] }

Expand Down
22 changes: 22 additions & 0 deletions lessons/264/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ZeroMQ vs Aeron: Best for Market Data? Performance (Latency & Throughput)

You can find tutorial [here](https://youtu.be/wP1wz6MhxcI).

## Commands

```bash
/usr/local/bin/aeronmd \\
-Daeron.threading.mode=DEDICATED \\
-Daeron.conductor.buffer.size=16m \\
-Daeron.driver.event.log=disabled \\
-Daeron.driver.idle.strategy=busy_spin \\
-Daeron.print.configuration=true

## 1st Test
CHANNEL="aeron:udp?endpoint=10.0.89.94:40123" SLEEP_INTERVAL_US="2000" STAGE_INTERVAL_US="2000000" DECREMENT_INTERVAL_US="1" /usr/local/bin/aeron-publisher
CHANNEL="aeron:udp?endpoint=10.0.89.94:40123" /usr/local/bin/aeron-subscriber

# 2nd Test
CHANNEL="tcp://*:5555" SLEEP_INTERVAL_US="2000" STAGE_INTERVAL_US="2000000" DECREMENT_INTERVAL_US="1" /usr/local/bin/zeromq-publisher
CHANNEL="tcp://10.0.65.17:5555" /usr/local/bin/zeromq-subscriber
```
57 changes: 57 additions & 0 deletions lessons/264/app/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Generated from CLion C/C++ Code Style settings
---
Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -4
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: false
AlwaysBreakTemplateDeclarations: Yes
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBraces: Custom
BreakConstructorInitializers: AfterColon
BreakConstructorInitializersBeforeComma: false
ColumnLimit: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ContinuationIndentWidth: 8
IncludeCategories:
- Regex: '^<.*'
Priority: 1
- Regex: '^".*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentWidth: 4
InsertNewlineAtEOF: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeRangeBasedForLoopColon: false
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
TabWidth: 4
83 changes: 83 additions & 0 deletions lessons/264/app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Specify the minimum required CMake version
cmake_minimum_required(VERSION 3.28)

# Define the project
project(app
VERSION 0.1.0
DESCRIPTION "App to test Aeron and ZeroMQ."
LANGUAGES CXX
)

# Set C++ standard to C++20 for all targets
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# For Aeron
add_definitions(-DAERON_COMPILER_MSVC=1)

# Add executable
add_executable(aeron-publisher src/aeron-publisher.cpp)
add_executable(aeron-subscriber src/aeron-subscriber.cpp)
add_executable(zeromq-publisher src/zeromq-publisher.cpp)
add_executable(zeromq-subscriber src/zeromq-subscriber.cpp)

# Add libraries
add_library(utils STATIC src/utils/utils.hpp src/utils/utils.cpp)

# Include directories for external dependencies
include_directories("/usr/local/include")

# Set VCPKG triplet based on platform
if (APPLE)
set(VCPKG_TARGET_TRIPLET "arm64-osx")
elseif (UNIX AND NOT APPLE)
set(VCPKG_TARGET_TRIPLET "x64-linux")
endif ()

# Find external dependencies
find_package(spdlog CONFIG REQUIRED)
find_package(cppzmq CONFIG REQUIRED)
find_package(prometheus-cpp CONFIG REQUIRED)

# Link libraries
target_link_libraries(utils
PRIVATE
prometheus-cpp::core
prometheus-cpp::pull
prometheus-cpp::util
)

target_link_libraries(aeron-publisher
PRIVATE
utils
spdlog::spdlog
/usr/local/lib/libaeron_client.a
)

target_link_libraries(aeron-subscriber
PRIVATE
utils
prometheus-cpp::core
prometheus-cpp::pull
prometheus-cpp::util
spdlog::spdlog
/usr/local/lib/libaeron_client.a
)

target_link_libraries(zeromq-publisher
PRIVATE
utils
spdlog::spdlog
cppzmq-static
)

target_link_libraries(zeromq-subscriber
PRIVATE
utils
prometheus-cpp::core
prometheus-cpp::pull
prometheus-cpp::util
spdlog::spdlog
cppzmq-static
)
13 changes: 13 additions & 0 deletions lessons/264/app/CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 2,
"configurePresets": [
{
"name": "vcpkg",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
]
}
12 changes: 12 additions & 0 deletions lessons/264/app/CMakeUserPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 2,
"configurePresets": [
{
"name": "default",
"inherits": "vcpkg",
"environment": {
"VCPKG_ROOT": "$env{HOME}/devel/vcpkg"
}
}
]
}
Loading