Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 18 | Comments: 66

filter by tags archive

Architecture Advice: Scale the architecture to fit the application

time to read 1 min | 180 words

I was just reviewing an application that was obviously built upon a lot of the best practices advice for using an NHibernate application. I am currently in the process of ripping apart much of that application and then putting it back together again.

This involve things like collapsing projects, removing abstractions and deleting tests.  The main reason for that is quite simple, the architecture is too big for the application. We can create a much more stream lined application is we don't burden it with an architecture that is suitable for bigger and more complex applications.

Selecting an inappropriate architecture is a big burden on an application, and it is one where you should be very careful. Chose an overly simplistic architecture, and you can only scale the application complexity with great difficulty. Chose an overly complex architecture, and you can't even get the baseline working easily, because of the complexity involved.

Don't try to make an application fit the architecture, and don't try to apply architecture blindly. Think and always start from the simplest thing that can possibly work.


Comments

Kyle Szklenski

It has always pissed me off when people seem to try to make something as complicated as possible, whether to show off their skills or just because they don't know any better. It can really be a major killer for projects. I think we should make a TV show and call it, "When Architects Go Bad".

I find that a lot of people do that, too. They pile on a lot of incidental complexity without even thinking about what they're actually doing with the code (e.g. adding a database call where it doesn't belong, or using a database when what's really called for is a simple XML file, etc.). Once the incidental complexity adds up to critical mass, that's it - the project is a wash. No one can debug it, and it's time for a rewrite with less complex pieces, in my opinion.

configurator

Yes, I hate it when that happens. When they tell you that in order to have a textbox in the UI have a maximum value you have to add that value to the database, the DAL, the data proxy, the entity, the business logic layer, the UI input data entity, the Service Interface and only then will you be able to access it - you know something is wrong.

And those variables always turn up as 0 in the first try because you forgot one of those pesky Entity1.Variable = Entity2.Variable lines.

j23tom

Couldn't you write that six months ago ? ;)

Ryan Svihla

This has bitten me in the rear more times than I count. Mainly because when I started developing I applied an Admin's mindset of "always being prepared" boyscout style to software development.

I had a couple of projects end up taking months longer than should have before I figured out I was doing something terribly wrong in my approach.

Even now, I have to constantly guard against trivially adding a "simple feature" that creates an unnecessary overhead, and have slipped in a bad decision here and there.

I think this is only something a lot of us can only develop with experience, repetition, observation and a lot of self-honesty.

Tim Barcz

These two statements seem to contradict:

"Chose an overly simplistic architecture, and you can only scale the application complexity with great difficulty."

"Think and always start from the simplest thing that can possibly work."

Ayende Rahien

simplistic and simple are not the same thing

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. RavenDB 3.0 New Stable Release - 5 hours from now
  2. Production postmortem: The case of the lying configuration file - about one day from now
  3. Production postmortem: The industry at large - 2 days from now
  4. The insidious cost of allocations - 3 days from now
  5. Buffer allocation strategies: A possible solution - 6 days from now

And 4 more posts are pending...

There are posts all the way to Sep 11, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    31 Aug 2015 - The case of the memory eater and high load
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats