Hi --
We're looking at redesigning an existing web site and in the process porting it to Asp.net 2.0 and LLBLGen 2.x.
For budget reasons, we'll probably end up using MySQL 5.0. (We usually use SQL Server.)
A couple of questions:
-
Are there any known issues with the CoreLab MySQL driver and LLBLGen? Particularly for a heavier (several hundred concurrent users) traffic web site.
-
For future scalability, we might have to go to the master-slave MySQL architecture where basically all reads are done against a "slave" and all writes are done to the master database server. (For more info, see this blog post: http://krow.livejournal.com/434562.html). How would you all approach this?
Typically we use self servicing, but I'm thinking that adapter would be a better approach where we have a DataAccessAdapter for the master db and a separate DataAccessAdapter for the slave/read-only database.
I played around with creating a second dataaccess adapter and it was very straightforward. 2 examples follow:
Writer/Update code:
using (IDataAccessAdapter writer = new DataAccessAdapter(false))
{
writer.SaveEntityCollection(this.LLBLGenProDataSource2Clients.EntityCollection);
}
Reader Code:
IRelationPredicateBucket relationBucket = new RelationPredicateBucket();
relationBucket.PredicateExpression.Add(ClientsFields.Active == true);
IDataAccessAdapter reader = new DataReaderAdapter(false);
reader.FetchEntityCollection(this.LLBLGenProDataSource2Clients.EntityCollection, relationBucket);
Has anyone used LLBLGen with MySQL and a master-slave set up before? If so, were there any gotchas?
Thanks.