diff --git a/model/sync-app-socket-c.cc b/model/sync-app-socket-c.cc
new file mode 100644
index 0000000..0bd9f0f
--- /dev/null
+++ b/model/sync-app-socket-c.cc
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         卞超轶 Chaoyi Bian <bcy@pku.edu.cn>
+ *	   Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "sync-app-socket-c.h"
+using namespace std;
+using namespace Sync;
+
+class CallbackHolder{
+	public:
+	void (*m_callback)(const char *, const char *);
+	void callbackWrapper(string name, string data) {
+		m_callback(name.c_str(), data.c_str());
+	}
+};
+
+SyncAppSocketStruct *
+create_sync_app_socket(const char *prefix, void (*callback)(const char *, const char *)) 
+	{
+		CallbackHolder holder;
+		holder.m_callback = callback;
+		boost::function<void (string, string)> cb = bind(&CallbackHolder::callbackWrapper, &holder, _1, _2);
+		SyncAppSocket *sock = new SyncAppSocket(prefix, cb);
+		return (SyncAppSocketStruct *) sock;
+	}
+
+
+void
+delete_sync_app_socket(SyncAppSocketStruct **sock) {
+		SyncAppSocket *temp = *((SyncAppSocket **)sock);
+		delete temp;
+		temp = NULL;
+	}
+
+// assume char *buf ends with '\0', or otherwise it's going to crash;
+// should fix this "feature" 
+bool
+sync_app_socket_publish(SyncAppSocketStruct *sock, const char *prefix, uint32_t session, const char *buf, int freshness) 
+	{
+		SyncAppSocket *temp = (SyncAppSocket *)sock;
+		return temp->publish(prefix, session, buf, freshness);
+	}
+
+void
+sync_app_socket_remove(SyncAppSocketStruct *sock, const char *prefix) 
+	{
+		SyncAppSocket *temp = (SyncAppSocket *)sock;
+		temp->remove(prefix);
+	}
