I'm using a useful tool called GCalDaemon. It's written in Java so it runs both on Windows and Linux (and I assume Macs).
GCalDaemon does 2-way sync between ICal files and Google Calenda. It also includes an LDAP server that allows you to query your GMail Contacts.
It has good documentation to help you get it setup.