diff --git a/examples/data-producer.cpp b/examples/data-producer.cpp
index 0e1da2c..2a23e9c 100644
--- a/examples/data-producer.cpp
+++ b/examples/data-producer.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -34,7 +34,7 @@
  * The description of command parameter can be found in the function usage().
  */
 
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_context.hpp>
 #include <boost/lexical_cast.hpp>
 
 #include <ndn-cxx/data.hpp>
@@ -49,11 +49,7 @@
 #include <random>
 #include <string>
 
-namespace repo {
-
-using ndn::time::milliseconds;
-
-const milliseconds DEFAULT_TIME_INTERVAL(2000);
+namespace repo::examples {
 
 enum Mode {
   AUTO,
@@ -70,16 +66,6 @@
   };
 
 public:
-  Publisher()
-    : mode(AUTO)
-    , dataPrefix("/example/data")
-    , timeInterval(DEFAULT_TIME_INTERVAL)
-    , duration(0)
-    , m_scheduler(m_face.getIoService())
-    , m_randomDist(200, 1000)
-  {
-  }
-
   void
   run();
 
@@ -94,15 +80,15 @@
 
 public:
   std::ifstream insertStream;
-  Mode mode;
-  ndn::Name dataPrefix;
-  milliseconds timeInterval;
-  milliseconds duration;
+  Mode mode{AUTO};
+  ndn::Name dataPrefix{"/example/data"};
+  ndn::time::milliseconds timeInterval{2000};
+  ndn::time::milliseconds duration{0};
 
 private:
   ndn::Face m_face;
-  ndn::Scheduler m_scheduler;
-  std::uniform_int_distribution<> m_randomDist;
+  ndn::Scheduler m_scheduler{m_face.getIoService()};
+  std::uniform_int_distribution<> m_randomDist{200, 1000};
 };
 
 void
@@ -199,7 +185,7 @@
       break;
     case 's':
       try {
-        generator.duration = milliseconds(boost::lexical_cast<uint64_t>(optarg));
+        generator.duration = ndn::time::milliseconds(boost::lexical_cast<uint64_t>(optarg));
       }
       catch (const boost::bad_lexical_cast&) {
         std::cerr << "-s option should be an integer" << std::endl;
@@ -208,7 +194,7 @@
       break;
     case 't':
       try {
-        generator.timeInterval = milliseconds(boost::lexical_cast<uint64_t>(optarg));
+        generator.timeInterval = ndn::time::milliseconds(boost::lexical_cast<uint64_t>(optarg));
       }
       catch (const boost::bad_lexical_cast&) {
         std::cerr << "-t option should be an integer" << std::endl;
@@ -234,13 +220,13 @@
   return 0;
 }
 
-} // namespace repo
+} // namespace repo::examples
 
 int
 main(int argc, char* argv[])
 {
   try {
-    return repo::main(argc, argv);
+    return repo::examples::main(argc, argv);
   }
   catch (const std::exception& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
diff --git a/src/handles/tcp-bulk-insert-handle.cpp b/src/handles/tcp-bulk-insert-handle.cpp
index dc4042d..2713d03 100644
--- a/src/handles/tcp-bulk-insert-handle.cpp
+++ b/src/handles/tcp-bulk-insert-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -20,6 +20,7 @@
 #include "tcp-bulk-insert-handle.hpp"
 
 #include <boost/asio/ip/v6_only.hpp>
+
 #include <ndn-cxx/util/logger.hpp>
 
 NDN_LOG_INIT(repo.TcpHandle);
@@ -62,9 +63,9 @@
 
 } // namespace detail
 
-TcpBulkInsertHandle::TcpBulkInsertHandle(boost::asio::io_service& ioService,
+TcpBulkInsertHandle::TcpBulkInsertHandle(boost::asio::io_context& io,
                                          RepoStorage& storageHandle)
-  : m_acceptor(ioService)
+  : m_acceptor(io)
   , m_storageHandle(storageHandle)
 {
 }
@@ -72,18 +73,11 @@
 void
 TcpBulkInsertHandle::listen(const std::string& host, const std::string& port)
 {
-  ip::tcp::resolver resolver(m_acceptor
-#if BOOST_VERSION >= 107000
-                             .get_executor()
-#else
-                             .get_io_service()
-#endif
-                             );
+  ip::tcp::resolver resolver(m_acceptor.get_executor());
   ip::tcp::resolver::query query(host, port);
 
   ip::tcp::resolver::iterator endpoint = resolver.resolve(query);
   ip::tcp::resolver::iterator end;
-
   if (endpoint == end)
     NDN_THROW(Error("Cannot listen on " + host + " port " + port));
 
@@ -111,13 +105,7 @@
 void
 TcpBulkInsertHandle::asyncAccept()
 {
-  auto clientSocket = std::make_shared<ip::tcp::socket>(m_acceptor
-#if BOOST_VERSION >= 107000
-                                                        .get_executor()
-#else
-                                                        .get_io_service()
-#endif
-                                                        );
+  auto clientSocket = std::make_shared<ip::tcp::socket>(m_acceptor.get_executor());
   m_acceptor.async_accept(*clientSocket,
                           std::bind(&TcpBulkInsertHandle::handleAccept, this, _1, clientSocket));
 }
diff --git a/src/handles/tcp-bulk-insert-handle.hpp b/src/handles/tcp-bulk-insert-handle.hpp
index 2930985..a0a8e7a 100644
--- a/src/handles/tcp-bulk-insert-handle.hpp
+++ b/src/handles/tcp-bulk-insert-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -37,8 +37,7 @@
   };
 
 public:
-  TcpBulkInsertHandle(boost::asio::io_service& ioService,
-                      RepoStorage& storageHandle);
+  TcpBulkInsertHandle(boost::asio::io_context& io, RepoStorage& storageHandle);
 
   void
   listen(const std::string& host, const std::string& port);
diff --git a/src/main.cpp b/src/main.cpp
index 767dc8f..ad0dd67 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2018-2022, Regents of the University of California.
+ * Copyright (c) 2018-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -24,7 +24,7 @@
 #include <iostream>
 #include <string.h> // for strsignal()
 
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_context.hpp>
 #include <boost/asio/signal_set.hpp>
 #include <boost/program_options.hpp>
 
@@ -66,24 +66,24 @@
     return 0;
   }
 
-  boost::asio::io_service ioService;
+  boost::asio::io_context ioCtx;
 
   /// \todo reload config file on SIGHUP
-  boost::asio::signal_set signalSet(ioService, SIGINT, SIGTERM);
-  signalSet.async_wait([&ioService] (const boost::system::error_code& error, int signalNo) {
+  boost::asio::signal_set signalSet(ioCtx, SIGINT, SIGTERM);
+  signalSet.async_wait([&ioCtx] (const boost::system::error_code& error, int signalNo) {
     if (!error) {
       NDN_LOG_FATAL("Exiting on signal " << signalNo << "/" << strsignal(signalNo));
-      ioService.stop();
+      ioCtx.stop();
     }
   });
 
   try {
-    repo::Repo repo(ioService, repo::parseConfig(configFile));
+    repo::Repo repo(ioCtx, repo::parseConfig(configFile));
     repo.initializeStorage();
     repo.enableValidation();
     repo.enableListening();
 
-    ioService.run();
+    ioCtx.run();
   }
   catch (const std::exception& e) {
     NDN_LOG_FATAL(repo::getExtendedErrorMessage(e));
diff --git a/src/repo.cpp b/src/repo.cpp
index 8ee393f..acc83bd 100644
--- a/src/repo.cpp
+++ b/src/repo.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -106,10 +106,10 @@
   return repoConfig;
 }
 
-Repo::Repo(boost::asio::io_service& ioService, const RepoConfig& config)
+Repo::Repo(boost::asio::io_context& io, const RepoConfig& config)
   : m_config(config)
-  , m_scheduler(ioService)
-  , m_face(ioService)
+  , m_scheduler(io)
+  , m_face(io)
   , m_dispatcher(m_face, m_keyChain)
   , m_store(std::make_shared<SqliteStorage>(config.dbPath))
   , m_storageHandle(*m_store)
@@ -117,7 +117,7 @@
   , m_readHandle(m_face, m_storageHandle, m_config.registrationSubset)
   , m_writeHandle(m_face, m_storageHandle, m_dispatcher, m_scheduler, m_validator)
   , m_deleteHandle(m_face, m_storageHandle, m_dispatcher, m_scheduler, m_validator)
-  , m_tcpBulkInsertHandle(ioService, m_storageHandle)
+  , m_tcpBulkInsertHandle(io, m_storageHandle)
 {
   this->enableValidation();
   m_storageHandle.notifyAboutExistingData();
diff --git a/src/repo.hpp b/src/repo.hpp
index 9b7630e..68f339f 100644
--- a/src/repo.hpp
+++ b/src/repo.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -66,9 +66,9 @@
   };
 
 public:
-  Repo(boost::asio::io_service& ioService, const RepoConfig& config);
+  Repo(boost::asio::io_context& io, const RepoConfig& config);
 
-  //@brief rebuild index from storage file when repo starts.
+  /// @brief Rebuild index from storage file when repo starts.
   void
   initializeStorage();
 
diff --git a/tests/integrated/test-basic-interest-read.cpp b/tests/integrated/test-basic-interest-read.cpp
index ed62466..56d1393 100644
--- a/tests/integrated/test-basic-interest-read.cpp
+++ b/tests/integrated/test-basic-interest-read.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022, Regents of the University of California.
+ * Copyright (c) 2014-2023, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -24,7 +24,7 @@
 #include "../repo-storage-fixture.hpp"
 #include "../dataset-fixtures.hpp"
 
-#include <boost/asio/io_service.hpp>
+#include <boost/asio/io_context.hpp>
 #include <boost/test/unit_test.hpp>
 
 namespace repo::tests {
diff --git a/tests/unit/tcp-bulk-insert-handle.cpp b/tests/unit/tcp-bulk-insert-handle.cpp
index 9b7b796..2c6a32e 100644
--- a/tests/unit/tcp-bulk-insert-handle.cpp
+++ b/tests/unit/tcp-bulk-insert-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California.
+ * Copyright (c) 2014-2023,  Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -31,11 +31,6 @@
 class TcpClient
 {
 public:
-  TcpClient()
-    : socket(ioService)
-  {
-  }
-
   virtual
   ~TcpClient() = default;
 
@@ -44,7 +39,7 @@
   {
     using namespace boost::asio;
 
-    ip::tcp::resolver resolver(ioService);
+    ip::tcp::resolver resolver(ioCtx);
     ip::tcp::resolver::query query(host, port);
 
     ip::tcp::resolver::iterator endpoint = resolver.resolve(query);
@@ -69,8 +64,8 @@
   }
 
 public:
-  boost::asio::io_service ioService;
-  boost::asio::ip::tcp::socket socket;
+  boost::asio::io_context ioCtx;
+  boost::asio::ip::tcp::socket socket{ioCtx};
 };
 
 template<class Dataset>
@@ -80,8 +75,8 @@
 {
 public:
   TcpBulkInsertFixture()
-    : scheduler(ioService)
-    , bulkInserter(ioService, *handle)
+    : scheduler(ioCtx)
+    , bulkInserter(ioCtx, *handle)
   {
     guardEvent = scheduler.schedule(2_s, std::bind(&TcpBulkInsertFixture::fail, this, "Test timed out"));
   }
@@ -125,7 +120,7 @@
   void
   fail(const std::string& info)
   {
-    ioService.stop();
+    ioCtx.stop();
     BOOST_FAIL(info);
   }
 
@@ -137,7 +132,7 @@
     socket.close();
 
     bulkInserter.stop();
-    // may be ioService.stop() as well
+    // may be ioCtx.stop() as well
   }
 
 public:
@@ -155,7 +150,7 @@
   this->start("localhost", "17376");
 
   // actually run the test
-  this->ioService.run();
+  this->ioCtx.run();
 
   // Read (all items should exist)
   for (auto i = this->interests.begin(); i != this->interests.end(); ++i) {
