angel_multiserver 1.0.4

  • README.md
  • Installing
  • Versions
  • 25

multiserver #

Support for running Angel applications across multiple servers.

The idea is that you have one master server running the load balancer, and the child applications call a session synchronizer.

Dedicated WebSocket support will come eventually.

See the examples;

Response Caching #

This plug-in works on any Angel server, not just a LoadBalancer. It caches responses, to lower future response times.

Load Balancing #

This package exposes a LoadBalancer class, which extends Angel, and can be used like a normal server.

The default algorithm is a simple round-robin, but it can be extended for your own purposes.

Three load-balancing algorithms are included:

  • ROUND_ROBIN (default)
  • LEAST_LATENCY
  • STICKY_SESSION

Session Synchronization #

This package also includes three SessionSynchronizer classes:

  • MongoDB
  • Memcached
  • Redis

These are simply plugins that serialize and deserialize session data to external data stores. Try to call them as early as possible in your application, so that session data is loaded before any business logic.

import 'package:angel_framework/angel_framework.dart';
import 'package:angel_multiserver/angel_multiserver.dart';
import 'package:mongo_dart/mongo_dart.dart';

main() async {
    var app = new Angel();
    var db = new Db('<connection-string>');
    await db.open();
    await app.configure(
        new MongoSessionSynchronizer(db.collection('sessions')));
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  angel_multiserver: ^1.0.4

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:angel_multiserver/angel_multiserver.dart';
  
Version Uploaded Documentation Archive
1.0.9 Mar 28, 2017 Go to the documentation of angel_multiserver 1.0.9 Download angel_multiserver 1.0.9 archive
1.0.8 Mar 7, 2017 Go to the documentation of angel_multiserver 1.0.8 Download angel_multiserver 1.0.8 archive
1.0.7 Mar 6, 2017 Go to the documentation of angel_multiserver 1.0.7 Download angel_multiserver 1.0.7 archive
1.0.6 Feb 28, 2017 Go to the documentation of angel_multiserver 1.0.6 Download angel_multiserver 1.0.6 archive
1.0.5 Feb 27, 2017 Go to the documentation of angel_multiserver 1.0.5 Download angel_multiserver 1.0.5 archive
1.0.4 Feb 26, 2017 Go to the documentation of angel_multiserver 1.0.4 Download angel_multiserver 1.0.4 archive
1.0.3 Feb 26, 2017 Go to the documentation of angel_multiserver 1.0.3 Download angel_multiserver 1.0.3 archive
1.0.2 Feb 26, 2017 Go to the documentation of angel_multiserver 1.0.2 Download angel_multiserver 1.0.2 archive
1.0.1 Feb 26, 2017 Go to the documentation of angel_multiserver 1.0.1 Download angel_multiserver 1.0.1 archive
1.0.0 Feb 24, 2017 Go to the documentation of angel_multiserver 1.0.0 Download angel_multiserver 1.0.0 archive

All 15 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
50
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
25
Learn more about scoring.

This package version is not analyzed, because it is more than two years old. Check the latest stable version for its analysis.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0