redis通讯协议(RESP )是什么?有什么特点?

2018-09-1500:06:31数据库教程Comments3,261 views字数 349阅读模式

有提到redis通讯协议(RESP ),能解释下什么是RESP?有什么特点?

(可以看到很多面试其实都是连环炮,面试官其实在等着你回答到这个点,如果你答上了对你的评价就又加了一分)文章源自菜鸟学院-https://www.cainiaoxueyuan.com/sjk/4643.html

redis通讯协议(RESP )是什么?有什么特点?

RESP 是redis客户端和服务端之前使用的一种通讯协议; RESP 的特点: 实现简单、快速解析、可读性好文章源自菜鸟学院-https://www.cainiaoxueyuan.com/sjk/4643.html

  • For Simple Strings the first byte of the reply is "+" 回复
  • For Errors the first byte of the reply is "-" 错误
  • For Integers the first byte of the reply is ":" 整数
  • For Bulk Strings the first byte of the reply is "$" 字符串
  • For Arrays the first byte of the reply is "*" 数组

注明出处。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/sjk/4643.html

文章源自菜鸟学院-https://www.cainiaoxueyuan.com/sjk/4643.html
  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/sjk/4643.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定