Code Monkey home page Code Monkey logo

umbraco-extended-distributed-calling's Introduction

AgeBase: Extended Distributed Calling

The Extended Distributed Calling package allows Umbraco developers to create and use Distributed Calling providers to cater for different load balanced scenarios. Specifically where a hard coded list of server addresses is not possible to obtain for use within Umbraco's Distributed Calling configuration. For example, when hosting an Umbraco application in an Amazon Elastic Load Balanced application. The Extended Distributed Calling package uses a specified provider to obtain a collection of server addresses. Once obtained, a cache refresh request is sent to each server.

Installation

The Extended Distributed Calling package can be installed via the package's page on our.umbraco.org or via NuGet. If installing via NuGet, use the following package manager command:

Install-Package AgeBase.ExtendedDistributedCalling

Configuration

Note: This section only applies if the package is not being installed via NuGet.

Add the following configuration section to web.config to configure and enable Extended Distributed Calling. As default, we've set-up the below example configuration to use the Amazon Distributed Calling provider:

<configuration>
    <configSections>
        <section name="extendedDistributedCalling" type="AgeBase.ExtendedDistributedCalling.Configuration.ExtendedDistributedCallingConfigSection, AgeBase.ExtendedDistributedCalling" />
    </configSections>
    <extendedDistributedCalling enabled="true" user="0" type="AgeBase.ExtendedDistributedCalling.Providers.AmazonDistributedCallingProvider" assembly="AgeBase.ExtendedDistributedCalling" />
</configuration>

The enabled attribute can be used to turn Extended Distributed Calling on or off. The user attribute must contain the user id which will be used to authenticate any cache refresh request. The type attribute must contain the fully qualified class name. The assembly attribute must contain the assembly name where the type resides.

Providers

To write your own provider, create a new class which implements the IExtendedDistributedCallingProvider interface. The interface contains one method which requires a list of addresses to be returned. To use your provider, change your type and assembly configuration in web.config to the your new provider. To get you started, the Extended Distributed Calling assembly contains the following providers for use within your Umbraco applications:

Amazon Distributed Calling

For use on scalable Amazon Elastic Load Balanced applications. Type and assembly details are as follows:

  • Type: AgeBase.ExtendedDistributedCalling.Providers.AmazonDistributedCallingProvider
  • Assembly: AgeBase.ExtendedDistributedCalling

The provider requires the following Application Settings via web.config. These can either be manually or dynamically added via the AWS console:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_KEY
  • AWS_ENV_NAME
  • AWS_REGION

The AWS_ACCESS_KEY_ID app setting must contain a valid access key to access the AWS API. The AWS_SECRET_KEY app setting must contain a valid secret key to access the AWS API. The AWS_ENV_NAME app setting must contain the name of the current ELB's environment. The AWS_REGION must contain the region of the current ELB's environment. The follow region values are accepted:

  • us-east-1
  • us-west-1
  • us-west-2
  • eu-west-1
  • ap-northeast-1
  • ap-southeast-1
  • ap-southeast-2
  • sa-east-1
  • us-gov-west-1
  • cn-north-1

Note: For the Amazon Distributed Calling provider to work correctly, each EC2 instance attached to the load balancer must be able to communicate with all other attached EC2 instances. To allow this, the EC2 instance security group must allow incoming HTTP calls from the ELB security group on port 80. Allowing this rule does not open up each EC2 instance to the public.

Contributing

To raise a new bug, create an issue on the Github repository. To fix a bug or add new features or providers, fork the repository and send a pull request with your changes. Feel free to add ideas to the repository's issues list if you would to discuss anything related to the package.

Publishing

Remember to include all necessary files within the package.xml file. Run the following script, entering the new version number when prompted to created a published version of the package:

Build\Release.bat

The release script will amend all assembly versions for the package, build the solution and create the package file. The script will also commit and tag the repository accordingly to reflect the new version.

umbraco-extended-distributed-calling's People

Watchers

James Cloos 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.