<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 1, 2016, at 10:46 PM, 陈锋 &lt;<a href="mailto:chenfeng@fintechina.com.cn" class="">chenfeng@fintechina.com.cn</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="__aliyun_email_body_block"><ol style="list-style-type:decimal;" class=""><li class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">The server does not has any user interface like Google Calendar web version, right? But it can be accessed through an existing client like iCal or ThunderBird?</span></div></li></ol></div></div></blockquote><div>Correct</div><blockquote type="cite" class=""><div class=""><div class="__aliyun_email_body_block"><ol style="list-style-type:decimal;" class="" start="2"><li class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">By default the cal data are stored using files,</span></div></li></ol></div></div></blockquote><div>That was true in very old versions, but for quite a while CalendarServer has only supported a (postgres or oracle) database backend.</div><blockquote type="cite" class=""><div class=""><div class="__aliyun_email_body_block"><ol style="list-style-type:decimal;" class="" start="2"><li class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">but what if I want to save all of them using an external DB, seems like you support PostgreSQL by default? But what if I want to use mysql? Can the server support mysql?</span></div></li></ol></div></div></blockquote><div>We don't support mysql, however we do have a pretty fancy database abstraction layer in the&nbsp;<a href="https://github.com/apple/ccs-twistedextensions" class="">twisted-extensions</a>&nbsp;(aka 'twext') project that sits atop the two supported backends (postgres and oracle), so adding a third is probably within the realm of possibility, although we have no plans to do so ourselves. Postgres is good.</div><blockquote type="cite" class=""><div class=""><div class="__aliyun_email_body_block"><ol style="list-style-type:decimal;" class="" start="3"><li class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">If I use an external DB to store the calendar data, what about the attachment of an event?</span></div></li></ol></div></div></blockquote><div>Attachments are not stored in the database. Instead they are stored in local files on the CalDAV server. For a multi-server deployment, use something like NFS to host the attachments directory for all servers to share.</div><blockquote type="cite" class=""><div class=""><div class="__aliyun_email_body_block"><ol style="list-style-type:decimal;" class="" start="3"><li class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">What is the recommended way to sync them in multiple server instances?</span></div></li></ol></div></div></blockquote><div>Any scheme where you have to explicitly 'sync' is not going to be good enough, because that implies the possibility of being out of sync, which opens the window to race conditions, etc. The attachments store needs to be a single source of truth. NFS works well for this.</div><blockquote type="cite" class=""><div class=""><div class="__aliyun_email_body_block"><ol style="list-style-type:decimal;" class="" start="4"><li class=""><div style="clear:both;" class=""><span style="font-family: Tahoma, Arial, STHeiti, SimSun; font-size: 14px;" class="">If I use an external DB, the server will be stateless, right? So I can deploy as many instances of it as I want to?</span></div></li></ol></div></div></blockquote><div>Yes. Of course there is runtime state, but the transactional nature of the database allows the data to stay consistent even if e.g. a CalDAV server disappears.</div><div><br class=""></div><div>See also:&nbsp;<a href="https://github.com/apple/ccs-calendarserver/blob/master/doc/Admin/MultiServerDeployment.rst" class="">https://github.com/apple/ccs-calendarserver/blob/master/doc/Admin/MultiServerDeployment.rst</a></div><div><br class=""></div><div>Hope this helps,</div><div>-dre</div></div></body></html>