Compare commits
18 Commits
2bcc74ed8c
...
cuddle-ple
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
67d57f2b54 | ||
| 489b30e028 | |||
| 430240d751 | |||
| 707d1e2263 | |||
| d0bd8b938f | |||
| 6f3a5129bd | |||
| 68c9820aae | |||
| e44cb6dd23 | |||
| 6aa881048c | |||
| 5356303e7b | |||
| 1bd6fc06c5 | |||
| f342e3c0df | |||
| 25182f14c1 | |||
| 9a72f2f6c2 | |||
| 2352c00736 | |||
|
089c1d502f
|
|||
|
8b24dc23e0
|
|||
|
7510c9a333
|
67
CHANGELOG.md
Normal file
67
CHANGELOG.md
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Changelog
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.1.0] - 2025-03-06
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- with updated notmad
|
||||||
|
- added please and release
|
||||||
|
- change order of grpc host
|
||||||
|
- add replicas 1
|
||||||
|
- add s3 and deployment
|
||||||
|
- add prometheus and protobuf messages
|
||||||
|
- increase size of index
|
||||||
|
- add indexes
|
||||||
|
- set notification to 4mb
|
||||||
|
- add storage backend
|
||||||
|
- remove more partitions
|
||||||
|
- cleanup
|
||||||
|
- remove keys and ids
|
||||||
|
- working dagger engine
|
||||||
|
- should listen on public endpoint
|
||||||
|
- with sdk
|
||||||
|
- with dagger engine
|
||||||
|
- do cleanup
|
||||||
|
- add broker setup
|
||||||
|
this is mainly to decouple the actual sending of events, from the ingest.
|
||||||
|
|
||||||
|
we now ingest the data, and update consumer groups with the new offset. Consumer groups now in the background continously send out data from the update. they tick 1 second between checks, but if something takes long than a second, the next run just continues from where we left off
|
||||||
|
- update
|
||||||
|
- add basic streaming data
|
||||||
|
- add ingest layer
|
||||||
|
- extract handler
|
||||||
|
- add offset to consumers
|
||||||
|
- add complexity
|
||||||
|
- added v1 files
|
||||||
|
- add operations endpoint to get topics
|
||||||
|
- add staging
|
||||||
|
- add data ingest
|
||||||
|
- add docs
|
||||||
|
- add base
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- *(deps)* update aws-sdk-rust monorepo
|
||||||
|
- *(deps)* update rust crate aws-sdk-s3 to v1.76.0
|
||||||
|
- *(deps)* update aws-sdk-rust monorepo
|
||||||
|
- *(deps)* update aws-sdk-rust monorepo
|
||||||
|
- *(deps)* update rust crate aws-sdk-s3 to v1.70.0
|
||||||
|
- *(deps)* update aws-sdk-rust monorepo
|
||||||
|
- *(deps)* update aws-sdk-rust monorepo
|
||||||
|
- *(deps)* update rust crate serde to v1.0.216
|
||||||
|
- *(deps)* update rust crate aws-sdk-s3 to v1.65.0
|
||||||
|
- *(deps)* update rust crate aws-sdk-s3 to v1.63.0
|
||||||
|
- *(deps)* update rust crate serde to v1.0.215
|
||||||
|
- *(deps)* update all dependencies
|
||||||
|
- offset be inclusive end
|
||||||
|
|
||||||
|
### Other
|
||||||
|
- *(deps)* update tokio-prost monorepo to v0.13.5
|
||||||
|
- *(deps)* update tokio-prost monorepo to v0.13.4
|
||||||
|
- *(deps)* update rust crate tracing-subscriber to v0.3.19
|
||||||
|
- *(deps)* update rust crate tracing to v0.1.41
|
||||||
|
- into files
|
||||||
841
Cargo.lock
generated
841
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,11 @@
|
|||||||
members = ["crates/*"]
|
members = ["crates/*"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
[workspace.package]
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
nodata-storage = { path = "crates/nodata-storage" }
|
nodata-storage = { path = "crates/nodata-storage", version = "0.1.0" }
|
||||||
|
|
||||||
anyhow = { version = "1" }
|
anyhow = { version = "1" }
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
@@ -12,9 +15,9 @@ tracing-subscriber = { version = "0.3.18" }
|
|||||||
clap = { version = "4", features = ["derive", "env"] }
|
clap = { version = "4", features = ["derive", "env"] }
|
||||||
dotenv = { version = "0.15" }
|
dotenv = { version = "0.15" }
|
||||||
axum = { version = "0.7" }
|
axum = { version = "0.7" }
|
||||||
drift = { git = "https://github.com/kjuulh/drift", branch = "main" }
|
nodrift = { version = "0.2.0" }
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
tonic = "0.12.1"
|
tonic = { version = "0.12.3", features = ["tls", "tls-roots"] }
|
||||||
bytes = "1.7.1"
|
bytes = "1.7.1"
|
||||||
prost = "0.13.1"
|
prost = "0.13.1"
|
||||||
prost-types = "0.13.1"
|
prost-types = "0.13.1"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nodata-storage"
|
name = "nodata-storage"
|
||||||
version = "0.1.0"
|
version.workspace = true
|
||||||
|
description = "nodata storage is the backend that serves the nodata message broker, it allows storing data in many different types of backends"
|
||||||
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
name = "nodata"
|
name = "nodata"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
description = "nodata is a kafka like message broker that is simple and easy to use, while relying on either local or s3 like data storage for consistency"
|
||||||
|
license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
nodata-storage.workspace = true
|
nodata-storage.workspace = true
|
||||||
@@ -13,17 +15,10 @@ tracing-subscriber.workspace = true
|
|||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
dotenv.workspace = true
|
dotenv.workspace = true
|
||||||
axum.workspace = true
|
axum.workspace = true
|
||||||
drift.workspace = true
|
nodrift.workspace = true
|
||||||
uuid.workspace = true
|
uuid.workspace = true
|
||||||
|
|
||||||
serde = { version = "1.0.197", features = ["derive"] }
|
serde = { version = "1.0.197", features = ["derive"] }
|
||||||
sqlx = { version = "0.8.0", features = [
|
|
||||||
"runtime-tokio",
|
|
||||||
"tls-rustls",
|
|
||||||
"postgres",
|
|
||||||
"uuid",
|
|
||||||
"time",
|
|
||||||
] }
|
|
||||||
tower-http = { version = "0.6.0", features = ["cors", "trace"] }
|
tower-http = { version = "0.6.0", features = ["cors", "trace"] }
|
||||||
tokio-util = "0.7.11"
|
tokio-util = "0.7.11"
|
||||||
tonic.workspace = true
|
tonic.workspace = true
|
||||||
@@ -34,7 +29,7 @@ chrono = { version = "0.4.38", features = ["serde"] }
|
|||||||
tokio-stream = "0.1.15"
|
tokio-stream = "0.1.15"
|
||||||
dagger-sdk = "0.13.0"
|
dagger-sdk = "0.13.0"
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
notmad = "0.4.0"
|
notmad = "0.5.0"
|
||||||
prometheus = "0.13.4"
|
prometheus = "0.13.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::{collections::BTreeMap, sync::Arc, time::Duration};
|
use std::{collections::BTreeMap, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use axum::async_trait;
|
use axum::async_trait;
|
||||||
use drift::Drifter;
|
use nodrift::Drifter;
|
||||||
use notmad::Component;
|
use notmad::Component;
|
||||||
use tokio::sync::RwLock;
|
use tokio::sync::RwLock;
|
||||||
use tokio_util::sync::CancellationToken;
|
use tokio_util::sync::CancellationToken;
|
||||||
@@ -33,7 +33,7 @@ impl Component for Broker {
|
|||||||
&self,
|
&self,
|
||||||
cancellation_token: tokio_util::sync::CancellationToken,
|
cancellation_token: tokio_util::sync::CancellationToken,
|
||||||
) -> Result<(), notmad::MadError> {
|
) -> Result<(), notmad::MadError> {
|
||||||
let token = drift::schedule_drifter(Duration::from_secs(1), self.clone());
|
let token = nodrift::schedule_drifter(Duration::from_secs(1), self.clone());
|
||||||
|
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
_ = token.cancelled() => {},
|
_ = token.cancelled() => {},
|
||||||
@@ -95,7 +95,7 @@ impl BrokerHandler {
|
|||||||
_parent_token: CancellationToken,
|
_parent_token: CancellationToken,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
let inner_state = state.clone();
|
let inner_state = state.clone();
|
||||||
let token = drift::schedule(Duration::from_secs(1), move || {
|
let token = nodrift::schedule(Duration::from_secs(1), move || {
|
||||||
let consumer_group = consumer_group.clone();
|
let consumer_group = consumer_group.clone();
|
||||||
let state = inner_state.clone();
|
let state = inner_state.clone();
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ mod services;
|
|||||||
|
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
|
||||||
|
use anyhow::Context;
|
||||||
use broker::Broker;
|
use broker::Broker;
|
||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use grpc::{GetTopicsRequest, GrpcServer, PublishEventRequest, SubscribeRequest};
|
use grpc::{GetTopicsRequest, GrpcServer, PublishEventRequest, SubscribeRequest};
|
||||||
@@ -17,6 +18,7 @@ use grpc_component::GrpcComponentClient;
|
|||||||
use http::HttpServer;
|
use http::HttpServer;
|
||||||
use notmad::Mad;
|
use notmad::Mad;
|
||||||
use state::SharedState;
|
use state::SharedState;
|
||||||
|
use tonic::transport::{Channel, ClientTlsConfig};
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
#[command(author, version, about, long_about = None, subcommand_required = true)]
|
#[command(author, version, about, long_about = None, subcommand_required = true)]
|
||||||
@@ -35,7 +37,7 @@ enum Commands {
|
|||||||
)]
|
)]
|
||||||
host: SocketAddr,
|
host: SocketAddr,
|
||||||
#[arg(
|
#[arg(
|
||||||
env = "GRPC_SERVICE_HOST",
|
env = "SERVICE_GRPC_HOST",
|
||||||
long = "service-grpc-host",
|
long = "service-grpc-host",
|
||||||
default_value = "127.0.0.1:7900"
|
default_value = "127.0.0.1:7900"
|
||||||
)]
|
)]
|
||||||
@@ -46,7 +48,7 @@ enum Commands {
|
|||||||
// #[arg(env = "SERVICE_HOST", long, default_value = "http://127.0.0.1:3000")]
|
// #[arg(env = "SERVICE_HOST", long, default_value = "http://127.0.0.1:3000")]
|
||||||
//host: String,
|
//host: String,
|
||||||
#[arg(
|
#[arg(
|
||||||
env = "GRPC_SERVICE_HOST",
|
env = "SERVICE_GRPC_HOST",
|
||||||
long = "service-grpc-host",
|
long = "service-grpc-host",
|
||||||
default_value = "http://127.0.0.1:7900"
|
default_value = "http://127.0.0.1:7900"
|
||||||
)]
|
)]
|
||||||
@@ -192,8 +194,22 @@ async fn create_client(
|
|||||||
) -> anyhow::Result<
|
) -> anyhow::Result<
|
||||||
crate::grpc::no_data_service_client::NoDataServiceClient<tonic::transport::Channel>,
|
crate::grpc::no_data_service_client::NoDataServiceClient<tonic::transport::Channel>,
|
||||||
> {
|
> {
|
||||||
let client =
|
let channel = if grpc_host.starts_with("https") {
|
||||||
crate::grpc::no_data_service_client::NoDataServiceClient::connect(grpc_host).await?;
|
Channel::from_shared(grpc_host.to_owned())
|
||||||
|
.context(format!("failed to connect to: {}", &grpc_host))?
|
||||||
|
.tls_config(ClientTlsConfig::new().with_native_roots())?
|
||||||
|
.connect()
|
||||||
|
.await
|
||||||
|
.context(format!("failed to connect to: {}", &grpc_host))?
|
||||||
|
} else {
|
||||||
|
Channel::from_shared(grpc_host.to_owned())
|
||||||
|
.context(format!("failed to connect to: {}", &grpc_host))?
|
||||||
|
.connect()
|
||||||
|
.await
|
||||||
|
.context(format!("failed to connect to: {}", &grpc_host))?
|
||||||
|
};
|
||||||
|
|
||||||
|
let client = crate::grpc::no_data_service_client::NoDataServiceClient::new(channel);
|
||||||
|
|
||||||
Ok(client)
|
Ok(client)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,15 @@ vars:
|
|||||||
- internal: "true"
|
- internal: "true"
|
||||||
- internal_grpc: "true"
|
- internal_grpc: "true"
|
||||||
|
|
||||||
|
please:
|
||||||
|
project:
|
||||||
|
owner: kjuulh
|
||||||
|
repository: nodata
|
||||||
|
branch: main
|
||||||
|
settings:
|
||||||
|
api_url: https://git.front.kjuulh.io
|
||||||
|
actions:
|
||||||
|
rust:
|
||||||
|
|
||||||
cuddle/clusters:
|
cuddle/clusters:
|
||||||
dev:
|
dev:
|
||||||
|
|||||||
Reference in New Issue
Block a user