Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Remove master_node dependency or full clustring support
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bip Thelin  
View profile  
 More options Jan 9 2012, 1:38 pm
From: Bip Thelin <bip.the...@evolope.se>
Date: Mon, 9 Jan 2012 10:38:11 -0800 (PST)
Local: Mon, Jan 9 2012 1:38 pm
Subject: Remove master_node dependency or full clustring support
Hi,

 We've just started digging into Chicago Boss and loving it so far.
From my understanding reading the docs and code CB is using global
modules to achieve "clustring" which means that one master_node is a
potential single point of failure. My first idea was to change this
behaviour from a normal gen_server to gen_leader. Since I've just done
a couple of projects with gen_leader I have fairly good insights into
it. But after spending a good 30min converting I felt that it might be
the wrong way to go. Here's a modified session controller that handles
creation of sessions on all nodes in a cluster:
https://github.com/bipthelin/ChicagoBoss/commit/48eded3c7a03166aac45f...

This only work for new sessions and dont't remove/update existing
sessions and before I code anything more I'd like to discuss some
design decisions since I don't (yet) have any deep knowledge of the
architecture.

My gut feeling is that there should be a more generic approach to
clustring instead of doing it specifically at every place. Some
gen_leader here, some mnesia there, etc.

If anyone with more insights in the code (Evan?) can provide some of
their ideas/visions of clustring, etc for CB I'd be glad to chip in my
0.5c and the corresponding code.

Thanks, Bip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Jan 9 2012, 8:53 pm
From: Evan Miller <emmil...@gmail.com>
Date: Mon, 9 Jan 2012 19:53:33 -0600
Local: Mon, Jan 9 2012 8:53 pm
Subject: Re: Remove master_node dependency or full clustring support
I've never used gen_leader so I can't say whether it's a good fit. In
general I think this is a hard problem because for true clustering
we'll need replication of data (not just services). I think you've
discovered the difficulty with session storage, but then we also need
to worry about making BossMQ (the message queue) truly distributed and
fault-tolerant. That sounds hard to me.

A more practical approach might be to clusterize the master_node
pure-computation services (i.e. incoming email), then for data
services just interface to external applications that have already
implemented fault-toleration. This is done for sessions (which can use
memcached), and could be done for the message queue as well. As much
as I like CB's batteries-included approach I think it's best to farm
out hard problems like data replication to other servers.

Evan

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cottlehuber  
View profile  
 More options Jan 9 2012, 9:26 pm
From: Dave Cottlehuber <d...@muse.net.nz>
Date: Tue, 10 Jan 2012 03:26:09 +0100
Local: Mon, Jan 9 2012 9:26 pm
Subject: Re: Remove master_node dependency or full clustring support
I'd love to add a couchdb backend for Boss and then point it at a
bigcouch cluster :-)))

The first part I hopefully will have time for in Feb.

Erlang FTW.

On 10 January 2012 02:53, Evan Miller <emmil...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Jan 9 2012, 9:44 pm
From: Evan Miller <emmil...@gmail.com>
Date: Mon, 9 Jan 2012 20:44:26 -0600
Local: Mon, Jan 9 2012 9:44 pm
Subject: Re: Remove master_node dependency or full clustring support
Incidentally, "Prehistoric Boss" (circa 2008) used CouchDB
exclusively. But I kept getting weird errors and gave up on my
NoSQL/Erlang dreams until I discovered Tyrant the next year. Ah,
memories.

Anyways, Couch is much more stable now and it'd be great to add it to the mix.

Evan

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Cottlehuber  
View profile  
 More options Jan 10 2012, 3:01 am
From: Dave Cottlehuber <d...@muse.net.nz>
Date: Tue, 10 Jan 2012 09:01:10 +0100
Local: Tues, Jan 10 2012 3:01 am
Subject: Re: Remove master_node dependency or full clustring support
On 10 January 2012 03:44, Evan Miller <emmil...@gmail.com> wrote:

> Incidentally, "Prehistoric Boss" (circa 2008) used CouchDB
> exclusively. But I kept getting weird errors and gave up on my
> NoSQL/Erlang dreams until I discovered Tyrant the next year. Ah,
> memories.

Any code remnants??


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bip Thelin  
View profile  
 More options Jan 10 2012, 4:39 am
From: Bip Thelin <bip.the...@evolope.se>
Date: Tue, 10 Jan 2012 10:39:41 +0100
Local: Tues, Jan 10 2012 4:39 am
Subject: Re: Remove master_node dependency or full clustring support

Good this was the kind of response I was looking for. A few notes on gen_leader(sometimes known as Paxos), it's an erlang behaviour where a cluster of services can dispatch messages to an elected leader and that leader can dispatch messages to all workers(i.e. gen_leaders but not elected leaders). If the elected leader goes down a new leader will be automatically elected and takes over the responsibilities. It's a simple and elegant solution for the problem when you have a bunch of services but at a given time you want only one of them performing something, like sending mail, etc. In my opinion it's a perfect candidate for a master_node setup.

It's not as much a perfect fit for clustring if you want a true horizontal approach with a "gossip" protocol like memcache or Riak.

This is where I stopped. I started with a gen_leader approach but felt halfway through that a true clustring approach is more suitable.

I agree that one (and a pretty good one) approach is to use external applications like memcached. My biggest gripe with this is ending up with dependencies on a bunch of different servers/applications and the hassle with configuring, running all of these and the eventual cyclic dependency hell. I'm not saying that this is where one ends up but I just had a rather unpleasant experience with Scribe(log transport for Hadoop) which ended up in us rolling our own(https://github.com/bipthelin/zerolog).

There is a fine line in keeping it simple to setup, use and maintain and ending up rolling your own Riak in the end. I like the "batteries-included approach" so I'll do some research and see what I come up with. But on another note gen_leader might be a good addition to some other parts of CB, just not as a distributed k/v.

--
Bip Thelin

Evolope AB | Lugnets Allé 1 | 120 33 Stockholm
Tel 08-533 335 37 | Mob 0735-18 18 90
www.evolope.se

On 10 jan 2012, at 02:53, Evan Miller wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Miller  
View profile  
 More options Jan 10 2012, 9:32 am
From: Evan Miller <emmil...@gmail.com>
Date: Tue, 10 Jan 2012 08:32:28 -0600
Local: Tues, Jan 10 2012 9:32 am
Subject: Re: Remove master_node dependency or full clustring support

On Tue, Jan 10, 2012 at 2:01 AM, Dave Cottlehuber <d...@muse.net.nz> wrote:
> On 10 January 2012 03:44, Evan Miller <emmil...@gmail.com> wrote:
>> Incidentally, "Prehistoric Boss" (circa 2008) used CouchDB
>> exclusively. But I kept getting weird errors and gave up on my
>> NoSQL/Erlang dreams until I discovered Tyrant the next year. Ah,
>> memories.

> Any code remnants??

Sure -- after minutes of digging under the hot Illinois sun, I found a
partial skeleton:

https://gist.github.com/1589346

--
Evan Miller
http://www.evanmiller.org/

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karmen Blake  
View profile  
 More options Jan 10 2012, 12:15 pm
From: Karmen Blake <dudebl...@gmail.com>
Date: Tue, 10 Jan 2012 09:15:48 -0800 (PST)
Local: Tues, Jan 10 2012 12:15 pm
Subject: Re: Remove master_node dependency or full clustring support

+1 for couchdb :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Florent Gallaire  
View profile  
 More options May 19 2012, 11:50 pm
From: Florent Gallaire <fgalla...@gmail.com>
Date: Sun, 20 May 2012 05:50:52 +0200
Local: Sat, May 19 2012 11:50 pm
Subject: Re: Remove master_node dependency or full clustring support
The master_node problem is an important design choice, and fix it
could be really complex.
But is it on the roadmap ?

Cheers

Florent

--
FLOSS Engineer & Lawyer


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »