---
title: "sns架构讨论"
author: "vanadiumlin"
date: "2012-03-18T14:53:59Z"
tags: []
categories: ["编程语言"]
slug: "sns"
draft: false
lastmod: "2012-04-22T11:31:20Z"
id: 1456947
url: "https://vanadiumlin.iteye.com/blog/1456947"
---

nosql    tokyocabint   mongodb

异步队列httpsqs、gearman、message queue、starling（被Kestrel替代） ，Kestrel（memcache），  [ActiveMQ](http://activemq.apache.org/)，[ZeroMQ](http://www.zeromq.org/)，

 [RabbitMQ （](http://www.oschina.net/question/12_9192 "AMQP 和 RabbitMQ 入门")amqp）

### [activemq（jms）被 Apollo替代  支持mysql持久化 消息队列使用](http://blog.csdn.net/lucett/article/details/6881187)

0MQ (**ZeroMQ**) 是一个轻量级消息内核。它实现了30微秒的端到端延迟和每秒超过300万的信息。它可用于C、C++、Python、.NET /Mono、Fortran和Java语言。它运行在AIX ， FreeBSD的，基于HP - UX ， Linux和MacOS下， OpenBSD系统， OpenVMS ， QNX Neutrino， Solaris和Windows操作系统。

memcached(memcached1.4.5)

 

 

搜索  sphinx luncene  
图片是fastdfs（类似google的hadoop的dfs）

 

lvs，memcachedb

 

 

Message Queue Servers

Message queue servers are available in various languages, Erlang (RabbitMQ), C (beanstalkd), Ruby (Starling or Sparrow), Scala (Kestrel, Kafka) or Java (ActiveMQ). A short overview can be found [here](http://nubyonrails.com/articles/about-this-blog-beanstalk-messaging-queue)

**Sparrow**

- written by Alex MacCaw
- Sparrow is a lightweight queue written in Ruby that “speaks memcache”

**Starling**

- written by Blaine Cook at Twitter
- Starling is a Message Queue Server based on MemCached
- written in Ruby
- stores jobs in memory (message queue)
- documentation: some good tutorials, for example the [railscast about starling and workling](http://railscasts.com/episodes/128-starling-and-workling) or [this blog post about starling](http://davedupre.com/2008/03/25/ruby-background-tasks-with-starling/)

**Kestrel**

- written by Robey Pointer
- Starling clone written in Scala (a port of Starling from Ruby to Scala)
- Queues are stored in memory, but logged on disk

**RabbitMQ**

- RabbitMQ is a Message Queue Server in Erlang
- stores jobs in memory (message queue)

**Apache ActiveMQ**

- ActiveMQ is an open source message broker in Java

**Beanstalkd**

- written by Philotic, Inc. to improve the response time of a Facebook application
- in-memory workqueue service mostly written in C
- Docu: [http://nubyonrails.com/articles/about-this-blog-beanstalk-messaging-queue](http://nubyonrails.com/articles/about-this-blog-beanstalk-messaging-queue)

**Amazon SQS**

- [Amazon Simple Queue Service](http://aws.amazon.com/sqs/)

**Kafka**

- Written at LinkedIn in Scala
- Used by LinkedIn to offload processing of all page and other views
- Defaults to using persistence, uses OS disk cache for hot data (has higher throughput then any of the above having persistence enabled)
- Supports both on-line as off-line processing

**ZMQ**

- The socket library that acts as a concurrency framework
- Faster than TCP, for clustered products and supercomputing
- Carries messages across inproc, IPC, TCP, and multicast
- Connect N-to-N via fanout, pubsub, pipeline, request-reply
- Asynch I/O for scalable multicore message-passing apps