All Projects → NetCoreStack → Proxy

NetCoreStack / Proxy

Licence: other
The type-safe REST library for .NET Standard 2.0 (NetCoreStack Flying Proxy)

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Proxy

system-design-notebook
Learn System Design step by step
Stars: ✭ 372 (+830%)
Mutual labels:  scalability, load-balancer
scaling-nodejs
📈 Scaling Node.js on each X, Y and Z axis using Node.js Native Modules, PM2, AWS , Load Balancers, AutoScaling, Nginx, AWS Cloudfront
Stars: ✭ 73 (+82.5%)
Mutual labels:  backend, load-balancer
Gauntlet
🔖 Guides, Articles, Podcasts, Videos and Notes to Build Reliable Large-Scale Distributed Systems.
Stars: ✭ 336 (+740%)
Mutual labels:  scalability, load-balancer
Crest
HTTP and REST client for Crystal
Stars: ✭ 174 (+335%)
Mutual labels:  http-client, rest-client
Gobetween
☁️ Modern & minimalistic load balancer for the Сloud era
Stars: ✭ 1,631 (+3977.5%)
Mutual labels:  backend, load-balancer
Fshttp
A lightweight F# HTTP library.
Stars: ✭ 181 (+352.5%)
Mutual labels:  http-client, rest-client
Systemizer
A system design tool that allows you to simulate data flow of distributed systems.
Stars: ✭ 1,219 (+2947.5%)
Mutual labels:  backend, scalability
Restclient Cpp
C++ client for making HTTP/REST requests
Stars: ✭ 1,206 (+2915%)
Mutual labels:  http-client, rest-client
Awesome Scalability
The Patterns of Scalable, Reliable, and Performant Large-Scale Systems
Stars: ✭ 36,688 (+91620%)
Mutual labels:  backend, scalability
Zato
ESB, SOA, REST, APIs and Cloud Integrations in Python
Stars: ✭ 889 (+2122.5%)
Mutual labels:  backend, scalability
Python Simple Rest Client
Simple REST client for python 3.6+
Stars: ✭ 143 (+257.5%)
Mutual labels:  http-client, rest-client
docker-compose-scale-example
Example of Docker Compose scale and load balancing features
Stars: ✭ 18 (-55%)
Mutual labels:  scalability, load-balancer
Frequest
FRequest - A fast, lightweight and opensource desktop application to make HTTP(s) requests
Stars: ✭ 130 (+225%)
Mutual labels:  http-client, rest-client
Rester
A REST client for almost any web service (Firefox and Chrome Extension)
Stars: ✭ 192 (+380%)
Mutual labels:  http-client, rest-client
Fetcher Ts
Type-safe wrapper around Fetch API
Stars: ✭ 87 (+117.5%)
Mutual labels:  http-client, rest-client
Ansible Role Haproxy
Ansible Role - HAProxy
Stars: ✭ 112 (+180%)
Mutual labels:  scalability, load-balancer
Rest Client
A tool for automated testing REST API, generating exquisite testing report and REST API documentation.
Stars: ✭ 1,181 (+2852.5%)
Mutual labels:  http-client, rest-client
Fluentlyhttpclient
Http Client for .NET Standard with fluent APIs which are intuitive, easy to use and also highly extensible.
Stars: ✭ 73 (+82.5%)
Mutual labels:  http-client, rest-client
Udash Core
Scala framework for building beautiful and maintainable web applications.
Stars: ✭ 405 (+912.5%)
Mutual labels:  backend, rest-client
Rump
REST client for Java that allows for easy configuration and default values. Allows for quick request construction and a huge range of modifications by using response/request interceptors, adjusting default values related to HTTP requests and creating custom instances for when you need multiple API connection setups.
Stars: ✭ 55 (+37.5%)
Mutual labels:  http-client, rest-client

NetCoreStack Proxy

NuGet NuGet

Cross-Platform .NET Standard HTTP Base Flying Proxy

This project is demonstrating manage and consume distributed HTTP APIs and Micro Services from different regions (hosts) with ease.

Flying Proxy allows the management of scalable applications, trigger many operations at the same time from your clients (Desktop, Web or Mobile App) and start to consume your new resources that you can simply add.

Flying Proxy aims to:

  • Simple scalability
  • Effective and type-safe management of distributed architecture
  • Better performance
  • Maintainability

Sample Client (Web)

Add ProxySettings section to the appsettings.json

"ProxySettings": {
    "RegionKeys": {
        "Main": "http://localhost:5000/,http://localhost:5001/",
        "Authorization": "http://localhost:5002/",
        "Integrations": "http://localhost:5003/"
    }
}

APIs Definitions

// This API expose methods from localhost:5000 and localhost:5001 as configured on ProxySettings
[ApiRoute("api/[controller]", regionKey: "Main")]
public interface IGuidelineApi : IApiContract
{
    [HttpHeaders("X-Method-Header: Some Value")]
    Task TaskOperation();

    int PrimitiveReturn(int i, string s, long l, DateTime dt);

    Task<IEnumerable<SampleModel>> GetEnumerableModels();

    Task GetWithReferenceType(SimpleModel model);

    /// <summary>
    /// Default Content-Type is ModelAware.
    /// If the any parameter(s) has FormFile type property that will be MultipartFormData 
    /// if not will be JSON
    /// </summary>
    /// <param name="model"></param>
    /// <returns></returns>
    [HttpPostMarker]
    Task TaskActionPost(ComplexTypeModel model);

    [HttpPostMarker(ContentType = ContentType.MultipartFormData)]
    Task TaskActionBarMultipartFormData(Bar model);

    [HttpPostMarker(ContentType = ContentType.Xml)]
    Task TaskActionBarSimpleXml(BarSimple model);

    /// <summary>
    /// Template and parameter usage, key parameter will be part of the request Url 
    /// and extracting it as api/guideline/kv/<key>
    /// </summary>
    /// <param name="key"></param>
    /// <param name="body"></param>
    /// <returns></returns>
    [HttpPutMarker(Template = "kv/{key}")]
    Task<bool> CreateOrUpdateKey(string key, Bar body);
}

Startup ConfigureServices

public void ConfigureServices(IServiceCollection services)
{
    services.AddNetCoreProxy(Configuration, options =>
    {
        // Register the API to use as a Proxy
        options.Register<IGuidelineApi>();
    });

    // Add framework services.
    services.AddMvc();
}

Proxy Usage (DI)

public class HomeController : Controller
{
    private readonly IGuidelineApi _api;

    public TestController(IGuidelineApi api)
    {
        _api = api;
    }

    public async Task<IEnumerable<SampleModel>> GetModels()
    {
        var items = await _api.GetEnumerableModels();
        return items;
    }
}

Sample Server

API Implementation

[Route("api/[controller]")]
public class GuidelineController : Controller, IGuidelineApi
{
    [HttpGet(nameof(GetEnumerableModels))]
    public Task<IEnumerable<SampleModel>> GetEnumerableModels()
    {
        ...
        return items;
    }

    [HttpPost(nameof(TaskComplexTypeModel))]
    public async Task TaskComplexTypeModel([FromBody]ComplexTypeModel model)
    {
        ...
    }

    [HttpPost(nameof(TaskActionBarMultipartFormData))]
    public Task TaskActionBarMultipartFormData(Bar model)
    {
        ...
    }

    [HttpPut("kv")]
    public async Task<bool> CreateOrUpdateKey(string key, Bar body)
    {
        ...
    }
}

Unit Testing

Use HttpLive

httplive -p 5003,5004 -d test/NetCoreStack.Proxy.Tests/httplive.db

Latest release on Nuget

Prerequisites

ASP.NET Core

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].