Monday, August 11, 2014

Adding static Routes in OSX

Just a quick correction to this blog entry:

Note: Edit the IP addresses listed below to match your network.

Create two files:  /Library/StartupItems/AddRoutes/AddRoutes

# Set static routing tables

. /etc/rc.common

StartService ()
  ConsoleMessage "Adding Static Routing Table"
  route -n add -net

StopService ()
return 0

StopService ()
return 0

RestartService ()
return 0

RunService "$1"

 And: /Library/StartupItems/AddRoutes/StartupParameters.plist

Description = "Add static routing tables";
Provides = ("AddRoutes");
Requires = ("Network");
OrderPreference = "None";

Set everything as executable:
chmod 755 /Library/StartupItems/AddRoutes/*

Finally, reboot and check if your new routes "stuck":
netstat -rn

Monday, February 24, 2014

Rabbit MQ - Replication Options

When you need to replicate data with Rabbit MQ there are three main choices:
  • Federation plugin (Federated Exchanges).
  • Shovel Plugin
  • Mirror Queues (Part of the basic Rabbit clustering)
A useful starting point when trying to decide which to use is to examine where the various options read messages from and where they write the messages to:

Message Source
Exchange Queue
Target Exchange Federated Exchange Shovel
Queue Mirror Queue

Note: The federation plugin actually creates a temporary queue bound to the source exchange in order to collect messages however since this queue is configured automatically you are effectively reading messages from the source exchange.

However there is a much easier way to choose the right option for you:

If you are replicating data between clusters you need either the federation plugin or the shovel plugin.
If you are simply want redundant copies of the data within the same cluster use mirror queues.

In practice the choice between the federation and shovel comes down to:
  • The federation plugin is much simpler to setup, however it only supports "pulling data".
  • Where as the shovel plugin has to be manually configured, but data can be pulled or pushed**. 
** Pushing data means that the system where the shovel plugin is installed is pushing data to the other clusters. Where as pulling means that the system where shovel is installed is pulling data from the remote cluster.

Therefore if your pulling data your better off with the federation plugin, however if you need to push it you will be forced to use shovel.

Thursday, January 2, 2014

Building Readline 6.2 on Mavericks

This is not a long post, as the only additional step I have introduced is Step #4 - editing the Makefile
  1. cd /usr/local/src
  2. tar -zvxf readline-6.2.tar.gz
  3. cd readline-6.2
  4. vi shlib/Makefile
  5. make
  6. sudo make install

When you edit the Makefile (Step # 4) make the following change:

Change line #84 from:
SHOBJ_LDFLAGS = -dynamic

SHOBJ_LDFLAGS = -dynamiclib