ACE vs Boost vs POCO [closed]
Asked Answered
W

10

105

I have been working with the Boost C++ Libraries for quite some time. I absolutely love the Boost Asio C++ library for network programming. However I was introduced to two other libraries: POCO and Adaptive Communication Environment (ACE) framework. I would like to know the good and bad of each.

Writing answered 14/6, 2009 at 3:24 Comment(1)
ACE is the "ultimate network programming swiss army knife" for C++ programming, but last I checked it was also a huge monster dependency in itself.Loophole
M
99

As rdbound said, Boost has a "near STL" status. So if you don't need another library, stick to Boost. However, I use POCO because it has some advantages for my situation. The good things about POCO IMO:

  • Better thread library, especially a Active Method implementation. I also like the fact that you can set the thread priority.

  • More comprehensive network library than boost::asio. However boost::asio is also a very good library.

  • Includes functionality that is not in Boost, like XML and database interface to name a few.

  • It is more integrated as one library than Boost.

  • It has clean, modern and understandable C++ code. I find it far easier to understand than most of the Boost libraries (but I am not a template programming expert :)).

  • It can be used on a lot of platforms.

Some disadvantages of POCO are:

  • It has limited documentation. This somewhat offset by the fact that the source is easy to understand.

  • It has a far smaller community and user base than, say, Boost. So if you put a question on Stack Overflow for example, your chances of getting an answer are less than for Boost

  • It remains to be seen how well it will be integrated with the new C++ standard. You know for sure that it will not be a problem for Boost.

I never used ACE, so I can't really comment on it. From what I've heard, people find POCO more modern and easier to use than ACE.

Some answers to the comments by Rahul:

  1. I don't know about versatile and advanced. The POCO thread library provides some functionality that is not in Boost: ActiveMethod and Activity, and ThreadPool. IMO POCO threads are also easier to use and understand, but this is a subjective matter.

  2. POCO network library also provides support for higher level protocols like HTTP and SSL (possibly also in boost::asio, but I am not sure?).

  3. Fair enough.

  4. Integrated library has the advantage of having consistent coding, documentation and general "look and feel".

  5. Being cross-platform is an important feature of POCO, this is not an advantage in relation to Boost.

Again, you should probably only consider POCO if it provides some functionality you need and that is not in Boost.

Mcinnis answered 14/6, 2009 at 7:5 Comment(5)
From what little I have learned about POCO, things dont seem to add up: 1. boost thread seems much more versatile and advanced. 2. POCO is more versatile in what ways? 3. I am only interested in networking. XML and database do not concern me. 4. Integrated as one library? I am not sure if thats a good or bad thing? 5. Boost I believe (and that goes for boost::asio also) is also quite crossplatform.Writing
@Rahul I tried to answer some of your points in the answer.Mcinnis
I haven't looked at POCO recently, but it when I did look at it a few years ago I was put off by the fact that components seemed to use a mixture of licenses. Some used the Boost license, others were GPL. Some of the encryption stuff required a license for commercial use. I don't know what the current licensing situation is with POCO, but I would look at that carefully before using it.Stjohn
POCO is entirely licensed under the Boost license (for future reference).Life
One advantage of Poco is it has much faster compile times. Because Boost generally relies on lots and lots of code in headers, compile times can be slow. With poco there is more dynamic linking which reduces compile time. There is also a security advantage also, as the user can update the .so/.dll without having to recompile everything.Anstus
P
33

I've used all three so here's my $0.02.

I really want to vote for Doug Schmidt and respect all the work he's done, but to be honest I find ACE mildly buggy and hard to use. I think that library needs a reboot. It's hard to say this, but I'd shy away from ACE for now unless there is a compelling reason to use TAO, or you need a single code base to run C++ on both Unix variants and Windows. TAO is fabulous for a number of difficult problems, but the learning curve is intense, and there's a reason CORBA has a number of critics. I guess just do your homework before making a decision to use either.

If you are coding in C++, boost is in my mind a no-brainer. I use a number of the low level libraries and find them essential. A quick grep of my code reveals shared_ptr, program_options, regex, bind, serialization, foreach, property_tree, filesystem, tokenizer, various iterator extensions, alogrithm, and mem_fn. These are mostly low-level functionality that really ought to be in the compiler. Some boost libraries are very generic; it can be work to get them to do what you want, but it's worthwhile.

Poco is a collection of utility classes that provide functionality for some very concrete common tasks. I find the libraries are well-written and intuitive. I don't have to spend much time studying documentation or writing silly test programs. I'm currently using Logger, XML, Zip, and Net/SMTP. I started using Poco when libxml2 irritated me for the last time. There are other classes I could use but haven't tried, e.g. Data::MySQL (I'm happy with mysql++) and Net::HTTP (I'm happy with libCURL). I'll try out the rest of Poco eventually, but that's not a priority at this point.

Photomechanical answered 24/8, 2013 at 1:13 Comment(2)
Good description , thanks.Tipstaff
I would want to add that Poco Net package provides a really good frame for making a HTTP service. I'm coming from mostly Go backend and creating a backend with Poco was intuitive for the most part, that should say something. Other notable things are JSON support, Multipart, SSL, the smart pointers (so you can develop without Boost). As a comparison I looked over Boost/Beast first when I was searching a library for this and it seemed not enough in terms of a modern HTTP frame.Biarritz
M
23

Many POCO users report using it alongside Boost, so it is obvious that there are incentives for people in both projects. Boost is a collection of high-quality libraries. But it is not a framework. As for ACE, I have used it in the past and did not like the design. Additionally, its support for ancient non-compliant compilers has shaped the code base in an ugly way.

What really distinguishes POCO is a design that scales and an interface with rich library availability reminiscent of those one gets with Java or C#. At this time, the most acutely lacking thing from POCO is asynchronous IO.

Mattingly answered 15/11, 2009 at 15:18 Comment(0)
A
13

I have used ACE for a very high performance data acquisition application with real time constraints. A single thread handles I/O from over thirty TCP/IC socket connections and a serial port. The code runs on both 32 and 64 bit Linux. A few of the many ACE classes I have used are the ACE_Reactor, ACE_Time_Value, ACE_Svc_Handler, ACE_Message_Queue, ACE_Connector. ACE was a key factor to the success of our project. It does take a significant effort to understand how to use the ACE classes. I have all the books written about ACE. Whenever I have had to extend the functionality our system it typically takes some time to study what to do and then the amount of code required is very small. I have found ACE to very reliable. I also use a little bit of code from Boost. I do not see the same functionality in Boost. I would use either or both libraries.

Adroit answered 9/8, 2011 at 16:39 Comment(0)
P
12

I recently got a new job and work on a project that uses ACE and TAO. Well, what I can tell is, that ACE and TAO work and fully accomplish their tasks. But the overall organisation and design of the libraries are quite daunting...

For example, the main part of ACE consists of hundreds of classes starting with "ACE_". It seems like they've ignored namespaces for decades.

Additionally, many of ACE's class names don't provide useful information either. Or can you guess what classes like ACE_Dev_Poll_Reactor_Notify or ACE_Proactor_Handle_Timeout_Upcall can be used for?

Additonally, the documentation of ACE is really lacking, so unless you want to learn ACE the hard way (it is really hard without any good documentation..), I would NOT recommend using ACE, unless you really need TAO for CORBA, If you don't need CORBA, go ahead and use some modern libraries..

Palindrome answered 18/1, 2010 at 23:20 Comment(0)
Q
7

Boost enjoys a "near STL" status due to the number of people on the C++ standards committee who are also Boost developers. Poco and ACE do not enjoy that benefit, and from my anecdotal experience Boost is more widespread.

However, POCO as a whole is more centered around network-type stuff. I stick to Boost so I can't help you there, but the plus for Boost is its (relatively) widespread use.

Quadric answered 14/6, 2009 at 5:18 Comment(0)
S
7

The ACE socket libraries are solid. If you are trying to port a standard implementation of sockets you can't go wrong. The ACE code sticks to a rigid development paradigm. The higher level contructs are a little confusing to use. The rigid paradigm causes some anomolies with exception handling. There are or used to be situations where string value pairs being passed into an exception with one of the pair being null causes an exception throw in the exception that will boggle you. The depth of the class layering is tedious when debugging. I have never tried the other libraries so can't make an intelligent comment.

Synchronize answered 15/2, 2011 at 18:49 Comment(0)
F
4

Out of those I've only ever really used ACE. ACE is a great framework for cross-platform enterprise networking applications. It's extremely versatile and scalable and comes with TAO and JAWS for quick, powerful development of ORB and/or Web based applications.

Getting up to speed with it can be somewhat daunting, but there is a lot of literature on it, and commercial support available.

It's somewhat heavy though, so for smaller-scale apps it may be a bit of an overkill. Reading the summary for POCO it sounds like they're aiming for a system that can be run on embedded systems so I'm assuming it can be used in a much lighter way. I may now give it a whirl :P

Fluoric answered 14/6, 2009 at 4:0 Comment(0)
S
4

Boost is great, I've only heard good things about POCO (but never used) but I don't like ACE and would avoid it in future. Although you will find fans of ACE you will also find many detractors which you don't tend to get with boost or poco (IME), to me that sends a clear signal that ACE is not the best tool (although it does what it says on the tin).

Spunky answered 16/6, 2009 at 18:47 Comment(2)
ACE has been around for a very long time, and has had to support many legacy platforms over the years. This is one of the reasons why it isn't as modern Boost, for example. A great deal of extremely useful research and literature came out of ACE (see Doug Schmidt's CV) that others have been able to leverage and build on. Naturally, others will learn from mistakes made in older libraries and improve on them. Others will also come up with completely new ways of doing similar things as well. Don't be too hard on ACE. I'm also a big fan of Boost. Admittedly, I've never used POCO.Blessed
ACE was started at a time when compilers were very incompatible (no standard existed yet), and templates were a complete nightmare (1996/1997) and there were a hundred Unix-like platforms. I evaluated ACE+TAO for a project - we eventually settled on OmniORB, TAO was so immature it broke with every new release. ACE on the other hand was a rock. It shows it age, in terms of library setup, but it's solid, and it has a large following. I did fear a bit of the benevolent dictator however - if Schmidt ever went boots up, ACE might be trouble. I don't get that feeling with Boost.Capernaum
K
0

I think it is really matter of an opinion, there is hardly a right answer.

In my experience with writing portable Win32/Linux server code (15+ years), I personally find boost/ACE unnecessarily bloated and introduces maintenance hazards (otherwise known as "dll hell") for the little advantage they give.

ACE also seems to be horribly outdated, it is a "c++ library" written by "c programmers" in the 90-s and it really shows in my opinion. It so happens, right now I am re-engineering the project written with Pico, it seems to me it completely follows the ACE idea, but in more contemporary terms, not much better at that.

In any case for high performance, efficient, elegant server communications you might be better off not using any of them.

Kendyl answered 1/6, 2015 at 16:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.