Re: [Q] optmizing postgres for 'single client' / many small queries

From: "V S P" <toreason(at)fastmail(dot)fm>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "postgres general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [Q] optmizing postgres for 'single client' / many small queries
Date: 2009-09-02 19:03:37
Message-ID: 1251918217.3423.1332904911@webmail.messagingengine.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I do not know of any for C++.

That's why I started my own (which is not the one used for the problem I
am having :- ) )
http://github.com/vladp/CppOrm
it works with Pg 8.3+ and VC++ compiler sofar (but support for more
platforms and Dbs will be added in the future).
My Orm is not really an ORM because I did not implement anything that
would 'traverse' object instance
relationships (which is what the ORM in question here is doing).
Instead I just automagically generate SQL code for insert/update/deletes
for classes that map to tables (one-to-one).

The basic problem is that C++ standards comittee in my view just
sucks... i do not have any better words
for it. It is because of lack of reflection (ability to identify at
runtime variable names/functions names)
that an ORM, or HTTP session storage/retrival mechanism, JSON/XML
parsers that parse text right into class instances
-- cannot be implemented
Basically the things that are needed to deal with 'Typeless' data at
runtime (such that XML/JSON/Database queries)
and map that data to the C++ object instances.

Which is in the 'high-level view' why C++ is not used for web
development.

Yes there are 'attempts' in that area -- but all are different, require
quite a bit of sophistication
and are not complete (The reflection mechanism I implemented for my
cpporm is not complete either).

If C++ would have supported Reflection -- the there would be
C++_Hibernate, C++_LINQ, C++_json, C++_xml, C++_HTTP, C++_HTTPSession
and so on... (and no they would have been memory hogs -- thanks to now
standard reference counting in C++ via shared_ptr and good use of
allocators)

sorry for the rant,
still looking for any bright ideas on optimizing for many small
queries/local db host situations.

Thanks

On Wed, 02 Sep 2009 14:45 -0400, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "V S P" <toreason(at)fastmail(dot)fm> writes:
> > Well, actually
> > somebody has written a C++ ORM
> > [ that is causing all your problems and you say you can't discard ]
>
> Just out of curiosity, does anyone know of any ORM anywhere that doesn't
> suck? They seem to be uniformly awful, at least in terms of their
> interfaces to SQL databases. If there were some we could recommend,
> maybe people would be less stuck with these bogus legacy architectures.
>
> regards, tom lane
--
Vlad P
author of C++ ORM http://github.com/vladp/CppOrm/tree/master

--
http://www.fastmail.fm - Faster than the air-speed velocity of an
unladen european swallow

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gordon Ross 2009-09-02 19:31:16 Re: PL/SQL & unset custom variable
Previous Message Tom Lane 2009-09-02 18:45:39 Re: [Q] optmizing postgres for 'single client' / many small queries