Giter Club home page Giter Club logo

restbed's Introduction

Restbed Build Status


Restbed is a comprehensive and consistent programming model for building applications that require seamless and secure communication over HTTP, with the ability to model a range of business processes, designed to target mobile, tablet, desktop and embedded production environments.

It's akin to embedding NGINX into your companies own product line. -- Solutions Architect, Bellrock Technology

We love hearing about the creative ways you guys and girls use Restbed. Why not spare a few minutes and share your passion.

Features

Feature Description
Comet Long polling model to allow long-held HTTP requests for pushing data from the server to client.
SSL/TLS Secure over the wire communication allowing you to transmit private data online.
Session Management Create custom HTTP session persistence and management logic.
Path Parameters Annotate URIs with custom path parameters such as resource keys, revisions, etc...
Query Parameters Automated query parameter parsing.
Header Filters Filter incoming HTTP requests by headers.
Logging Customise how and where log entries are created.
Multi-Path Resources Give a resource multiple paths for improved readability.
Customisable Methods Add your own custom HTTP methods.
Compression Adaptability to address any form of compression GZip, Deflate, etc...
Encoding Adaptability to address any form of encoding UTF-32, ASCII, etc...
Rules Engine Reduce complexity by processing incoming requests with readable units of code.
HTTP/HTTPS Built in client capabilities with optional SSL peer certificate verification.
IPv4/IPv6 Internet Protocol Version 4/6 Network Support.
Architecture Asynchronous single or multi-threaded architecture, capable of addressing the C10K problem.
Converters Built-in Path, Query, and Header conversions for string, int, long, and float data types.
Authentication Seperate Service and/or Resource level authentication.
Error Handling Seperate Service and/or Resource level error handling.
Address Binding Bind HTTP and/or HTTPS services to separate IP addresses.
Compliance Flexibility to address HTTP 1.0/1.1+ compliance.
Mature Secure, Stable, and extensively tested over 3+ years.
Community Active, vibrant and energetic open source community.
Support Commercial support is available from Corvusoft.

Example

#include <memory>
#include <cstdlib>
#include <restbed>

using namespace std;
using namespace restbed;

void post_method_handler( const shared_ptr< Session > session )
{
    const auto request = session->get_request( );
    
    int content_length = 0;
    request->get_header( "Content-Length", content_length );
    
    session->fetch( content_length, [ ]( const shared_ptr< Session > session, const Bytes & body )
    {
        fprintf( stdout, "%.*s\n", ( int ) body.size( ), body.data( ) );
        session->close( OK, "Hello, World!", { { "Content-Length", "13" } } );
    } );
}

int main( const int, const char** )
{
    auto resource = make_shared< Resource >( );
    resource->set_path( "/resource" );
    resource->set_method_handler( "POST", post_method_handler );
    
    auto settings = make_shared< Settings >( );
    settings->set_port( 1984 );
    settings->set_default_header( "Connection", "close" );
    
    Service service;
    service.publish( resource );
    service.start( settings );
    
    return EXIT_SUCCESS;
}

More in-depth examples can be found here.

License

© 2015 Corvusoft Limited, United Kingdom. All rights reserved.

The Restbed framework is dual licensed; See LICENSE for full details.

Support

Please contact [email protected], for support and licensing options including bespoke software development, design consultation, training, mentoring and code review.

Production Install Base Tickets Anual Fee Per Install (excl. VAT)
1-3 2 £280
4-10 5 £360
> 10 > AABUS

Build

git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake [-DBUILD_TESTS=YES] [-DBUILD_EXAMPLES=YES] [-DBUILD_SSL=NO] [-DBUILD_SHARED=YES] [-DCMAKE_INSTALL_PREFIX=/output-directory] ..
make [-j CPU_CORES+1] install
make test

You will now find all required components installed in the distribution folder.

Please submit all enhancements, proposals, and defects via the issue tracker; Alternatively ask a question on StackOverflow tagged #restbed.

For Microsoft Visual Studio instructions please see feature #17.

Minimum Requirements

Resource Requirement
Compiler C++11 compliant or above
OS BSD, Linux, Mac OSX, Solaris, Windows, Raspbian

Road Map

Milestone Feature Status
0.0 Asynchrounous HTTP Service complete
1.0 HTTP 1.0 Compliance complete
2.0 HTTP 1.1 Compliance complete
2.5 Secure Socket Layer complete
2.5 Simultaneous Network Ports (HTTP/HTTPS) complete
3.0 Rules Engine complete
3.5 Schedule Tasks on Service run-loop complete
3.5 Multi-Threaded service capability complete
3.5 Bind Service to specific Address complete
3.5 Session Management complete
4.0 HTTP Client beta
4.0 Signal Handling development
4.5 Web Sockets pending
4.5 Client-side SSL certificates pending
4.5 Resource Caching pending
5.0 HTTP 2 compliance pending

Contact

Method Description
Twitter Tweet us your questions & feature requests.
Google+ Join the community social circle.
[email protected] Support related queries.
[email protected] Sale related queries.

restbed's People

Contributors

ben-crowhurst avatar cralilley avatar gitter-badger avatar naedanger avatar tanmayambre avatar zmij avatar

Watchers

 avatar  avatar  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.