Wouter has released a great series of articles about Service Applications in SP2010
http://blogs.code-counsel.net/Wouter/Lists/Posts/Post.aspx?ID=149
Following these articles you’ll learn how to build a SharePoint 2010 service application and how you can construct them with different connection and provisioning techniques.