GithubHelp home page GithubHelp logo

zhaoyta / cppmicroservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cppmicroservices/cppmicroservices

0.0 1.0 0.0 9.57 MB

An OSGi-like C++ dynamic module system and service registry

Home Page: http://cppmicroservices.org

License: Apache License 2.0

CMake 5.92% C++ 92.24% Python 0.83% Shell 0.04% Scheme 0.01% CSS 0.10% JavaScript 0.28% HTML 0.58%

cppmicroservices's Introduction

Continuous Integration Status

Branch +

+
GCC 4.6 -------------------------+ Xcode 6.4 -------------------------+ Xcode 7.3 -------------------------+ Xcode 8.2 Visual Studio 2013 --------------------------+ Visual Studio 2015 --------------------------+ MinGW-w64 --------------------------+
master Linux Build Status Windows Build status
development Linux Build Status (development) Windows Build status (development)

Coverity Scan Build Status

C++ Micro Services

Documentation Status (stable) Documentation Status (development)

Download

Introduction

The C++ Micro Services project is a collection of components for building modular and dynamic service-oriented applications. It is based on OSGi, but tailored to support native cross-platform solutions.

Proper usage of C++ Micro Services patterns and concepts leads to systems with one or more of the following properties:

  • Re-use of software components
  • Loose coupling between service providers and consumers
  • Separation of concerns, based on a service-oriented design
  • Clean APIs based on service interfaces
  • Extensible and reconfigurable systems

Requirements

None, except a recent enough C++ compiler. All third-party library dependencies are included and mostly used for implementation details.

Supported Platforms

The library makes use of some C++11 features and compiles on many different platforms.

Minimum required compiler versions:

  • GCC 4.6
  • Clang 3.1
  • Clang from Xcode 6.4
  • Visual Studio 2013

Below is a list of tested compiler/OS combinations:

  • GCC 4.6.3 (Ubuntu 12.04) via Travis CI
  • GCC 6.2.1 (Fedora 25)
  • Clang 3.8.0 (Fedora 25)
  • Clang Xcode 6.4 (OS X 10.10) via Travis CI
  • Clang Xcode 7.3 (OS X 10.11) via Travis CI
  • Clang Xcode 8.2 (OS X 10.12) via Travis CI
  • Visual Studio 2013 via Appveyor
  • Visual Studio 2015 via Appveyor
  • Visual Studio 2017 RC (Windows 7)
  • MinGW-w64 via Appveyor

The C++ Micro Services project was initially developed at the German Cancer Research Center. Its source code is hosted as a GitHub Project. See the COPYRIGHT file in the top-level directory for detailed copyright information.

This project is licensed under the Apache License v2.0.

Code of Conduct

CppMicroServices.org welcomes developers with different backgrounds and a broad range of experience. A diverse and inclusive community will create more great ideas, provide more unique perspectives, and produce more outstanding code. Our aim is to make the CppMicroServices community welcoming to everyone.

To provide clarity of what is expected of our members, CppMicroServices has adopted the code of conduct defined by contributor-covenant.org. This document is used across many open source communities, and we believe it articulates our values well.

Please refer to the Code of Conduct <code-of-conduct> for further details.

Quick Start

Essentially, the C++ Micro Services library provides you with a powerful dynamic service registry on top of a managed lifecycle. The framework manages, among other things, logical units of modularity called bundles that are contained in shared or static libraries. Each bundle within a library has an associated cppmicroservices::BundleContext object, through which the service registry is accessed.

To query the registry for a service object implementing one or more specific interfaces, the code would look like this:

#include "cppmicroservices/BundleContext.h"
#include "SomeInterface.h"

using namespace cppmicroservices;

void UseService(BundleContext context)
{
  auto serviceRef = context.GetServiceReference<SomeInterface>();
  if (serviceRef)
  {
    auto service = context.GetService(serviceRef);
    if (service) { /* do something */ }
  }
}

Registering a service object against a certain interface looks like this:

#include "cppmicroservices/BundleContext.h"
#include "SomeInterface.h"

using namespace cppmicroservices;

void RegisterSomeService(BundleContext context, const std::shared_ptr<SomeInterface>& service)
{
  context.RegisterService<SomeInterface>(service);
}

The OSGi service model additionally allows to annotate services with properties and using these properties during service look-ups. It also allows to track the life-cycle of service objects. Please see the Documentation for more examples and tutorials and the API reference. There is also a blog post about OSGi Lite for C++.

Git Branch Conventions

The Git repository contains two eternal branches, master and development. The master branch contains production quality code and its HEAD points to the latest released version. The development branch is the default branch and contains the current state of development. Pull requests by default target the development branch. See the CONTRIBUTING <contributing> file for details about the contribution process.

cppmicroservices's People

Contributors

cjgoch avatar cnd avatar csol314 avatar espakm avatar jeffdiclemente avatar karthikreddy09 avatar kislinsk avatar ksubramz avatar mrlegowatch avatar saschazelzer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.