Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a fairly in depth question which probably doesn't have an exact answer.

As a software engineer, I am usually tasked with working on a program or project with minimal understanding of how other components or programs in the project interact with each other. When one program fails in a sea of multiple components and processes, what infrastructure elements are necessary to ensure that the problem can be accurately tracked to the violating application?

More specifically, what infrastructure elements should be necessary for this large project and which are optional but very helpful. One such example I can think of is some form of a common logging infrastructure that allows for a developer or tester to easily browse through a log that contains numerous components for messages that might allude to the culprit program along with a "trail" of what happened before the issue occurred. I'm thinking of something similar to Androids alogcat tool.

These necessary infrastructure elements should be language-agnostic.

While these elements should be understood by all engineers on the team in question, which elements should be understood at great detail by the technical system engineers and what should the individual software engineers be responsible for adding to their tools to allow for such infrastructures to take hold?

Please feel free to ask for clarification if something does not make sense as I understand this question is very broad and needs some refinement. I will refine as necessary from the answers and comments I receive.

Thanks for any help!

Update:

I am entering in a team that has maybe 5% of the code with Unit Tests and is just beginning to Instrument and Monitor. Each software programmer (I say programmer and not engineer because not everyone on the team is an engineer) does not understand the basics of fail immediately and sanity checking. Much of our software baseline is legacy code and is in the process of being ported over. Unfortunately we don't have the man power to refactor a lot of the older components. This is what led me to try and understand if there there are necessary infrastructure tools that can be used to detect and find bugs at the source in a much quicker fashion. While I am not expecting a tool to magically do this, I was thinking there might be tools or configurations that allow for more easily finding bugs in a sea of components.

share|improve this question
    
I think you're asking what to study to deal with a large distributed system, these are the important things to know: Instrumentation, Failover, Durability, and Asynchrony. Instrumentation is the easiest one of these things to implement and handle, and supports the others, unfortunately often times it's the last implemented piece even though it can be invaluable. Asynchrony can be very tricky to get your head around so I would suggest studying this a lot and learning about all the different techniques used for it, things like publish-subscribe, continuation passing, sequence management –  Jimmy Hoffa Dec 4 '12 at 20:01
add comment

2 Answers

Take a look at Microsoft's Enterprise Library, a set of libraries, of Application Blocks, designed to be exactly that - commonly shared tools that are used across a large application. They include components for Caching, Exception Handling, Logging, Data Access and other pieces that are orthogonal to your actual business logic - they should stay pretty much the same for all modules.

Naturally, the components of the Enterprise Library aren't an exhaustive list, but they're a good place to start and see what is common to many applications, and therefore should be extracted from the main code into shared utility libraries.

share|improve this answer
add comment

When one program fails in a sea of multiple components and processes, what infrastructure elements are necessary to ensure that the problem can be accurately tracked to the violating application?

I would argue that you're asking the wrong question. It's good to prepare for the eventuality that things go wrong, but to depend on humans to do this in a large distributed systems defeats many of the benefits of the large distributed system...

Things to focus on instead:

  • Unit Tests - 80%+ of your code isn't going to interface with the IPC. Make sure it works (with various bad inputs, behaviors) and that eliminates many of the issues that can impact a particular application.
  • Monitoring - Trying to 'trace back' issues is going to end in frustration, even if your logging infrastructure is working properly. Having a good monitoring system setup to identify issues early and specific to the process lets you see immediately what had issues.
  • Design for unambiguity - Either fail or work. Don't pass along bad data; don't 'kinda work'. If an app identifies that its IPC pair has disconnected or done something odd, fail right there. It's then immediately apparent who is responsible.
share|improve this answer
    
What kind of examples or showcases you could give me for a monitoring system that does exactly what you state? –  jluzwick Dec 4 '12 at 21:59
    
@jluzwick I don't have any off hand. The two projects I work(ed) on for this sort of thing are closed source and the monitoring apps are specific internal tools. They tend to look like network monitoring displays, with a bunch of green and sometimes some graphs showing IPC throughput. –  Telastyn Dec 4 '12 at 22:11
    
I updated my question with a bit more detail into my team composition. –  jluzwick Dec 6 '12 at 1:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.