diff --git a/ndn-handle/base-handle.hpp b/ndn-handle/base-handle.hpp
new file mode 100644
index 0000000..97df137
--- /dev/null
+++ b/ndn-handle/base-handle.hpp
@@ -0,0 +1,46 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef REPO_NDN_HANDLE_BASE_HANDLE_HPP
+#define REPO_NDN_HANDLE_BASE_HANDLE_HPP
+
+#include "ndn-handle-common.hpp"
+
+namespace repo {
+
+class BaseHandle : noncopyable
+{
+
+public:
+  BaseHandle(Face* face, StorageHandle* storageHandle)
+    : m_face(face)
+    , m_storageHandle(storageHandle)
+  {
+  }
+
+  virtual void
+  listen(const Name& prefix) = 0;
+
+  inline Face*
+  getFace()
+  {
+    return m_face;
+  }
+
+  inline StorageHandle*
+  getStorageHandle()
+  {
+    return m_storageHandle;
+  }
+
+private:
+  Face* m_face;
+  StorageHandle* m_storageHandle;
+};
+
+} //namespace repo
+
+#endif // REPO_NDN_HANDLE_BASE_HANDLE_HPP
diff --git a/ndn-handle/ndn-handle-common.hpp b/ndn-handle/ndn-handle-common.hpp
new file mode 100644
index 0000000..f178d53
--- /dev/null
+++ b/ndn-handle/ndn-handle-common.hpp
@@ -0,0 +1,35 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+#ifndef REPO_NDN_HANDLE_NDN_HANDLE_COMMON_HPP
+#define REPO_NDN_HANDLE_NDN_HANDLE_COMMON_HPP
+
+
+#include <cstdlib>
+#include <sstream>
+#include <iostream>
+#include <time.h>
+#include <unistd.h>
+#include <ndn-cpp-dev/face.hpp>
+#include <ndn-cpp-dev/security/key-chain.hpp>
+#include "../storage/storage-handle.hpp"
+#include <boost/random/mersenne_twister.hpp>
+#include <boost/random/uniform_int_distribution.hpp>
+#include <map>
+
+#define RETRY_TIMEOUT 3
+#define DEFAULT_CREDIT 12
+#define NOEND_TIMEOUT 10000
+
+namespace repo {
+using ndn::Face;
+using ndn::Name;
+using ndn::Interest;
+using ndn::KeyChain;
+using ndn::Selectors;
+using ndn::bind;
+}
+
+#endif
diff --git a/ndn-handle/read-handle.cpp b/ndn-handle/read-handle.cpp
new file mode 100644
index 0000000..9ab7822
--- /dev/null
+++ b/ndn-handle/read-handle.cpp
@@ -0,0 +1,34 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+#include "read-handle.hpp"
+
+namespace repo {
+
+void
+ReadHandle::onInterest(const Name& prefix, const Interest& interest)
+{
+  Data data;
+  if (getStorageHandle()->readData(interest, data)) {
+    getFace()->put(data);
+  }
+}
+
+void
+ReadHandle::onRegisterFailed(const Name& prefix, const std::string& reason)
+{
+  std::cerr << "ERROR: Failed to register prefix in local hub's daemon" << std::endl;
+  getFace()->shutdown();
+}
+
+void
+ReadHandle::listen(const Name& prefix)
+{
+  getFace()->setInterestFilter(prefix,
+                            bind(&ReadHandle::onInterest, this, _1, _2),
+                            bind(&ReadHandle::onRegisterFailed, this, _1, _2));
+}
+
+} //namespace repo
diff --git a/ndn-handle/read-handle.hpp b/ndn-handle/read-handle.hpp
new file mode 100644
index 0000000..5af1fb3
--- /dev/null
+++ b/ndn-handle/read-handle.hpp
@@ -0,0 +1,39 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef REPO_NDN_HANDLE_READ_HANDLE_HPP
+#define REPO_NDN_HANDLE_READ_HANDLE_HPP
+
+#include "base-handle.hpp"
+
+namespace repo {
+
+class ReadHandle : BaseHandle
+{
+
+public:
+  ReadHandle(Face* face, StorageHandle* storageHandle)
+  : BaseHandle(face, storageHandle)
+  {
+  }
+
+  virtual void
+  listen(const Name& prefix);
+
+private:
+  /**
+   * @brief Read the name from backend storage
+   */
+  void
+  onInterest(const Name& prefix, const Interest& interest);
+
+  void
+  onRegisterFailed(const Name& prefix, const std::string& reason);
+};
+
+} //namespace repo
+
+#endif // REPO_NDN_HANDLE_READ_HANDLE_HPP
diff --git a/server/server.cpp b/server/server.cpp
index fb240f7..6e4ee85 100644
--- a/server/server.cpp
+++ b/server/server.cpp
@@ -4,8 +4,51 @@
  * See COPYING for copyright and distribution information.
  */
 
+#include <string>
+#include <iostream>
+#include <ndn-cpp-dev/face.hpp>
+
+#include "../storage/storage-handle.hpp"
+#include "../storage/sqlite/sqlite-handle.hpp"
+#include "../ndn-handle/read-handle.hpp"
+
+using namespace repo;
+
+static const string ndnRepoUsageMessage =
+  "ndn-repo - NDNx Repository Daemon\n"
+  "-d: set database path\n"
+  "-h: show help message\n"
+  "-c: set config file path\n"
+  ;
+
 int
-main(int argc, char** argv)
-{
+main(int argc, char** argv) {
+  int opt;
+  string dbPath;
+  string confPath;
+  while ((opt = getopt(argc, argv, "d:hc:")) != -1) {
+    switch (opt) {
+    case 'd':
+      dbPath = string(optarg);
+      break;
+    case 'h':
+      std::cout << ndnRepoUsageMessage << std::endl;
+      return 1;
+    case 'c':
+      confPath = string(optarg);
+      break;
+    default:
+      break;
+    }
+  }
+  SqliteHandle sqliteHandle(dbPath);
+  StorageHandle* handle = &sqliteHandle;
+
+  Face face;
+  ReadHandle readHandle(&face, handle);
+  if (confPath.empty()) {
+    confPath = "./repo.conf";
+  }
+  face.processEvents();
   return 0;
 }
