Cloud Foundry: Design and Architecture
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by David Cooksey on Apr 14, 2011
A simple ORM used in StackOverflow titled Dapper.Net was recently released on code.google.com. This ORM specializes in fast generation of objects from SQL query results. Dapper.Net supports executing sql queries and mapping their results to a strongly typed list or a list of dynamic objects. The ORM is a single file of less than 500 lines of C# code and is available under the Apache 2.0 License.
Why create Dapper.Net when there are so many other ORMS available? Sam Saffron, a senior developer at StackOverflow, explained that StackOverflow relies heavily on simple clustered-index based queries that take an insignificant amount of time on the database server. However, the web tier often reached 100% CPU due to the volume of queries. With hundreds of calls per second, the CPU overhead from LINQ to SQL constructing a dynamic method for every call placed too much of a burden on the web servers. To resolve this problem, Dapper.Net caches information about every query. This comprehensive caching helps it to generate objects from queries about twice as fast as LINQ to SQL. Currently caching is handled by two ConcurrentDictionary objects, which are never cleared. In the future the caching algorithm may use a LRU cache to reduce memory pressure.
Dapper.Net adds two mapping functions via extension methods to the IDbConnection interface, both named ExecuteMapperQuery. The first maps results into a strongly typed list while the second maps results into a list of dynamic objects. ExecuteMapperCommand executes and returns no result set. All three methods accept parameters as anonymous classes, where a property value is mapped to the SQL parameter of the same name. For example, the following code block assigns 5 to @Id and “01234567890” to @acctNum. Any fields returned by the query that are not on the mapped class are silently discarded.
List<Customer> customers = conn.ExecuteMapperQuery<Customer>("SELECT * FROM Sales.Customer WHERE CustomerId=@Id OR AccountNumber=@acctNum", new { Id=5, AcctNum="0123456789"});
Dapper.Net is intended to handle only result-set-to-object mapping. It does not handle relations between objects and it does not generate SQL queries of any kind automatically. Dapper.Net also assumes that the connection is open and ready.
Want to know how software releases can be stress-free and happen with one click? Try Go free!
Improving Software Delivery Cycles: Pre-requisites and Inhibitors
Tutorial: Integrating SQLFire with tc Server and Spring Data
Introducing SQLFire: a memory-optimized, high performance SQL database
Go: Agile Release Management Solutions. Go enables predictable, defect-free and timely software releases.
Don't make me laugh. An ORM that only supports Linq to SQL and is only tested against a couple of MSSQL servers. Where do I sign up? It sounds more like a helper class to me.
Yes, "meh", unless you are dealing with the sort of traffic SO gets. Obviously not everyone out there is dealing with the performance issues that SO, Facebook, Twitter, and Google are. I don't know about SO, but Twitter's one billion queries per day sets it apart from your average user site. It's pretty typical for companies to tune their hardware and software for their own requirements, and these may not be yours.
+1 for Helper Class.
This is not even close to a mapper between object-oriented an relatio al paradogms.
LINQ to SQL... minus the "LINQ to" part
they use the word object mapper. what they do is fast loading of result sets into objects. a very thin layer above direct acccess of result sets, but useful if you can't spare any CPU cycles.
Nice one, looking at this I am encouraged to convert my own mapper (xmldatamapper.codeplex.com/) to use Reflection.Emit.
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
Andrew Watson talks about the work of the OMG, where CORBA is alive and well (hint: in your car), UML and UML Profiles vs. custom Modeling languages, DDS and other middleware, and much more.
Sohil Shah discusses creating iPhone and Android enterprise mobile applications based on cloud services using the open source platform OpenMobster.
Paul Sanford presents the transformations supported by data throughout its life cycle, and how that can be better done with Splunk, an engine for monitoring and analyzing machine-generated data.
A common “best practice” for unit tests is to only write a one assertion in each test. I intend to question this advice by showing that multiple assertions per test are both necessary and beneficial.
John Rauser presents the architectural and technological evolution of Amazon retail websites starting with 1994 and ending with adopting Amazon Web Services.
Michael Stal discusses system architecture quality, how to avoid architectural erosion, how to deal with refactoring, and design principles for architecture evolution.
Every developer has had to integrate with another system, API or component. Tis article provides strategies to handle the change and for he separating system boundaries.
6 comments
Watch Thread Reply