Skip to content

Instantly share code, notes, and snippets.

@dalelane
dalelane / event-streams.yaml
Created February 3, 2025 20:35
Kafka cluster specifications used for OpenMessaging Benchmark demos
apiVersion: eventstreams.ibm.com/v1beta2
kind: EventStreams
metadata:
name: my-kafka-cluster
namespace: event-automation
spec:
license:
accept: true
license: L-KCVZ-JL5CRM
use: EventAutomationNonProduction
@dalelane
dalelane / kafka-compression-lz4-max-rate-10-topics-1-partition-64kb.json
Created February 2, 2025 15:15
OpenMessaging benchmark run - driver: kafka-compression-lz4 workload: max-rate-10-topics-1-partition-64kb
{
"workload" : "max-rate-10-topics-1-partition-64kb",
"driver" : "Kafka",
"messageSize" : 65536,
"topics" : 10,
"partitions" : 1,
"producersPerTopic" : 1,
"consumersPerTopic" : 1,
"publishRate" : [ 2435.001997967255, 2199.2882254078163, 1967.6514614701468, 2155.839182108746, 2070.586628150687, 2034.081165494679, 2074.3338286893463, 2009.3069398464422, 1984.8107659037355, 2009.786396350844, 2306.324004635703, 1763.6103286547109, 2490.6661152143893, 2039.7872151976153, 2039.1614516470122, 1816.4704392362426, 2389.415130657488, 1969.2535325859455, 2245.571246401634, 2068.4113222337883, 2031.0073673955442, 2159.481134689539, 2180.5694504158346, 2114.367853502447, 1992.0650614461972, 1927.3311354673058, 2245.056800443236, 1917.1953225984282, 2093.699162364164, 2043.397825009191 ],
"publishErrorRate" : [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ],
@dalelane
dalelane / kafka-exactly-once-1-topic-1-partition-1kb.json
Created February 2, 2025 14:57
OpenMessaging benchmark run - driver: kafka-exactly-once workload: 1-topic-1-partition-1kb
{
"workload" : "1 topic / 1 partition / 1Kb",
"driver" : "Kafka-exactly-once",
"messageSize" : 1024,
"topics" : 1,
"partitions" : 1,
"producersPerTopic" : 1,
"consumersPerTopic" : 1,
"publishRate" : [ 26097.775971941486, 19760.731377253585, 20208.734559884364, 24531.84548936265, 24992.390562948676, 19278.417366818037, 21529.84736541857, 23405.24325185381, 24026.7439004892, 22920.779675909806, 20482.284858151772, 21697.213515366228, 25291.754578176013, 23619.20682188686, 23372.096450031244, 18946.92041752283, 23522.54593173782, 24331.346584849227, 24491.733420548026, 18844.283114595688, 23202.64053699004, 23674.778067130956, 20543.719537890134, 21646.723925483046, 20341.372260946755, 22321.01283422546, 23821.21487872444, 23649.002959501086, 17255.001143245, 22294.15262842004, 22296.119659042386, 24386.255790681633, 22140.6818360424, 18016.281893764022, 21737.981563737645, 24266.98066606694, 23132.13850339271, 17237.617787367515, 23384.366427237983, 21959.43134566937, 23610.873728010785, 23707.7
@dalelane
dalelane / kafka-throughput-max-rate-1-topic-10-partitions-1p-1c-100b.json
Created February 2, 2025 14:38
OpenMessaging benchmark run - driver: kafka-throughput workload: max-rate-1-topic-10-partitions-1p-1c-100b
{
"workload" : "max-rate-1-topic-100-partitions-1p-1c-100b",
"driver" : "Kafka",
"messageSize" : 100,
"topics" : 1,
"partitions" : 10,
"producersPerTopic" : 1,
"consumersPerTopic" : 1,
"publishRate" : [ 394846.87383636134, 451814.35704981966, 348694.85264179995, 498495.9679030653, 385815.31237865775, 424174.6398814781, 433101.3515542623, 369596.67536642274, 446196.7122783404, 383557.9299421127, 502426.5464672809, 341770.42077334155, 503026.3276200438, 365782.8954687176, 434779.72374370147, 486687.5241934649, 356748.7274064975, 469895.1631559564, 385878.90665487456, 405479.3162418153, 457432.47819316713, 443564.8878506824, 407341.78850677254, 438516.1729848653, 391906.4755319205, 405179.2702967302, 387397.5740589651, 438781.1052314135, 389411.6287248009, 417093.87172923 ],
"publishErrorRate" : [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ],
@dalelane
dalelane / kafka-big-batches-1-topic-16-partition-100b.json
Created February 2, 2025 14:24
OpenMessaging benchmark run - driver: kafka-big-batches workload: 1-topic-16-partition-100b
{
"workload" : "1 topic / 16 partition / 100b",
"driver" : "Kafka",
"messageSize" : 100,
"topics" : 1,
"partitions" : 16,
"producersPerTopic" : 1,
"consumersPerTopic" : 1,
"publishRate" : [ 52822.788486132726, 49642.69210786557, 50206.02033740278, 49878.988526175985, 50179.04043390592, 49479.76357334864, 50138.76566407148, 50195.67956233686, 50214.811848558515, 49555.32970278628, 49977.08215088452, 50491.191198033186, 50078.923916551175, 49714.97120280062, 49878.57355457269, 49953.9848425406, 50011.05025754843, 49932.65841827632, 50241.530566267946, 50115.52432158192, 50029.21305993556, 49497.88574238363, 50016.49378256541, 50053.350742041344, 50171.495958949614, 50199.603103707435, 49703.76175757118, 50470.918089239574, 49514.57647090195, 50049.87956458991, 50134.20603407698, 49816.453776899965, 49792.28229155305, 50598.39234411104, 49769.86523865365, 49846.15430251166, 49936.65254239517, 50164.275574205145, 50200.06193713858, 50150.32412766648, 49380.70447498924, 50248.05457790651, 50150.322
@dalelane
dalelane / kafka-big-batches-gzip-max-rate-1-topic-10-partitions-10p-10c-1kb.json
Created February 2, 2025 14:00
OpenMessaging benchmark run - driver: kafka-big-batches-gzip workload: max-rate-1-topic-10-partitions-10p-10c-1kb
{
"workload" : "max-rate-1-topic-10-partitions-10p-10c-1kb",
"driver" : "Kafka",
"messageSize" : 1024,
"topics" : 1,
"partitions" : 10,
"producersPerTopic" : 10,
"consumersPerTopic" : 10,
"publishRate" : [ 131299.34293246226, 99532.5821069953, 123055.22393034992, 100909.88512014797, 121567.51602300238, 101457.0624812173, 118553.2296313864, 88328.5393010023, 107494.85654365593, 114584.8879391148, 96282.93225190815, 119333.49153131942, 117478.08821997224, 108202.89814212745, 114769.58497753326, 98918.32396203157, 115855.56921880186, 106102.20688131532, 107294.30437381894, 93429.6385097017, 112833.01120535155, 104799.4742678423, 122724.65865601847, 91129.56665219349, 120564.1230160198, 97294.56341774919, 124841.19208057165, 95875.7623942617, 117525.02017800104 ],
"publishErrorRate" : [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ],
@dalelane
dalelane / kafka-compression-gzip-max-rate-20-topics-1-partition-100b.json
Created February 2, 2025 13:25
OpenMessaging benchmark run - driver: kafka-compression-gzip workload: max-rate-20-topics-1-partition-100b
{
"workload" : "max-rate-20-topics-1-partition-100b",
"driver" : "Kafka",
"messageSize" : 100,
"topics" : 20,
"partitions" : 1,
"producersPerTopic" : 1,
"consumersPerTopic" : 1,
"publishRate" : [ 1656372.3671019531, 1745019.2477082748, 1399071.2897066255, 1522734.7369536404, 1686912.3452271, 1465371.3064065273, 1452663.8967841465, 1535036.6910302648, 1437731.7804165247, 1728697.3869074807, 1467324.3075846124, 1694327.1149643066, 1460367.3599460681, 1491303.61763566, 1602507.101163617, 1498110.2957360721, 1623823.7405140225, 1573326.7706042733, 1683279.6598142309, 1363692.6679759836, 1688742.052287216, 1493012.6509722767, 1660514.5701774121, 1557558.0399612656, 1586660.7054395815, 1673796.0134891446, 1616741.084739536, 1694064.019345262, 1720725.7145397018 ],
"publishErrorRate" : [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ],
@dalelane
dalelane / kafka-throughput-1-topic-16-partitions-1kb.json
Created February 2, 2025 13:20
OpenMessaging benchmark run - driver: kafka-throughput workload: 1-topic-16-partitions-1kb
{
"workload" : "1 producer / 1 consumers on 1 topic",
"driver" : "Kafka",
"messageSize" : 1024,
"topics" : 1,
"partitions" : 16,
"producersPerTopic" : 1,
"consumersPerTopic" : 1,
"publishRate" : [ 60952.30100870431, 35120.89751339381, 50466.006920366395, 44706.845022185276, 43136.3456724043, 55063.29522834361, 36737.88687476111, 54087.2482228492, 35202.8569471749, 56510.30110082722, 40636.595789624414, 48619.22595494927, 39992.7867771101, 50082.74741645663, 47679.69685084717, 48876.12207324312, 46201.2265388528, 47466.55414754266, 55291.33470907599, 36818.85798383132, 55189.49397236178, 42935.06912929289, 50355.85728898137, 33753.65203160688, 46448.78683087547, 46803.32975809143, 43317.2153262114, 49227.03002540196, 44845.78008861281, 48663.48040523155, 43120.27197926784, 53849.477691897766, 32931.44190245527, 55551.01073087111, 43738.41499526036, 49099.270494585, 52472.990136614506, 40374.08911684484, 47981.04894095906, 46015.07959831003, 49092.37508983618, 42742.641718653584, 46590.160591856
@dalelane
dalelane / compare-social.sql
Created November 19, 2024 19:47
Compare activity on social network platforms
CREATE FUNCTION TO_TIMESTAMP_UDF AS 'com.ibm.ei.streamproc.udf.ToTimestampUdf';
CREATE FUNCTION TO_TIMESTAMP_LTZ_UDF AS 'com.ibm.ei.streamproc.udf.ToTimestampLtzUdf';
-- ----------------------------------------------------------
-- xbox posts on Bluesky
-- ----------------------------------------------------------
CREATE TABLE `"xbox" on Bluesky___TABLE`
(
`id` ROW<`uri` STRING, `cid` STRING>,
@dalelane
dalelane / hoops-training.csv
Last active April 21, 2024 09:46
Example training data the Hoops project on Machine Learning for Kids
x y power direction
-22 -14 4 29
-73 -10 5 27
15 -36 5 21
58 0 3 12
-103 -46 7 24
35 -91 6 14
-128 -3 6 36
-96 -98 8 25
40 -93 7 13