Distributed Storage Framework
Hello!
We are discussing to implement a DSF, and we argue about the pattern Observer and logging. We have read several documents that recommend monitoring for any kind of distributed system because the high number of unexpected failures, bugs, etc.
The problem we are discussing is regarding the pattern observer and logging. A designer suggests that most of the important objects are observed and logged. Another designer suggests no observation at all, and only logging.
The problem seems to be the lack of knowledge of both of them or at least the lack of sufficient motivation for their solutions.
I wonder what other designers suggest/ think about this problem, and what the adv are / dis adv of the possible solutions.
[755 byte] By [
skalstera] at [2007-11-26 23:50:02]

# 1
I guess a lot depends on what is meant by 'observing'. In real terms, you observe events, not Objects. The next question is what will be observing these things.
I'm not sure if this is pertinent but a logging framework such as log4j can be configured to send log statements to pretty much anything you want. I would suggest, however that you make such things as asynchronous as possible to avoid a negative impact on performance.
# 2
Thanks for you reply, I expressed wrong what I meant. The first question will be if is it a good design practice to observe the events for receiving and storing data or is the same to log all those events making observation unnecessary?Is it more clear the question?
# 3
> Thanks for you reply, I expressed wrong what I meant.
> The first question will be if is it a good design
> practice to observe the events for receiving and
> storing data or is the same to log all those events
> making observation unnecessary?
Sorry, but I'm not sure of the distinction between logging and the above.
# 4
> Hello!
>
> We are discussing to implement a DSF, and we argue
> about the pattern Observer and logging. We have read
> several documents that recommend monitoring for any
> kind of distributed system because the high number of
> unexpected failures, bugs, etc.
I would like to see the documentation that supports that "any" distributed system would have failures that would require specific monitoring.
Certainly distributed transaction systems and database replication systems exist and they can handle problems without any more monitoring than might be expected from a more complex system.
And why are you building such a system rather than just buying one?
# 5
Well, so far I have look for many frameworks and the only thing we have founded that meet the requirements is proactive, open source and free.
We haven't founded any commercial DSF platform independent, based on java 1.4 , that works for both files or DB and it's mature enough.
Message was edited by:
skalster
Message was edited by:
skalster
# 6
I just wonder the difference between logging with a framework like log4j and implementing in the design the observer pattern.Is it the same? is there any pro - con ?
# 7
There are significant differences between the Observer object-oriented design pattern and the logging process in an application.
First, logging does not play any role in the functionality of an application. In other words, logging is not used to implement features of an application and logging in never exposed to users of an application.
Logging is used to keep track and record internal system events such as when an application starts, when it ends, what objects are instantiated, what time the application did this, what class did that, and whatever else the application designer felt should be tracked and recorded in a log. A log is a text file with information. Logging is the process of creating a log.
The logging process is a helpful debugging and application development tool. Application builders use log files to monitor what their application is doing and use it to identify problems that arise. In many cases the log file with the application's records is the only significant way to identify and solve problems. In regards to designing an application, the application designer is responsible for inserting logging commands in code he/she writes. When using frameworks and thid-party APIs, there are logging commands in the code that were inserted by the individuals that wrote the third-party code.
In regards to the Observer object-oriented design pattern, this is a design that can be used to implement a design for an application. This design pattern is a guide for creating an application. There are specific situations when it is appropriate. Be aware that code that implements the Observer design pattern is part of the application. This pattern is used when there is a one-to-many dependency between objects. When many objects need to be notified when there is a change in the object being observed.
An example; in an application there is an object called TaxRate. There are also five objects called SavingsDiscount, CheckingDiscount, ChangeRate, InternationalRate and TaxMonitor. These five objects need to be aware of when the rate field in the TaxRate object changes. The five objects can be designed to "observe" the TaxRate object using the Observer design pattern.
Creating a log file and using the Observer design pattern to create an application are not the same.
# 8
> I just wonder the difference between logging with a
> framework like log4j and implementing in the design
> the observer pattern.
>
> Is it the same? is there any pro - con ?
What are you going to do when you observer the events? Assuming this is different from what you will do with logging, how is it different?
# 9
> Creating a log file and using the Observer design
> pattern to create an application are not the same.
I think everyone understands what an Observer is and how it's different from logging. If not, it's easily found with Google.
In the context of this question, the observer would only be used for monitoring, not for the fundamental design of the application so the quoted statement above is not pertinent.
# 10
What is Google? I never heard of it.
# 11
> Well, so far I have look for many frameworks and the> only thing we have founded that meet the requirements> is proactive, open source and free.So why not use it? And you even have the option of modifying it if you wish.
# 12
> There are significant differences between the
> Observer object-oriented design pattern and the
> logging process in an application.
>
> First, logging does not play any role in the
> functionality of an application. In other words,
> logging is not used to implement features of an
> application and logging in never exposed to users of
> an application.
Unfortunately the term is used freely in such a way that that isn't necessarily true.
For example the requirements might state that "every time a user enters a order log an entry in the audit log."
One usage is requirements based and the other is developement based. Users will be using the first.
Sometimes I differentiate by calling the second 'tracing'.
# 13
> Unfortunately the term is used freely in such a way
> that that isn't necessarily true.
>
> For example the requirements might state that "every
> time a user enters a order log an entry in the audit
> log."
>
> One usage is requirements based and the other is
> developement based. Users will be using the first.
>
> Sometimes I differentiate by calling the second
> 'tracing'.
Good point!
Happy holidays! and a Happy Birthday to Filestream :o)