erlang

RabbitMq安装笔记(Linux)

徘徊边缘 提交于 2019-12-09 15:34:15
RabbitMq安装笔记 一、什么是rabbitMq RabbitMQ是一个消息中间件,使用Erlang开发语言(Erlang开发语言主要用于电话交换机等开发,自带高并发光环) 二、安装前准备(以下安装环境是针对我自己的系统环境的,如需下载安装需匹配自己的系统版本进行安装) 注意:复制我的链接访问后可以选择自己需要的版本下载,如果直接在文章中点击超链接下载的是我使用的版本,该版本对应的centOs7版linux系统可用! 1、erlang安装包 ,就比如使用java开发的软件需要安装jdk一样,这里我们也需要准备语言安装包 下载地址:https://github.com/rabbitmq/erlang-rpm 2、下载socat运行环境 (socat是一个多功能的网络工具,名字来由是” Socket CAT”,可以看作是netcat的N 倍加强版,socat的官方网站:http://www.dest-unreach.org/socat/ 。 ) 下载地址:http://mirror.centos.org/centos/7/os/x86_64/Packages 3、下载rabbitMq 下载地址:https://github.com/rabbitmq/rabbitmq-server/releases 将下载好的三个压缩包放在linux相应的文件夹下(自定义的文件夹) 二、安装 1

Erlang type system

廉价感情. 提交于 2019-12-09 15:09:59
问题 I've been scrounging around the web looking for various typing practices of Erlang programs and there seem to be a few... although its somewhat difficult to find a solid source of info namely Im looking for practical info about: 1. -specs - this one looks pretty attractive. a few places mention that the functions that have an associated -specs directive with it are checked at compile time(for correct type usage)... I cant seem to find more info on how to use it (which tool to use - Dialyzer

Erlang list comprehension

半世苍凉 提交于 2019-12-09 13:32:44
问题 I'm testing an expression with two inequalities for the condition of a list comprehension. Is there a way to have assignments here and not duplicate that expression? (The following code doesn't work, but I wish it would) diagnose(Expertise,PatientSymptoms)-> {[CertainDisease|| {CertainDisease,KnownSymptoms}<-Expertise, C=length(PatientSymptoms)-length(PatientSymptoms--KnownSymptoms), C>=2, C<=5 ]}. 回答1: A way of writing it directly without a fun would be to use a begin ... end block ending

CocoaAsyncSocket and reading data from a socket

不羁的心 提交于 2019-12-09 13:01:29
问题 On my TCP-socket based server, I send a packets over the stream where packets consist of a header specifying the number of bytes in the packet, followed by that number of bytes. For those familiar with Erlang, I'm simply setting the {packet, 4} option. On the iOS side, I have code that looks like this, assuming I want to figure out the size of the stream for this message: [asyncSocket readDataToLength:4 withTimeout:-1 tag:HEADER_TAG]; That works fine and the following delegate method callback

How to push Erlang to my workplace

那年仲夏 提交于 2019-12-09 12:14:41
问题 I think Erlang is very well suited for server systems developed in my workplace (currently developed in Java). I am a bit skeptical how this would be accepted both by developers (who have no idea about functional or Erlang) and by managers. Any ideas on how to approach the issue? I am thinking about some hybrid system, where the hardcore highly reliable infra uses Elrang, and app specific stuff developed in Java (as nodes?) 回答1: There are a few approaches, and neither have any guarantees to

Unable to install erlang on cent os

本小妞迷上赌 提交于 2019-12-09 10:34:33
问题 While installing erlang on cent os I got the following error Error: Package: erlang-crypto-R16B03-0.2.el6.x86_64 (erlang-solutions) Requires: libcrypto.so.10(libcrypto.so.10)(64bit) Error: Package: erlang-crypto-R16B03-0.2.el6.x86_64 (erlang-solutions) Requires: libcrypto.so.10(OPENSSL_1.0.1)(64bit) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest I searched around on google and found that the probelm can be solved by installing

Erlang code to measure time operations took to execute?

女生的网名这么多〃 提交于 2019-12-09 10:23:46
问题 Could somebody be so kind as to point me towards some erlang code which allows me to time how long it takes to run certain pieces of code? I havent seen an erlang library where this is available? 回答1: You can use the erlang:statistics function. This is used in Joe Armstrong's Programming Erlang book (p141). e.g. yourfun() -> statistics(runtime), statistics(wall_clock), % your code here {_, Time1} = statistics(runtime), {_, Time2} = statistics(wall_clock), U1 = Time1 * 1000, U2 = Time2 * 1000,

RabbitMQ安装及配置步骤(windows10实测顺利安装)

僤鯓⒐⒋嵵緔 提交于 2019-12-09 10:10:42
1、安装Erlang 下载地址:https://www.erlang.org/downloads,本文选择OTP 21.0.1 Windows 64-bit Binary File (91707927) 设置环境变量,新建ERLANG_HOME 修改环境变量path,增加Erlang变量至path,%ERLANG_HOME%\bin; 打开cmd命令框,输入erl 至此,Erlang 安装完成 2、安装rabbitmq 下载地址:http://www.rabbitmq.com/download.html exe安装地址:http://www.rabbitmq.com/install-windows.html 解压缩安装地址:http://www.rabbitmq.com/install-windows-manual.html 本文选择解压缩安装rabbitmq-server-windows-3.7.7.zip 将rabbitmq-server-windows-3.7.7.zip解压缩至D:\Program Files目录下 设置环境变量,新建RABBITMQ_SERVER 修改环境变量path,增加rabbitmq变量至path,%RABBITMQ_SERVER%\sbin; 打开cmd命令框,切换至D:\Program Files\rabbitmq_server-3.7.7

RabbitMQ的安装

牧云@^-^@ 提交于 2019-12-09 10:10:26
首先,我们要知道RabbitMQ开源消息队列服务是使用Erlang语言开发的,因此我们要使用他就必须先进行Erlang语言环境的搭建。 一、Erlang语言环境的搭建 RabbitMQ开源消息队列服务是使用Erlang语言开发的,因此我们要使用他就必须先进行Erlang语言环境的搭建,其实是非常简单的。 下载地址: http://www.erlang.org/downloads 1. 登录Erlang官网,进入下载页,然后按照自己的系统环境来选择需要下载的安装文件。 下载完成后进行安装。 2.安装完成后,配置Erlang环境变量。 (1)ERLANG_HOME: erlang安装路径 (2)PATH:%ERLANG_HOME%\bin 点击确定,再需要配置下path,如图: 点击新建,将%ERLANG_HOME%\bin加入到path中,如图: 如何修改环境变量请参考: https://jingyan.baidu.com/article/b24f6c82cba6dc86bfe5da9f.html 3.最后,windows键+R键,输入cmd,再输入erl,看到版本号就说明erlang安装成功了。 二、下载并安装RabbitMQ 下载地址 http://www.rabbitmq.com/download.html ,选择 1 双击下载后的.exe文件

Python3.7.1学习(六)RabbitMQ在Windows环境下的安装

安稳与你 提交于 2019-12-09 10:09:53
Windows下安装RabbitMQ 环境配置 部署环境 部署环境:windows server 2008 r2 enterprise(本文安装环境Win7) 官方安装部署文档:http://www.rabbitmq.com/install-windows.html官方文档说明 1.下载erlang 原因在于RabbitMQ服务端代码是使用并发式语言erlang编写的,下载地址:http://www.erlang.org/downloads或者 http://erlang.org/download/otp_win64_21.3.exe 或者 Erlang Windows二进制文件 , 2.安装erlang教程: 2.1、双击otp_win64_21.3.exe文件,next下一步 2.2、选择安装目录 2.3配置系统环境 新建一个系统变量:名称ERLANG_HOME,值为本机中erlang的安装目录。 然后再在用户变量PATH中添加上%ERLANG_HOME%\bin; 查看安装是否成功:cmd然后erl -version 3.下载RabbitMQ 下载地址:https://www.rabbitmq.com/install-windows.html,同样双击rabbitmq-server-3.7.14.exe进行安装就好(这里需要注意一点,默认的安装目录是C:/Program