gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] simplified GUI <-> database interaction


From: Horst Herb
Subject: Re: [Gnumed-devel] simplified GUI <-> database interaction
Date: Mon, 14 Oct 2002 10:56:59 +1000
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2a) Gecko/20020910

Hilmar Berger wrote:

if we have to do all backend communication 'by hand'. Hiding
implementation features in hierarchies of objects has certainly a
perfomance cost but simplify coding a lot. If, however, the costs to

This was my initial thought. However, considering the time I spent designing abstraction layers I must say that in the same time I would have written the straightforward solutions twice.
The code didn't get simpler either - the opposite is the case.

The main problem is our high degree of normalisation and our wish to remain language independend on the backend. The normalisation makes it almost impossible to autocreate the python objects from backend tables; putting rules into tables regarding this would make the backend structure even more awkward Implementing persistent python objects in a straightforward way on the backend side makes it difficult to access the data from other languages (like web clients)

lot I would rather suspect that Python is not the langugage of choice to
code a project like gnumed.

I still think it was and is the right choice. No other language allows that fast prototyping, and with no other language I spent that little time debugging (with Python I spend about 10% of the time in debugging - in C++ it is more than 50% of the time). Few languages are that portable, but probably no other one that easy to learn.

How high are the performance hits you have found ? What is the part of the
abstraction layers having the highest perfomance costs ?

Just as an example: the simple conversion of returned rows into dictionary-ready objects by PyPgSQL costs about 30% in performance. The individual performance penalties are small, but they do add up.
0.001 seconds is nothing, but 1000 times 0.001 seconds is a pain.

Are you sure there is nothing we can do to keep at least a minimal
abstraction layer ?

Oh yes - gmPG already provides a high degree of abstraction! It completely hides the implementation of the service concept. There will still be cached objects - but limited to the ones that are likely to be reused again and again during the "life cycle" of a patient record in the user interface

That said - I am open for suggestions and would welcome whoever proves me wrong.

Horst





reply via email to

[Prev in Thread] Current Thread [Next in Thread]