I am thinking of implementing a queue in one of the projects I am working on right now (sorry cannot go into more details until it gets published – hopefully in a few months). Anywyas, this is in C++ which needs to run on Ubuntu and my queueing experience (with C++ or otherwise) is only with MSMQ which is brilliant, but does not help me here as that run only on Windows. I also cannot use something like STL Queue as this will need to run across a number of machines and trying to sync between them would a royal pain. In other words, this needs to be distributed and async “loose” messaging. 🙂
I am already using MOOS, so one option is for me to continue to use that – however this is for another part of the application and it might be easier for me to use something else (still need to think it through a little more).
These are the requirements (these are must haves!). Also if it makes a difference I am using CDT for this project.
Needs to be able to run on Ubuntu 9.04 (and higher)
Needs to be Open Source (cannot be commercial)
Needs to be able to store messages “offline”
Needs to be able to run on TCP with minimal dependencies. It would be nice not to have a whole bunch of underlying dependencies.
Preferably be easy to use (as a consumer) – I don’t have much time to read through loads of documentation just to get my head around the underlying object model and how to use it.
C++ support (if it was not obvious until now)
I did a little research online and came across the following, and wanted to get some feedback:
ActiveMQ – seems like it has good C++ support via CMS (C++ Messaging Service).
Amazon SQS – not sure how good the C++ support is. If there is no library per se that I can use, then writing things around REST APIs might be more painful. Also I suddenly have a dependency to be able to go to the public internet. Also it is not free (though there is a free 100K messages / month).
MQ4CPP – seems quite amateurish (kudos to the guy writing it though – seems like an interesting project to pick up when once has time).
RabbitMQ – I know some guys used this at work (though that was using it in .NET); nothing for C++, but there some C experimental code; overall does not inspire confidence (in the context of C++).
OpenAMQ – seems quite interesting and also has a C++ API based on its WireAPI.
At face value it seems like this is down to ActiveMQ and OpenAMQ. Just looking at the quick samples between the two ActiveMQ seems like more C++ friendly and easier to use compared to OpenAMQ. Of course this is just the first impression and I could be completely wrong – it is not like I have had a chance to play with this (yet anyways).
Does anyone have any experience and feedback on this matter? Feel free to comment on this post, or tweet me.
Was getting a little bored with the previous WP theme and changed to this one. It does have a lot of defaults in the footer and not had a chance to figure out how to turn it off or customize it. If anyone has any ideas on how to do it then let me know. Also, if you have any suggestions for free and cool WP themes then let me know.
Cut the aubergines into roughly 3cm squarish chunks.
Put in a large mixing bowl and add the salt, some black pepper, sunflower oil and most of the olive oil (save about 3 tbsp for frying the chilli and garlic).
Toss and spread over two large baking sheets lined with non-stick baking parchment.
Roast for about 30 minutes – it’s important that the aubergines turn a good golden-brown colour.
Remove from the oven and leave to cool down.
While the aubergines are cooking:
Heat the reserved olive oil in a small saucepan and fry the chilli and garlic for about a minute, until the garlic turns a pale golden – watch out that you don’t cook it further, or it may burn and go bitter.
Transfer the chilli, garlic and oil to a large mixing bowl and add the cooked aubergine.
Add the vinegar and herbs, mix, taste and adjust the seasoning as necessary.
We were cleaning up the house – sort of like spring cleaning, except in Autumn and in old boxes came across a whole bunch of old stuff, which for me was a blast from the past and each with fond memories. Before I recycled/donated/threw it, took a few photos (click on them to see them in the original size).
The latest version of WordPress 3.0.3 and the Redirection plugin (v 2.2.3) don’t play nice together. If you upgraded to the latest version of WordPress the redirection plugin will always show only your last post on your blog’s homepage. Until the plugin is fixed, the only way around this is either not to upgrade to the latest version of WordPress (not recommended), or to disable the Redirection plugin.
Say you are writing a new stored procedure (for MySQL) and when you execute it, you get an error something like shown below – as you probably figured out all it means is that there is a syntax error with in the SQL. Often the error is misleading especially if it is a complicated query. One easy way to help narrow down the issue is to run it in a SQL Console which usually provides a better clue that can be your pointer to fixing the issue.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for
the right syntax to use near 'END' at line 17 (errno: 1064). Click 'Ignore' if you'd like to have this
error ignored until the end of the script.
If you run this script you will get the above error:
The main issue in my example above was that a delimiter (semi-colon in this case) was missing where the SQL statement finishes i.e. in the last WHERE condition. Here is a snippet of what the updated WHERE clause should look like.