<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I missed some questions :-)<div><br></div><div>3. “When” a node is temporarily partitioned on the network, does it try to reconnect? If so, how often and for how long?</div><div><br></div><div>4. When sending a message to a cluster, how is the node selected? I’m assuming round robin. However, it would be good to be able to supply a callback for a node so that it can supply a value. This value could then be compared against its peers and the lowest value selected. For instance, I have a messaging transport cluster which can cater for a given number of clients. Currently, I ping all available nodes and they readily supply a count value of their connected peers. I can then educatedly choose the lowest value to always provide the least loaded node. This is a simple task, but one which would work well in this scenario, especially when tasks may take seconds or hours (video encoding).</div><div><br></div><div>Cheers,</div><div>Lee</div><div><br></div><div><br></div><div><br><div><div>On 11 Aug 2014, at 17:30, Lee Sylvester <<a href="mailto:lee.sylvester@gmail.com">lee.sylvester@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Péter,<div><br></div><div>This looks great. I have a couple of questions, though. </div><div><br></div><div>1. Is it possible to cluster brokers? Having a single broker would be a single point of failure. It would be better to cluster the brokers; or maybe even have one broker per physical VM.</div><div><br></div><div>2. What messaging protocol does this use?</div><div><br></div><div>Thanks,</div><div>Lee</div><div><br></div><div><br><div><div>On 11 Aug 2014, at 14:13, Péter Szilágyi <<a href="mailto:peterke@gmail.com">peterke@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi all,<div><br></div><div> For a few years now I've been researching and working on a decentralized cloud messaging system called Iris. My goal with it was to bring the simplicity of cloud computing to the application layer, with the motto that if renting a batch of VMs can be done in one line of code, then assembling them into a communicating distributed system should be doable with another line. I'm proud to say, that Iris was voted as one of the most innovative open source projects related to scalability and devops, being nominated as a finalist for the <a href="http://www.dotscale.eu/prize">dotScale prize</a>.</div>
<div><br></div><div> If I had to summarize the project in one sentence, it would be: "A completely decentralized messaging solution for simplifying the design and implementation of cloud services, featuring zero-configuration (i.e. start it up and it will do its magic), semantic addressing (i.e. application use textual names to address each other), clusters as units (i.e. automatic load balancing between apps of the same name) and perfect secrecy (i.e. all network traffic is encrypted)". And just to complete the above description, it is fast and language agnostic ;)</div>
<div><br></div><div> Today marked the release of version v0.3.0 of the Iris core, and with it I'm very proud to release the first stable version of the Erlang API too, v1.0.0! The API follows the OTP design patterns, and specifically that of the gen_server, but takes it way beyond in capabilities :D Just as a teaser, this is how you can attach a micro-service instance to Iris through Erlang, which will then completely automatically integrate with other nodes and services written it arbitrary languages, and be able to communicate with them completely decentralized and completely secure!</div>
<div><br></div><div><div><font face="courier new, monospace">-behaviour(iris_server).</font></div><div><font face="courier new, monospace">-export([init/2, handle_broadcast/2, handle_request/3, handle_tunnel/2,</font></div>
<div><font face="courier new, monospace"> handle_drop/2, terminate/2]).</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">% Implement all the methods defined by iris_server.</font></div>
<div><font face="courier new, monospace">init(Conn, your_init_args) -> {ok, your_state}.</font></div><div><font face="courier new, monospace">terminate(Reason, State) -> ok.</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace">handle_broadcast(Message, State) -> {noreply, State}.</font></div><div><font face="courier new, monospace">handle_request(Request, From, State) -> {reply, Request, State}.</font></div>
<div><font face="courier new, monospace">handle_tunnel(Tunnel, State) -> {noreply, State}.</font></div><div><font face="courier new, monospace">handle_drop(Reason, State) -> {stop, Reason, State}.</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">main() -></font></div><div><font face="courier new, monospace"> % Register a new service to the relay</font></div><div>
<font face="courier new, monospace"> {ok, Server} = iris_server:start(55555, "cluster name", ?MODULE, your_init_args),</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> % Unregister the service</font></div>
<div><font face="courier new, monospace"> ok = iris_server:stop(Server).</font></div></div><div><br></div><div> As you can see above, you can have broadcasts (received by *all* members of a particular micro-service cluster (the name specified during registration above), requests (load balanced between *all* members of a particular cluster), tunnels for ordered and throttled stream oriented communication between two nodes, and pub/sub (API through a different module). No networking code involved, period.</div>
<div><br></div><div> Since seeing is believing, I invite anyone interested to look at the <a href="http://play.iris.karalabe.com/talks/binds/erlang.v1.slide">online Erlang playground</a>, which is a short introductory presentation of Iris and its Erlang binding, walking over each communication primitive with modifiable and executable code segments. Should it wet your appetites, further infos can be found in the <a href="https://github.com/project-iris/iris-erl/blob/master/README.md">Erlang quick-start guide</a>. Of course, the most valuable source of information is the <a href="http://iris.karalabe.com/">Iris website itself</a>, containing pre-built binaries and other language bindings on the <a href="http://iris.karalabe.com/downloads">downloads section</a>, recordings from live presentations on the <a href="http://iris.karalabe.com/talks">talks section</a> (FOSDEM, dotScale), a work-in-progress guide called <a href="http://iris.karalabe.com/book">The book of Iris</a> and last but not least, some <a href="http://iris.karalabe.com/papers">research papers</a> for the academically inclined. And if you really want to dive deep, all source code is available on <a href="https://github.com/project-iris">GitHub</a> (dev docs at <a href="http://iris.karalabe.com/docs/iris-erl.v1/index.html">edoc</a>).</div>
<div><br></div><div> Hope you like it, and if you have any questions or feedback, I'm more than happy to answer/react :)</div><div><br></div><div>Cheers,</div><div> Peter</div><div><br></div><div>PS: If you're interested enough, you are welcome into the Iris community at the <a href="https://groups.google.com/group/project-iris">project-iris</a> mailing list or <a href="https://twitter.com/iriscmf">@iriscmf</a> on Twitter.</div>
</div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote></div><br></div></div></blockquote></div><br></div></body></html>