If it's the latter, Radicale is awesome.[1]
Pulling raw iCal data over HTTP is possible but if you say, set up a recurring event several months back, you need to fetch that original event (even if it recurs every day) to include it in your calculations... I'd love a self-hosted version of this Nylas API [0] for example.
We are evaluating if it may be interest on it to release as a separate SaaS.
You can find my email on my profile if you want to discuss further your needs.
https://tools.ietf.org/html/rfc5545#section-1
CalDAV is already built on HTTP, it's just implemented with a lot of gotchas and ancient history: https://tools.ietf.org/html/rfc4791#section-1
http://www1.udel.edu/CIS/software/dist/google/calendar/java.... for Google Calendar ics feed documentation (there might be better links, this just came up first)