[TYPO3-dev] current usage of DBAL, FYI: I gave up

Martin Kutschker martin.kutschker-no at spam-blackbox.net
Tue Jun 10 21:13:30 CEST 2008


Steffen Ritter schrieb:
> Hello Martin,
> thanks for response.
> If you mean with "toying around" that I'm just testing possibilities 
> without using it for production envirement you are wrong. I really have 
> to do a setup.
> 
> The background about is the following: Our network admins have an 
> administration database where all users are listet, all their registered 
> hosts with given ips an mac adresses. At all network joints clients have 
> only access if there IP and their MAC are valid combination.
> I just created such an auth-service for typo3 automatically login 
> fe_users on, if their ip-mac combination is recognized. (added 
> hoststable with irre to fe_users). For this I worked with imported data 
> to my tables.
> 
> Network admins stated out, that this behavoiur is not "clean" enough, 
> they do not want a copy of their database (which is mysql too).

A synced copy isn't too bad in my opinion, but it's their decision.

> So we 
> tried to figure out how to solve this problem... And thats the point 
> where DBAL comes in.
> It said it enables us to use some tables in another DB. So we connected 
> the netadmin database over an ssl-tunnel to the webserver and connected 
> it with dbal to typo3,build fe_users, fe_groups and the mac-table with 
> views.
> User import and editing worked fine, but we got the joining problems as 
> mentioned, because all systables are somehow joined with each other 
> (f.e. fe_groups and pages for access rules in frontend) and sohow should 
> lie in one database.
> 
> After figuring out our possibilities, debugging dbal and the "get DB 
> handler" feature and so on we decided that it is to much work to 
> completely rewrite dbal to work with different databases and joins since 
> we would have to start at zero. That's why, "I gave up" with dbal, it 
> simply was not able to solve our problems.

If you don't want to move sessions and groups to the foreign DB then 
DBAL is no option.

DBAL *could* maybe changed that the table mapping works with only one 
connection but multiple databases (schemes). Like in SELECT ... FROM 
db1.tableA, db2.tableB. But then you would still have the problem that 
this table is on the same machine.

> At last, we i transferred the whole typo3 database from the mysql-server 
> of the webserver to the netadmin (mysql-)server and configured typo3 to 
> use this on port 3000-ssl-tunneled database natively.
> The clue to this is: I can have a view, selecting data from another 
> database on the same mysql server (which solves my problems). It's a 
> little more slower than db on same server, but it should work.

As an alternative you could have used the FEDERATED table engine. I 
haven' used it yet but the docs says it allows to use a foreign table 
like a local one. The foreign one is "magically" proxied in some way.

Masi




More information about the TYPO3-dev mailing list