--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <string>
+
+#include "pkg_request.hh"
+#include "runner.hh"
+
+namespace pkgmgr_server {
+
+Runner::Runner(int thread_num) : thread_num_(thread_num) {
+ /* TODO implement code */
+}
+
+void Runner::OnReceiveRequest(pkgmgr_common::AbstractSocket socket) {
+ /* TODO implement code */
+}
+
+bool Runner::QueueRequest(pkgmgr_common::AbstractSocket socket) {
+ /* TODO implement code */
+ return true;
+}
+
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SERVER_RUNNER_HH_
+#define SERVER_RUNNER_HH_
+
+#include <memory>
+
+#include "../common/socket/abstract_socket.hh"
+#include "worker_thread.hh"
+
+namespace pkgmgr_server {
+
+class Runner {
+ public:
+ Runner(int thread_num);
+ ~Runner() = default;
+ void OnReceiveRequest(pkgmgr_common::AbstractSocket socket);
+ bool QueueRequest(pkgmgr_common::AbstractSocket socket);
+
+ private:
+ int thread_num_;
+ std::unique_ptr<WorkerThread> thread_pool_;
+};
+
+} // namespace pkgmgr_server
+
+#endif // SERVER_RUNNER_HH_
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <mutex>
+#include <queue>
+#include <thread>
+
+#include "pkg_request.hh"
+#include "worker_thread.hh"
+
+namespace pkgmgr_server {
+
+WorkerThread::WorkerThread(int num) {
+ /* TODO implement code */
+}
+
+bool WorkerThread::PushQueue(PkgRequest req) {
+ /* TODO implement code */
+ return true;
+}
+
+void Run() {
+ /* TODO implement code */
+}
+
+PkgRequest PopQueue() {
+ /* TODO implement code */
+ int fd = 3;
+ return PkgRequest(fd);
+}
+
+} // namespace pkgmgr_server
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef SERVER_WORKER_THREAD_HH_
+#define SERVER_WORKER_THREAD_HH_
+
+#include <mutex>
+#include <queue>
+#include <thread>
+#include <vector>
+
+#include "pkg_request.hh"
+
+namespace pkgmgr_server {
+
+class WorkerThread {
+ public:
+ WorkerThread(int num);
+ ~WorkerThread() = default;
+ bool PushQueue(PkgRequest req);
+
+ private:
+ void Run();
+ PkgRequest PopQueue();
+
+ private:
+ std::queue<PkgRequest> queue_;
+ std::vector<std::thread> threads_;
+ std::mutex lock_;
+};
+
+} // namespace pkgmgr_server
+
+#endif // SERVER_WORKER_THREAD_HH_