回到目录

redis的客户端有很多,这次用它的pub/sub发布与订阅我选择了StackExchange.Redis,发布与订阅大家应该很清楚了,首先一个订阅者,订阅一个服务,服务执行一些处理程序(可能是写个日志,插入个数据,发个email)然后当另一个项目的某个业务发布这个服务后,被订阅的程序将会被执行,这个听起来很有意思,redis有好的实现了这个pub/sub功能。

看一下结构图

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8IAAAIKCAIAAABnRWGXAAAgAElEQVR4nOy9e2wUV77v6z8mZ+uM9k5ytXW25py/arS1pfwzUo62rjTz347O0Yw0uhqFgGa0dc+dvWcmJJnJgyRAwpCQDMmEdIJ5YwyEl21sA4HwNCaTgAGD7fbbBhIIz/Cw22AgGYKYBKHf/aOhKVetWvXo6l7V7s9HH1ndq1atWmtVtdeXdlNdIQAAAAAAEJIK0x0AAAAAACg9iNEAAAAAAKEhRgMAAAAAhIYYDQAAAAAQGmI0AAAAAEBoiNEAAAAAAKEhRgMAAAAAhIYYDQAAAAAQGmI0AAAAAEBoiNEROXrgic4dP0JERMSAnmiffOfO30wv4ACxQYyOSOeOH92+1YGIiIhBvHmtqXvXv57snEKShnEDMToixGhERMTg3rzWNPDp//5q5BBJGsYNxOiIEKMRERGDm43RIkKShnEDMToixGhERMTg5mK0kKRhvECMjggxGhERMbj2GC0kaRgXEKMjkmeMtiwrYKHvpoAVonWpCO1YKjRtZh9r6uibCjvVcU1LwA4EP9HKeXNPVJARBRxjvJOmP0F59ieW3b0mMM8+FOiKindCinNp5f9aC/6LtHDTjsF1xGghSUPpQ4yOiDJGBwlwuZpehaHWgIDHitylUGr6H+q4+hKvoziWdt/JDDjPRY7R9u555ZiAqc5dX3MNeM2GHq8pDdJa/vPm9TifUxC2fd8XZv5XlKMpzSnQnCDfs+l1zehnw4p6afkeIp+T6NXDyEfBuHTHaCFJQ4lDjI6IV4zWPPXdFLa+e6t7acyzSxHMJyUol//bqiXcK0AoJ0HflFdPlI3HZajWfK8WZURwD8F32pWDdTfudVF5VYh2Yf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hJlhgNAAAJJfYb3hGjETFGidEAAJBQiNGImGSJ0QAAkFDi/TJwMjQixisxGgAAEkq0O3UgIhZHYjQAACQUYjQiJlliNAAAJBRiNCImWWI0AAAkFGI0IiZZYjQAACQUYjQiJlliNAAAJBRiNCImWWI0AAAkFGI0IiZZYjQAACQUYjQiJlliNAAAJBRiNCImWWI0AAAkFGI0IiZZYjQAACQUYjQiJlliNAAAJBRiNCImWWI0AAAklJ7mn3Tu+BEiYjLtaf6Jwd+QxGgAAAAAgNAQowEAAAAAQkOMBgAAAAAIDTEaAAAAACA0xGgAAAAAgNAQowEAAAAAQkOMBgAAAAAIDTEaAAAAACA0xGgAAAAAgNAQowEAAAAAQkOMBgAAAAAIDTEaAAAAACA0xGgAAAAAgNAQowEAAAAAQkOMBgAAAAAIDTEaAAAAACA0xGgAAAD4/9utYwEAAACAQf7WY9hfFAGbRgMAwKbRAACwaTQAAGwaDQAAm0YDAMCm0QAAsGk0AABsGg0AAJtGAwDAptEAALBpNAAAbBoNAACbRgMAwKbRAACwBemHOemjCyPfAAAAAElFTkSuQmCC" alt="" />

Sub订阅(消息消费者)

对于订阅方,这里类似于一个服务,它会长期运行着,被启动后动态订阅一些服务进来,以便以后再被其它服务调用

        //sub a function in A-project
PubSubManager.Instance.Subscribe("UserLog", (msg) =>
{
//订阅者处理自己的业务逻辑,这相关于队列服务要干的事
Console.WriteLine(msg);
});

Pub发布(消息生产者)

而对于其它项目,如A网站,它可能在被在POST动作后发布这个UserLog的服务,这时上面的订阅方将会消费它(消费者模式),或者服务代码被执行!

     [HttpPost]
public ActionResult Index(string user)
{
PubSubManager.Instance.Publish("UserLog", user + "这个用户提交表单了");
return View();
}

对于一直运行的服务,将会收到来自不同项目的消息,而它只负责消费它!

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAB9CAIAAAAEO+kKAAAOkklEQVR4nO2caXAVVRbHUzWfRJwRBUdxJsMSkM0kYABZQgIJ4rCD4ALKomOVIiKbgqwJJCH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qVLq8uoyMzWLipqW9jF2k+cpzeyhaelczFKdnuoUrWq6tbUlcbR2ijuQ8RKN9ix29utgXIPWYlukbTrjufBpjclp2o7TqqZBHAU9AN/pgwiApiACoCmIAGgKIgCaggiApiACoCmIAE9NUd0M2sRTU9Thgzbx1HTUgTp87QtD5ns/5ttLZmBE3yX2Hn9NJdXNx+9Wt56vhkerW89Xx+9Wxae86/CVoERDPsRpFAiFv6ZKUIc/PFrdf3v+6uff7789Hx5taOpdOarq1lQ+EQhFJU2VrA7fiHcdviqrLdKuB4x9FPmdLhxlW0/U9Ufdp5KmpTXOw6NVMYpPNbGb0hbmgD6UjxLOBerCX1NJHX5m54erj1RT7zp8Vaumws6u16/YSuul0l/6pfWjjKbedfiqDk1dN1G/P7Ngal14aiqsw2d+6fsx2qTYwvSk3WyXj6XJmb2zNDnwxlNT1OGDNsF3+iACoCmIAGgKIgCaggiApiACoCmIAGgKIgDV+yACUL0PIiDi6n2+j+tA2xentoSgTZqt3s9p+S76VDjbU/woaNoRmq3ez2n5LvqMppLM+UNo2hHaqN5v9C76RpmMlU3Gh8wom6bGITbF6bJpfmYu4en3/oPUbPV+c3fRN7YwB/Rh6Sj6s+mDUtVKT7CvNFu93+hd9GmL5F2Uq2PUVJn2MzoX3eGMD415nM6dZu4lzVbvqybvok9beOGEnRWracUDyVkwMH36bWqz1fu1Y7sO0zYnulEZB5aOUhbRKXk7n9mYx3ZeRvOEp9YzUL3fBpqdAVcSKfhOvyVuwp7XHNAURMA/I42FGmkc3mIAAAAASUVORK5CYII=" alt="" />

封装了一些标准的pub/sub方法,它可以有多种实现方法,本例使用redis这个中间件

   /// <summary>
/// 发布订阅的接口规则
/// </summary>
public interface IPubSub
{
/// <summary>
/// 发布,有顺序,对象源是字符串
/// </summary>
/// <param name="channel"></param>
/// <param name="value"></param>
void Publish(string channel, string value);
/// <summary>
/// 订阅,对象源是字符串
/// </summary>
/// <param name="channel"></param>
/// <param name="action"></param>
void Subscribe(string channel, Action<string> action);
/// <summary>
/// 异步发布,无顺序,对象源是字符串
/// </summary>
/// <param name="channel"></param>
/// <param name="value"></param>
void PublishAsync(string channel, string value);
/// <summary>
/// 异步订阅,无顺序,对象源是字符串
/// </summary>
/// <param name="channel"></param>
/// <param name="action"></param>
void SubscribeAsync(string channel, Action<string> action); /// <summary>
/// 发布,有顺序,对象源是Byte[]
/// </summary>
/// <param name="channel"></param>
/// <param name="value"></param>
void PublishByte(string channel, byte[] value);
/// <summary>
/// 订阅,对象源是Byte[]
/// </summary>
/// <param name="channel"></param>
/// <param name="action"></param>
void SubscribeByte(string channel, Action<byte[]> action);
/// <summary>
/// 异步发布,有顺序,对象源是Byte[]
/// </summary>
/// <param name="channel"></param>
/// <param name="value"></param>
void PublishByteAsync(string channel, byte[] value);
/// <summary>
/// 异步订阅,对象源是Byte[]
/// </summary>
/// <param name="channel"></param>
/// <param name="action"></param>
void SubscribeByteAsync(string channel, Action<byte[]> action); /// <summary>
/// 发布,有顺序,对象源是泛型对象
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="channel"></param>
/// <param name="value"></param>
void Publish<T>(string channel, T value);
/// <summary>
/// 订阅,对象源是泛型对象
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="channel"></param>
/// <param name="action"></param>
void Subscribe<T>(string channel, Action<T> action);
/// <summary>
/// 异步发布,有顺序,对象源是泛型对象
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="channel"></param>
/// <param name="value"></param>
void PublishAsync<T>(string channel, T value);
/// <summary>
/// 异步订阅,对象源是泛型对象
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="channel"></param>
/// <param name="action"></param>
void SubscribeAsync<T>(string channel, Action<T> action);
/// <summary>
/// 取消指定订阅
/// </summary>
/// <param name="channel"></param>
void UnSubscribe(string channel);
/// <summary>
/// 取消所有订阅
/// </summary>
/// <param name="channel"></param>
void UnSubscribeAll();
}

回到目录

Redis学习笔记~分布式的Pub/Sub模式的更多相关文章

  1. Redis学习笔记八:集群模式

    作者:Grey 原文地址:Redis学习笔记八:集群模式 前面提到的Redis学习笔记七:主从复制和哨兵只能解决Redis的单点压力大和单点故障问题,接下来要讲的Redis Cluster模式,主要是 ...

  2. Redis学习笔记~conf自主集群模式

    回到目录 Redis自主提供了集群模式,当然也只是比较简单的读写分离模式,或者叫主从模式,它在各个redis服务端自己做数据同步机制,当然就是将主服务端的信息同步到各个slave服务器上,在客户端集成 ...

  3. Redis学习笔记~目录

    回到占占推荐博客索引 百度百科 redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合). ...

  4. redis学习笔记(详细)——高级篇

    redis学习笔记(详细)--初级篇 redis学习笔记(详细)--高级篇 redis配置文件介绍 linux环境下配置大于编程 redis 的配置文件位于 Redis 安装目录下,文件名为 redi ...

  5. redis 学习笔记(6)-cluster集群搭建

    上次写redis的学习笔记还是2014年,一转眼已经快2年过去了,在段时间里,redis最大的变化之一就是cluster功能的正式发布,以前要搞redis集群,得借助一致性hash来自己搞shardi ...

  6. Redis学习笔记4-Redis配置详解

    在Redis中直接启动redis-server服务时, 采用的是默认的配置文件.采用redis-server   xxx.conf 这样的方式可以按照指定的配置文件来运行Redis服务.按照本Redi ...

  7. Redis学习笔记(1)——Redis简介

    一.Redis是什么? Remote Dictionary Server(Redis) 是一个开源的使用ANSI C语言编写.遵守BSD协议.支持网络.可基于内存亦可持久化的日志型.Key-Value ...

  8. redis学习笔记(3)

    redis学习笔记第三部分 --redis持久化介绍,事务,主从复制 三,redis的持久化 RDB(Redis DataBase)AOF(Append Only File) RDB:在指定的时间间隔 ...

  9. redis 学习笔记-cluster集群搭建

    一.下载最新版redis 编译 目前最新版是3.0.7,下载地址:http://www.redis.io/download 编译很简单,一个make命令即可,不清楚的同学,可参考我之前的笔记: red ...

随机推荐

  1. sikuli实战记录

    最近,为了解放运营人力,需要对某国企的系统进行自动化操作.该系统使用的是https,需要加载证书,而且非得用IE才行,firefox无法正常的加载证书.而selenium启动的IE是纯净的,不会加载任 ...

  2. HttpWebRequest 请求数据

    string fullUrl = "http://vip.AAA.cn/PreviewInterfaceAction.action?code=vip0008&data_digest= ...

  3. map容器的使用

    1.map是STL容器中的一种,属于关联性容器.以key value的形式存储.key必须唯一.如果重复则插入失败.插入后按照key默认排序.必须要先声明命名空间:using namespace st ...

  4. golang坑1

    :=比较方便,不过今天掉进了一个小坑 var ( foo *XXX ) func bar() { fmt.Println(foo.abc) } func main() { foo, err := XX ...

  5. C#is运算符的作用

    is运算符的含义:检查对象是不是给定类型,或者是否可以转换为给定类型,如果是,这个运算符就返回True. is运算符的语法:<operand> is <type> 这个表达式的 ...

  6. Cocoapods的安装,卸载和使用

    [一]Cocoapods的安装 (1)Cocoapods的官方网站为: https://cocoapods.org/ .如果你的电脑已经安装了Ruby开发环境,那么在终端(Terminal)中使用以下 ...

  7. Java反射机制调用private类型的构造方法

    单例类: package singleton; public class SingletonTest { // 私有构造方法 private SingletonTest(){ System.out.p ...

  8. 【转】java调用webservice

    互联网上面有很多的免费webService服务,我们可以调用这些免费的WebService服务,将一些其他网站的内容信息集成到我们的Web应用中显示,下面就以获取天气预报数据和查询国内手机号码归属地为 ...

  9. solr&lucene3.6.0源码解析(三)

    solr索引操作(包括新增 更新 删除 提交 合并等)相关UML图如下 从上面的类图我们可以发现,其中体现了工厂方法模式及责任链模式的运用 UpdateRequestProcessor相当于责任链模式 ...

  10. 今天自己解决了两个问题(IE10 type slow ChromeDriver erro)

    都是通过google解决的,其实本应该很快解决,可是因自己粗心,大写小错了,加上java基础不过关, "webdriver.chrome.driver"中的webdriver应是全 ...