diff --git a/.gitignore b/.gitignore index 4a5b064b0..97b58ba32 100644 --- a/.gitignore +++ b/.gitignore @@ -105,6 +105,3 @@ cmake-*/** # Visual Studio CMakeSettings.json .vs/** - -# Ignore Flip -src/Flip/** diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb..000000000 diff --git a/README.md b/README.md index 264b05c5a..08517eb67 100644 --- a/README.md +++ b/README.md @@ -2,22 +2,61 @@ [![Conan Build](https://github.com/eBay/HomeStore/actions/workflows/merge_build.yml/badge.svg?branch=master)](https://github.com/eBay/HomeStore/actions/workflows/merge_build.yml) [![CodeCov](https://codecov.io/gh/eBay/homestore/branch/master/graph/badge.svg)](https://codecov.io/gh/eBay/homestore) -Homestore is a generic storage engine upon which different storage solutions, like block store, key/value stores, object stores, databases can be built. This storage engine architecture is tuned towards modern storage devices and systems programming to provide ultra high performance. It has a pluggable model throughout to make it easy to extend the functionality to tune to specific use cases or data patterns. This document tries to explain what is the motivation to create another storage engine among an already impressive array of engines. +Homestore is a generic *StorageEngine* upon which different *StorageSolution*s can be built. These Solutions can model +Block, K/V, Object or Database *StorageInterface*s. -More details to follow.... +The architecture is tuned towards modern storage devices and systems programming leveraging the "run to complete" model +provide by [IOManager](https://github.com/eBay/IOManager) to provide maximum performance. Homestore has a pluggable +model throughout making it easy to extend the functionality to tune to specific use cases or data patterns. + +A reference Object *StorageSolution* can be found in [HomeObject](https://github.com/eBay/HomeObject). + +## Building Blocks +Several building blocks are provided by Homestore that should satisfy the majority cases for any given storage +solution. Each "service" provides a crash-resilient and persistent form of familiar data structures. + +### MetaSvc (std::map) +K/V store that avoids _torn pages_. Used to store recovery information (e.g. Superblocks) to re-initialize application +state after reboot. + +### DataSvc (new/delete) +Free flat-allocation space. Hooks are provided if a particular allocation pattern (e.g. Heap) is desirable. + +### IndexSvc (std::unordered_map) +A B+Tree used to optimize for *FAST* Reads. Value is typically the result of allocation from the DataSvc. + +### LogSvc (std::list) +Random Access ciruclar buffer. Typically not used directly but levaraged by other Services to provide crash-resiliency. + +### ReplicationSvc +An abstraction on DataSvc that replicates between application instances. + +## Application Diagram + +![HomeObject Overview](docs/imgs/HomeStore.png) ## Building -### prerequires +### System Pre-requisites +* CMake 3.13 or later +* conan 1.x (`pipx install conan~=1`) +* libaio-dev (assuming Ubuntu) +* uuid-dev (assuming Ubuntu) + +### Dependencies +* SISL +``` +$ git clone https://github.com/eBay/sisl +$ cd sisl & ./prepare.sh && conan export . oss/master +``` + +* IOManager ``` -camke 3.13 or later -conan 1.5x.0 (pip install --user conan==1.59.0) -libjemalloc-dev -libaio-dev -uuid-dev +$ git clone https://github.com/eBay/iomanager +$ cd iomanager & ./prepare.sh && conan export . oss/master ``` -Assuming the conan setup is already done -### build + +### Compilation ``` $ mkdir build $ cd build @@ -32,8 +71,10 @@ $ conan install -u -b missing .. # Build the libhomestore.a $ conan build .. ``` + ## Contributing to This Project -We welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or discussions, please submit issues or pull requests. +We welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or +discussions, please submit issues or pull requests. Contact Harihara Kadayam hkadayam@ebay.com @@ -42,8 +83,15 @@ Harihara Kadayam hkadayam@ebay.com Copyright 2021 eBay Inc. Primary Author: Harihara Kadayam -Primary Developers: Harihara Kadayam, Rishabh Mittal, Yaming Kuang, Brian Szmyd -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 https://www.apache.org/licenses/LICENSE-2.0. +Primary Developers: +[Harihara Kadayam](https://github.com/hkadayam), +[Yaming Kuang](https://github.com/yamingk), +[Brian Szmyd](https://github.com/szmyd) + +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 https://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 CONDITHomeStore OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +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 CONDITHomeStore OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. diff --git a/docs/imgs/HomeStore.png b/docs/imgs/HomeStore.png new file mode 100644 index 000000000..97f0e6476 Binary files /dev/null and b/docs/imgs/HomeStore.png differ diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 70ae29c59..000000000 --- a/sonar-project.properties +++ /dev/null @@ -1,14 +0,0 @@ -sonar.projectKey=sds:homestore -sonar.projectName=SDS HomeStore - -sonar.coverageReportPaths=coverage.xml -sonar.scm.enabled=true -sonar.host.url=https://sonar-01-es.vip.es.ebay.com -sonar.sourceEncoding=UTF-8 -sonar.cfamily.build-wrapper-output=/tmp/sonar -sonar.cfamily.gcov.reportsPath=/home/jenkins -sonar.cfamily.threads=8 -sonar.cfamily.cache.enabled=false -sonar.verbose=false -sonar.sources=src -sonar.exclusions=src/engine/homeds/loadgen/**/*,src/engine/homeds/tests/**/*,**/*.json,**/test_*.cpp,**/*_gtest.cpp,**/*.py,**/btree_checker.cpp,**/perf_cache.cpp, src/engine/homeds/tests/*,src/homeblks/generated/*, src/engine/common/generated/*, src/homeblks/homeblks_http_server.cpp, src/engine/homeds/memory/chunk_allocator.hpp, src/engine/homeds/memory/composite_allocator.hpp, src/test_common/bits_generator.hpp, src/homeblks/volume/tests/*, src/engine/homeds/thread/threadpool/thread_safe_queue.h, src/engine/homeds/array/*, src/engine/index/indx_mgr_test.cpp, src/engin/blkstore/test_*, src/engine/blkalloc/test_*, src/engine/device/tests/*, src/engine/meta/test_*, src/homelogstore/tests/*