datasax今天宣布推出Astra Streaming的测试版,这是一项新的Astra云独立服务,将独立于Astra DB(以前称为datasax Astra)运行并与之集成。这项新服务基于阿帕奇脉冲星,发布/订阅(PubSub)消息https://www.google.com/search?q=apache+pulsar+vs+kafka&rlz=1CHBF\U enUS880US880&;oq=apche&;aqs=铬.1.69i57j0i67l2j0i10j0i67i433l2j0i67l2j0i67i433j0i10i433.3123j0j7&;sourceid=chrome&;ie=UTF-8“target=”\u blank“rel=”noopener noreferrer“data component=”externalLink“>经常与更广为人知的Apache Kafka。事实上,DataStax承诺该服务将通过与Kafka兼容https://pulsar.apache.org/docs/en/adaptors-kafka/“target=”\u blank“rel=”noopener noreferrer nofollow“data component=”externalLink“>现有包装器;虽然在beta版中还没有发布,但我们预计该功能将在产品发布时上线。
Pulsar,比如Kafka,遵循一系列消息传递技术,这些技术可以追溯到大型机时代https://www.tibco.com/products/tibco-enterprise-message-service“target=”\u blank“rel=”noopener noreferrer nofollow“data component=”externalLink“>Tibco和IBM,在互联网时代https://www.oracle.com/java/technologies/java-message-service.html“target=”\u blank“rel=”noopener noreferrer nofollow“data component=”externalLink“>JMS和RabbitMQ。在当代人中,卡夫卡是在LinkedIn开发的,而Pulsar是在Yahoo开发的,两者都是顶级的Apache项目。
Pulsar和卡夫卡有很多相似之处;两者都是为扩展而设计的;提供长期耐久性保证;支持跨地域复制;拥有广泛的操作设施;而且(目前)在存储元数据方面相互依赖于apachezookeeper。
但是Pulsar和Kafka之间也有重要的架构差异。其中最基本的区别是Pulsar将消息推送到订户,而Kafka则要求订户将消息拉下来。在建筑上,卡夫卡更简单;它将消息代理和消息持久性结合在同一层中,而Pulsar将它们分开。这导致了无数的争论和激烈的竞争,争论哪一种方法是最好的方法。
例如,Pulsar的支持者声称三层结构(也包括Zookeeper)更灵活和可扩展。消息处理负载平衡是自动的,并且具有独立的持久性层,允许代理工作在不丢失数据的情况下被重新分配和分布到更多的节点上。卡夫卡的支持者反驳说,他们的方法导致了一个更简单的架构,服务器数量减少了一半,因此更经济。他们还计划进一步简化架构https://www.confluent.io/blog/removing-zookeeper-dependency-in-kafka/“target=”\u blank“rel=”noopener noreferrer nofollow“data component=”externalLink“>通过删除Zookeeper,但这仍然是https://issues.apache.org/jira/browse/KAFKA-9119“target=”\u blank“rel=”noopener noreferrer nofollow“data component=”externalLink“>正在进行的工作
有进一步争论在哪些子系统上更有效地复制数据只存储一次数据;支持一次交易;对消息队列提供更深入的支持;配置更简单;以及IBM的混合云启动板在哪里?
Amazon DocumentDB添加全局集群
a, .nav-item > a, .dropdown-menu a');
allLinks.forEach(link => {
let href = link.getAttribute('href');
if (!href || href === '#' || href === 'javascript:;') return;
// 4. 提取菜单中的核心路径
// 例如 /articles.html -> articles
let cleanHref = href.replace(/^\/|\/$/g, '').replace(/\.(html|php)$/, '').toLowerCase();
let isMatch = false;
// 5. 精确匹配逻辑
if (cleanHref === 'index') {
// 只有当前是首页时,才高亮首页
if (cleanPath === 'index') isMatch = true;
} else {
// 如果当前路径完全等于菜单路径 (如 /articles 匹配 /articles)
// 或者当前路径以 "菜单路径/" 开头 (如 /articles/154 匹配 /articles)
// 或者当前路径包含 "菜单路径." (防某些带点号的特殊情况)
if (cleanPath === cleanHref || cleanPath.startsWith(cleanHref + '/')) {
isMatch = true;
}
}
// 6. 如果匹配成功,加上高亮
if (isMatch) {
link.classList.add('active');
// 如果匹配的是下拉菜单里的子项,顺便把它的父级分类也高亮
const parentNavItem = link.closest('.nav-item');
if (parentNavItem && !parentNavItem.classList.contains('active')) {
const parentLink = parentNavItem.querySelector('a');
if (parentLink) parentLink.classList.add('active');
}
}
});
})();
// ================= 移动端菜单逻辑 =================
const toggle = document.getElementById("menuToggle");
const nav = document.getElementById("navLinks");
// 1. 汉堡按钮:切换主菜单显示/隐藏
if (toggle && nav) {
toggle.addEventListener("click", function (e) {
e.stopPropagation();
const expanded = this.getAttribute("aria-expanded") === "true";
this.setAttribute("aria-expanded", String(!expanded));
nav.classList.toggle("active");
});
}
// 2. 处理下拉子菜单的展开/折叠
if (window.innerWidth <= 768) {
const navItems = document.querySelectorAll(".nav-item");
navItems.forEach((item) => {
const titleLink = item.querySelector("a");
const dropdownMenu = item.querySelector(".dropdown-menu");
const arrowIcon = item.querySelector(".arrow-icon");
if (titleLink && dropdownMenu) {
titleLink.addEventListener("click", function (e) {
e.preventDefault(); // 阻止链接跳转
e.stopPropagation();
// 手风琴效果:收起其他已展开的菜单
navItems.forEach((otherItem) => {
if (otherItem !== item) {
const otherMenu = otherItem.querySelector(".dropdown-menu");
const otherArrow = otherItem.querySelector(".arrow-icon");
if (otherMenu) otherMenu.classList.remove("active");
if (otherArrow) otherArrow.style.transform = "rotate(0)";
}
});
// 切换当前菜单
dropdownMenu.classList.toggle("active");
if (arrowIcon) {
arrowIcon.style.transform = dropdownMenu.classList.contains(
"active",
)
? "rotate(180deg)"
: "rotate(0)";
}
});
}
});
}
// 3. 点击普通菜单项后,自动关闭整个主菜单
if (nav) {
nav.querySelectorAll("a").forEach(function (link) {
if (!link.querySelector(".arrow-icon")) {
link.addEventListener("click", function () {
nav.classList.remove("active");
if (toggle) toggle.setAttribute("aria-expanded", "false");
});
}
});
}
// ================= 返回顶部逻辑 =================
(function () {
const backToTop = document.getElementById("backToTop");
window.addEventListener("scroll", function () {
if (window.scrollY > 300) {
backToTop.classList.add("show");
} else {
backToTop.classList.remove("show");
}
});
backToTop.addEventListener("click", function () {
window.scrollTo({ top: 0, behavior: "smooth" });
});
})();
// 多语言
document.addEventListener("DOMContentLoaded", function() {
let path = window.location.pathname;
let isEn = path.startsWith('/en/');
if (isEn) {
document.cookie = "my_lang=en; path=/; max-age=" + (30 * 24 * 3600);
} else {
document.cookie = "my_lang=zh; path=/; max-age=" + (30 * 24 * 3600);
}
// 【2. 首页记忆】如果访问的是首页(没带 en),但记忆是英文,前端自动跳去英文首页
if (!isEn && (path === '/' || path === '/index.html')) {
if (document.cookie.includes('my_lang=en')) {
window.location.replace('/en' + path);
return;
}
}
// 【3. 菜单不掉线】如果是英文页面,自动给菜单链接加上 /en/
if (isEn) {
document.querySelectorAll('a').forEach(function(link) {
let href = link.getAttribute('href');
// 站内链接,且没带 /en/
if (href && href.startsWith('/') && !href.startsWith('/en/') && !href.startsWith('http')) {
link.setAttribute('href', '/en' + href);
}
});
}
});