 |
|
 |
I'm wondering what is the status of this code? Are you still using and developing this software? I see that the last release was in April.
We are developing a wireless asset tracking system, www.s5w.com, and I'm thinking of using SAFMQ internally.
Thank you,
Robert Mecklenburg
|
|
|
|
 |
|
 |
Yes, we're still working on the software, but haven't made any big steps in a while. Most recently I've been working on a JMS compliant API interface.
|
|
|
|
 |
|
 |
Matt,
Are you still here as it were?
James
|
|
|
|
 |
|
 |
Hello mattbattey,
SAFMQ does not work if I haven't made de directory /var/safmq/queues (declared in safmq.conf) manually. Better is to make the directory automatically: See mkdir in file storage.c gnunet-0-7-0e.tar.gz (www.gnunet.org) how that can be done.
/**
* Implementation of "mkdir -p"
* @param dir the directory to create
* @returns OK on success, SYSERR on failure
*/
int mkdirp(const char * dir)
If the directory is made automatically some logging could be fine, see www.ntp.org in ntp-dev-4.2.3p34.tar.gz in file msyslog.c for some suggestions.
/*
* msyslog - either send a message to the terminal or print it on
* the standard output.
*
* Converted to use varargs, much better ... jks
*/
Greetings Jan Marco
P.S. Why not store the messages of SAFMQ in a database application like MySQL?
|
|
|
|
 |
|
|
 |
|
 |
Hi,
Did you ever get a valid email address, as I am having issue compiling for linux \ mac osx.
Although it works correctly in windows.
In each case I get an error “Unable to continue, _timezone required for use” when I run ./configure, if I comment out that section in code it runs correctly but then I get other issues when I try to make the files.
i.e.
+ bin.4.2.1/uuidgen.o
shared/uuidgen/uuidgen.c:312:2: error: #error No Mac Address Locator defined
shared/uuidgen/uuidgen.c: In function ‘void rmshm(int)’:
shared/uuidgen/uuidgen.c:338: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘int’
shared/uuidgen/uuidgen.c:338: warning: format ‘%ld’ expects type ‘long int’, but argument 2 has type ‘int’
make: *** [bin.4.2.1/uuidgen.o] Error 1
Do you have any ideas how to resolve this issue?
|
|
|
|
 |
|
 |
Don't think I ever did get a reply. I'm not a Linux / OSX guy, but suggest you work out where _timezone comes from and resolve that issue.
|
|
|
|
 |
|
 |
I read in the todo list file that you plan to add java JMS support. Do you have any idea when this feature can be ready.
I need to build some kind of gateway between a jsp page and an existing microsoft message queue implementation (which does not has ans JMS support). I am there looking for an alternative like safmq.
kind regards,
Ronny Aerts - Belgium
|
|
|
|
 |
|
 |
I've been making an initial attempt at writing a JMS API for Safmq. Some progress has been made, but is ready for distribution yet. Most of the update notices go out via freshmeat.net and sourceforge.net. So those would be a good place to check.
|
|
|
|
 |
|
 |
The safmq configuration files uses its own format. Could it be a suggestion to use the xml format for this file so it gets more readable?
kind regards,
Ronny Aerts - Belgium
|
|
|
|
 |
|
 |
I am very interested in the use of SAFMQ under windows since this looks very good .
I therefore downloaded the source files and compiled them without any problem. I then installed the safmq.exe as nt service. I did this by executing (using win2000) start/run and gave command "C:\oper\safmq\safmq.exe -i" since I copied the software under c:\oper\safmq. The service code was unable to start since the path of the service was set to "C:\oper\safmq\C:\oper\safmq\safmq.exe" and you can notice that this should be "C:\oper\safmq\safmq.exe".
I took a look into your source code and found module main.cpp with following statements:
if (install) {
char path[1024];
getcwd(path,sizeof(path));
strcat(path,"\\");
strcat(path,argv[0]);
createService(path);
if (!daemon && !remove)
return 0;
}
These statements work fine (with the expected result) if executed from the same directory as the safmq.exe application but one gets the unexpected result (as I did) if ran from anywhere else.
kind regards,
Ronny Aerts - Belgium
|
|
|
|
 |
|
 |
Thanks for the bug report! I've added this problem to the list of TODO items, and it should make it into the next release. I hope to build an Windows installer for SAFMQ also, to make it easier to install.
-Matt
|
|
|
|
 |
|
 |
Hi Mathew,
Thanks for the article and letting us know about your project on Sourceforge. I haven't done any work in this area, but have been gathering info for a possible future project.
Two other MQ Libs I have filed away are MQ4CPP http://www.sixtyfourbit.org/mq4cpp.htm[^]and XmlBlaster http://www.xmlBlaster.org/[^] xmlBlaster looks particularly interesting.
Would you care to comment on SAFMQ vs. these and why you decided to implement your own library.
Thanks.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|
 |
|
 |
I’ll answer your last question first: I didn’t know about MQ4CPP or XmlBlaster when I started work on SAFMQ... I did a search for “message queue” on freshmeat.net, sourceforge.net, and codeproject.com, and I wasn’t able to find what I was looking for, which was a store and forward message oriented communication mechanism, specifically to reduce the load on a high volume database server and move the data to a data warehouse in real-time, with the requirement that the publisher and subscriber need not be operating at the same time. Even when I published this article, I hadn’t heard of MQ4CPP or XmlBlaster, thanks for pointing them out to me!
One difference between SAFMQ and both MQ4CPP and XmlBlaster is the software license. I’ve chosen to use the Apache 2.0 license, whereas MQ4CPP and XmlBlaster have chosen the LGPL (GNU) license. Under Apache 2.0, commercial products may included SAFMQ in object form with or without modification and sell their product for profit at a price greater than the distribution media, as long as attribution is given to SAFMQ as being licensed under Apache 2.0 and that the copyright owner is “Matthew Battey,” and if modifications have been made to SAFMQ they must be noted. However, under LGPL, the software must remain free of cost, save the cost of distribution media, and depending on how one reads the LGPL, your code that uses an LGPL library must also be provided to the general public in an open-source form. Now, I am not an expert on LGPL licensing, and if I have misinterpreted its language, please correct me.
If I were to compare SAFMQ to XmlBlaster, the first note I would make is about architecture. The SAFMQ server is written in C & C++, and uses standard libraries. One exception is that optionally it can use OpenSSL for encrypted communication, but this is not required (OpenSSL is also under an Apache style license, btw). I don’t have a great under standing of XmlBlaster, but it looks like you need a CORBA orb to achieve high performance from it. Notably, the performance listed at XmlBlaster’s website is on an older machine (an AMD-K7 600 MHz) they received 672 messages per second. In tests under Linux with a 3.4 GHz PIV, with 768 MB, we received > 5900 messages per second using the C++ API and > 5200 messages per second using the Java API. These aren’t apples to apples comparisons, so you may need to experiment on your own. SAFMQ doesn’t require the use of XML, although it is possible to pass XML documents in the message buffer. To XmlBlaster’s benefit, it has a very wide range of transport protocols and client API libraries. XmlBlaster seems to be mature, and has been around a while, and has a very wide feature set, and has a great website detailing its features and benefits.
On MQ4CPP, in the short time I had to look at it, I was able to under stand less than I did about XmlBlaster. However, from my initial reading of code snippets, I saw what looked as though MQ4CPP did not have a central server. Instead, one would implement a server via use of MQ4CPP’s framework, instantiate it, and then clients could attach and deliver messages. Storing and Forwarding message can be accomplished by coding this feature into the “server” MessageQueue object. Also it appears that MQ4CPP is a C++ only suite. Also it appears the MQ4CPP supports encryption, but at the message level, instead of at the protocol level. Whereas SAFMQ supports SSL for communications, so the entire data exchange is encrypted, via both C++ or Java API.
I don’t claim to be an expert on either MQ4CPP or XmlBlaster, so please point out omissions, errors, and ignorance on my part.
|
|
|
|
 |
|
 |
Mathew, thanks for the reply. I really can't comment much on MQ4CPP or XmlBlaster other than to say XmlBlaster looks like a very complete, well thought out, well documented and supported package. MQ4CPP also looks interesting but from memory isn't well documented and doesn't have the backing that XmlBlaster does.
As for LGPL it is my understanding it can be used in commercial applications and without having to provide source. GPL has the restrictions you refer to. That said I could be wrong.
If and when I do actually get around to seriously checking out SAFMQ and XmlBlaster I'll very happily provide whatever feedback I can.
As an aside I found the Download section over at Sourceforge a bit confusing as there were lots of Java downloads but it wasn't obvious where the C++ code was. Also the site could be clearer on C++, Java and PHP and where these fit.
Keep up the good work.
Neville Franks, Author of Surfulater www.surfulater.com "Save what you Surf" and ED for Windows www.getsoft.com
|
|
|
|
 |
|
 |
Thanks for point out the labeling problems on the download seciton at Sourceforge. I've relabeled the server and C++ api. Sorry about that confusion.
|
|
|
|
 |
|
 |
Dear Matt,
I am the author of MQ4CPP project. Thank you for mention my work in your discution.
Your analysis is correct: MQ4CPP is a suite and not a server. I developed MQ4CPP to create a C++ framework to support messaging between threads without care of where they are phisically running. Multiple threads in a process could comunicate with other threads in another process using the same TCP/IP connection and each thread can use an own encription. Multiple socket listeners can be instantiated in a process but MQ4CPP doesn't have a client/server architecture because it is more similar to a grid computing architecture, allowing developers to build networks of distributed threads (eg. think a Fast Fourier Transfom where each layer is distributed on multiple nodes).
MQ4CPP is part of my new project True3DShell, where I'm building an OpenGL based 3D Desktop Environment.
I choosed LGPL to leave each developer to boundle MQ4CPP library in the final binary code. From the documentation point of view, when I have time, I'll include doxygen tags to generate javadoc-like docs.
Regards
Riccardo Pompeo
|
|
|
|
 |
|
 |
Nice to meet you Riccardo. Thanks for clearing up my misconception about the LGPL.
From reading your examples and looking at the code I noticed just what you are pointing out about MQ4CPP's architecture. I was particularly impressed with the MessageQueue abstraction in the MessageProxy class. I like the ideas you are using, and can see where MQ4CPP is helpful in a distributed multi-processing environment.
Thanks again for the comments.
|
|
|
|
 |
|
 |
I had a quick look at the documentation and it took a little while to get my head around both the 'Publisher' and 'Subscriber' being the same class ie MQConnection - was there a particular reason for that ? (I guess one could create seperate Publisher and Subscriber classes derived from MQConnection if they wanted a clear delineation)
(Im not criticising - just sharing thoughts)
The other thing I would have to think about, is that it appears that a Subscriber appears to subscribe to a particular queue, and all messages on that queue - rather than particular messages by subject/topic...
.. then again, no-where do you imply that you're out to compete with any of the large commercial products, so as long as it does what you want, I say well done and thanks for the hard work
'g'
ps.. despite my musings, I voted you a '5'
-- modified at 4:53 Tuesday 17th January, 2006
|
|
|
|
 |
|
 |
Thanks for the compliments!
Interesting observation about the publisher and subscribers. As far as the classes go, I saw the Publisher and Subscriber more as a pattern of use, but these paradigms could be extended into the API, and you make a good point.
In my mind, I see a message queue as a subject itself. There’s really no limit to the number of queue’s one can have, or for that matter SAFMQ servers. On the other hand, enhancing the Message Class characteristics of a message and having an API call to filter by message class would provide a more detailed server based filtering.
There is a way to perform request-response type messaging, and it can be on the same queue or multiple queues. When a message is published, by the “requestor” via MQConnect::Enqueue() or MessageQueue::Enqueue() the object passed is modified and is supplied with a Message ID which was assigned to the server. That id can be used to relate a response message by having the “responder” place the request message’s Message ID in the Recipt ID field of the response message. Then the “requestor” can make a call to MQConnect::RetrieveID() or MessageQueue::RetrieveID() and receive the response sent by the “responder”. Basically, the Message ID of the request message is a sort of session id.
Back to the message subject/topic… I’m looking for input on improvements would a simple numeric value be what is needed or are would some sort of character string be better?
|
|
|
|
 |
|
 |
mattbattey wrote: In my mind, I see a message queue as a subject itself.
as I said, I wasnt critcising, just observing .. one possible issue with this though, is that 'lots of subjects' requires 'lots of message queues', and this may have management/performance implications - hence my comments on 'subject/topic'
mattbattey wrote: Back to the message subject/topic… I’m looking for input on improvements would a simple numeric value be what is needed or are would some sort of character string be better?
What works in your situation would obviously be better for you (and I think really, for 'free software', what can people expect ?), but if you were doing it anyway, I'd prefer a character string myself - its easy to represent a number in string form if required - the other way around just doesnt equate
'g'
ps .. I see someone has been voting this down without providing comments why - sigh !!! .. dont pay creedence to that sort of behaviour
-- modified at 16:17 Tuesday 17th January, 2006
|
|
|
|
 |
|
 |
I see your point about many subjects leading to many queues.
Thanks for your input about filtering topic labels, I think I'll add that to the TODO list, which also includes things like transactions, a PHP interface, and native .NET code.
Thanks again for your input, Garth.
|
|
|
|
 |
|
 |
mattbattey wrote: Thanks again for your input, Garth.
no worries at all Matthew - I'll look forward to seeing more on SAFMQ in the future ..
|
|
|
|
 |