Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #241
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@ieee-dot-org.invalid> |
| Newsgroups | comp.programming.threads, comp.lang.c++, comp.unix.programmer, comp.unix.solaris |
| Subject | Re: reengineering c++ code that uses pthreads on Sun Solaris |
| Date | Thu, 02 Jun 2011 20:42:00 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 78 |
| Message-ID | <is9an7$dc7$1@dont-email.me> (permalink) |
| References | <9dfaebc1-94b7-4e0d-b04b-30edfc99282c@d28g2000yqf.googlegroups.com> <F_adnblYXLqEPXrQnZ2dnUVZ_jmdnZ2d@giganews.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Fri, 3 Jun 2011 00:43:19 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="BrOwaJANne849xlH+KPYjQ"; logging-data="13703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185HM+1OaEvATbjEfg+pDcl" |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
| In-Reply-To | <F_adnblYXLqEPXrQnZ2dnUVZ_jmdnZ2d@giganews.com> |
| Cancel-Lock | sha1:a0QMbtHZMmyW+HWJW/EPNYMYgZg= |
| Xref | x330-a1.tempe.blueboxinc.net comp.programming.threads:241 comp.lang.c++:6109 comp.unix.programmer:719 comp.unix.solaris:754 |
Cross-posted to 4 groups.
Show key headers only | View raw
On 6/2/2011 10:36 AM, Richard B. Gilbert wrote:
> On 6/1/2011 9:22 PM, My Python wrote:
>> greetings All,
>>
>> Please respond to this posting if you have ever involved in a rewrite
>> of a complicated software system or driven such a project or have
>> insight into reengineering aspects:
>>
>> Context:
>>
>> Originally written using C++/pthreads on Sun Solaris, we need to
>> rewrite a component of a large system, so (A) the database,
>> communications (with other SW and devices), event management
>> infrastructure needs to be kept (so some reengineering in order), (B)
>> the rest of the logic code has to be rewritten or refactored whichever
>> suits the purpose. (C) The primary purpose of the rewrite is the code
>> has become difficult to maintain. Over 180,000 lines of code and uses
>> pthreads, code was written about 10 years ago with lot of changes
>> impacting the code maintainablity to date.
>>
>> Challenges:
>>
>> 1. Reengineering tool for reusing the classes by feeding this huge
>> amount of code (A). Rational rose chokes on this and I need a better
>> tool. Do any of you use a reeng tool for this size of C++ code, if so
>> throw some light this tool, forums, your experience using this, etc.
>>
>> 2. while the logic is complicated (B), there are several portions of
>> code which can be treated as modules and adapted to a clear threading
>> model, instead of what we have now a hodge-podge of thread startegies,
>> this will celar up the data sync issues (deadlocks) and race condition
>> related bugs. But I can't find any one book that addresses various
>> threading models with pthreads in context with examples (I need good
>> books pictures or diagrams). Any suggestions?
>>
>> 3. Any suggestions on code maintainability -- that is, the design
>> aspects we need to consider while rewriting. (C) Rather than pointing
>> to something like design patterns etc, what is really desired is
>> learning from how do others refactor/write (original code) large
>> amounts of code that interacts with lot of HW devices and SW
>> components?
>>
>> Any URLs, case studies of such projects, responses to A,B,C 1,2,3 are
>> appreciated!
> [...]
> It *might* be worth while to to re-engineer what you have but I would
> give serious consideration to designing and implementing a solution from
> the bottom up!
Seconded. The code in question is only 0.18Mlines of fairly
recent vintage, and you should be able to figure out its purpose
even if its implementation is unfashionable. (Put it this way: If
you can't figure out the purpose, how will you know whether your
rewrite is successful?)
So: Analyze, deduce a fresh set of specs, implement the specs,
test for adherence thereto.
-OR-
Think again about your reasons for jettisoning the existing
code. From what you say, it really can't be All That Bad. It uses
a recognized, standardized, and still-current programming language,
not some off-the-wall idiosyncratic extended Lisp-Basic blend. It
uses a multi-threading framework that's also standardized, still
current, and supportable, not some ad-hoc collection of home-brewed
spin-locks. It's possible you might be better off spending N man-
years on a cleanup than spending 2N wrestling with tools that get
you nowhere and another 8N on a re-implementation.
Or not. But base your decision on sound engineering estimates
and a rigorous cost-benefit analysis, not on a feel for what's
trendy today. I can almost guarantee that if you reimplement just
to be trendy, by the time you're done the trend will have passed.
--
Eric Sosman
esosman@ieee-dot-org.invalid
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
reengineering c++ code that uses pthreads on Sun Solaris My Python <mypython_2010@yahoo.com> - 2011-06-01 18:22 -0700
Re: reengineering c++ code that uses pthreads on Sun Solaris Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-01 18:31 -0700
Re: reengineering c++ code that uses pthreads on Sun Solaris Ian Collins <ian-news@hotmail.com> - 2011-06-02 13:41 +1200
Re: reengineering c++ code that uses pthreads on Sun Solaris Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-02 06:06 +0000
Re: reengineering c++ code that uses pthreads on Sun Solaris pasa <pasa@lib.hu> - 2011-06-02 03:01 -0700
Re: reengineering c++ code that uses pthreads on Sun Solaris "Richard B. Gilbert" <rgilbert88@comcast.net> - 2011-06-02 10:36 -0400
Re: reengineering c++ code that uses pthreads on Sun Solaris Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-06-02 20:42 -0400
Re: reengineering c++ code that uses pthreads on Sun Solaris Miles Bader <miles@gnu.org> - 2011-06-03 10:39 +0900
Re: reengineering c++ code that uses pthreads on Sun Solaris "Ira Baxter" <idbaxter@semdesigns.com> - 2011-06-03 10:56 -0500
csiph-web