• Stars
    star
    102
  • Rank 324,230 (Top 7 %)
  • Language
    Scala
  • Created over 13 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DDSL - Dynamic Distributed Service Locator

DDSL - Dynamic Distributed Service Locator

DDSL is written in Scala and can be used by Scala, Java or any other Language on the JVM.

Have a look at ddsl-cmdline-tool if you are using a none-JVM-language or just likes the command-line.

Here you can find my Lightningtalk about DDSL at Roots Conference in may, 2011.

Check out ddslConfigWriter which automatically reconfigures nginx (or any other reverse proxy like apache, squid etc)

Project history

  • 20130211 - Version 0.3.3 released - using Scala 2.10.0
  • 20121029 - Version 0.3.2 released
  • 20121029 - Fixes #6 - Prevent exception when querying a never-used zookeeper
  • 20121009 - Version 0.3.1 released - Fixes logger dependency issue
  • 20121004 - Version 0.3 released
  • 20121004 - Added persistent serviceUp - usefull for static resources like databases etc
  • 20120911 - Added ddsl-cmdline-tool
  • 20120907 - (0.3-SNAPSHOT) Upgraded to scala 2.9.2, sbt 0.12, replaced log4j with logback/slf4j, and upgraded to zookeper 3.4.3
  • 201105xx - Added Java example
  • 20110226 - version 0.2 released
  • 20110125 - version 0.1.RC1 released

Where does DDSL help?

In many big companies you have a lot of services (SOAP, REST, etc) spread across many servers on several different Web Containers/Application Servers/ESB (Weblogic, Glassfish, Tomcat, Jetty, Mule, etc). At least this is the situation where I work. You also have several different environments: test, preprod, prod etc with different servers and databases etc.

One service might use several other services.

You might also have (or want) several different versions of one service to run at the same time.

All those service locations... This means a lot of configuring

This is where DDSL helps..

What is DDSL ?

DDSL - Dynamic Distributed Service Locator

(Scaladoc can be found here)

Dynamic

  • No admin needed
  • You don't have to manually add your service / version to the repository
  • Your application can automatically register its location. -- It can also register it's "quality" (Clients will preferred locations with better "quality"
  • Locations on "localhost" will be preferred
  • You can mix several "environments" (prod, test) within the same DDSL-repository
  • Automatically load balancing between multiple locations with same "quality"
  • Service is automatically removed from repository, if it crashes/go down

Distributed

  • DDSL has no single point of failure
  • It uses ZooKeeper as its dynamic distributed storage

Service Locator

  • A repository of services (with version) and their current locations

Coming functionality

Distributed logging

Distributed logging will have no single point of failure and will make it possible to look up which client is using / depending on which service...

How to use DDSL?

The idea behind DDSL is really simple and dynamic / flexible - So is its usage.

API documentation can be found here

Below you can find a simple and running example but first some highlights.

Both servers and clients uses DdslClient to communicate with DDSL. The client is created like this:

val client = new DdslClientImpl

When a service wants to broadcast that it is available, this is how it is done:

client.serviceUp( Service( serviceId, serviceLocation))

ServiceId specifies what kind of service it is, and serviceLocation specifies how clients can reach us.

When a client wants to get the best location of a specific service:

val location = client.getBestServiceLocation( ServiceRequest(serviceId, clientId ))

It specifies the ServiceId describing what service it needs, and ClientId so DDSL can log which client is using which services.

When using DDSL to plumb your deployment together, you might also want to use DDSL for everything; including finding the database-server, or some other static service. In situations like this, you can save the location in DDSL permanent (Meaning it will not go offline when the DDSL-client disconnects):

client.serviceUp( Service( serviceId, serviceLocation), true)

Have a look at the examples to see how it can be used:


Also, have a look at DDSL-Status, a simple web-app showing status of all online services.

More Repositories

1

mbknor-jackson-jsonSchema

Generate JSON Schema with Polymorphism using Jackson annotations
Scala
226
star
2

dropwizard-activemq-bundle

Use it when you need to send and receive JSON via ActiveMQ in your Dropwizard application
Java
32
star
3

faster-groovy-templates

Faster-Groovy-Templates module for Play! Framework 1.2.x
Java
28
star
4

ddsl-play2-module

Module for PlayFramework 2.0 making it really easy to use DDSL
Scala
20
star
5

ddsl-dropwizard

DDSL-plugin for Dropwizard - Broadcast your Dropwizard service so other apps can discover it
Java
17
star
6

gt-engine

Standalone implementation of the groovy template engine used in Playframework 1.x
Java
17
star
7

gt-engine-play2

Groovy Template Engine for Play Framework 2.0
Java
17
star
8

deptools

Maven 2 and Maven 3 plugin which gives build error if maven resolves transient dependencies in such a way that the none-newest version is chosen
Scala
7
star
9

ddsl-playframework-module

Play framework module using DDSL both as server and client
Java
6
star
10

ddslConfigWriter

ddslConfigWriter generates new reverseProxy(nginx+++) config when new services are online in DDSL
Scala
4
star
11

play_demo_GeeCON_2011

Live coding demo at GeeCON 2011 source code
Java
4
star
12

ddsl-status

Web-app showing status of services available in ddsl-network
Java
4
star
13

play2_gte_workbench

Depricated: See this project: gt-engine-play2
Java
3
star
14

hoursregrest

Simple api and commandline to one specific hours registration system - maybe support for several systems in the future...
Scala
2
star
15

ddsl_tutorial

In this tutorial we are going to setup an nginx load balancer in front of a web application which runs on multiple servers
Scala
2
star
16

template_benchmark_app

App used to benchmark groovy template engine
Java
2
star
17

play_enhancher_problem_code

Simple app including code which have caused enhancher problems in the past
Shell
2
star
18

akka-http-tools

A set of utilities useful when implementing REST-applications using akka-http
Scala
1
star
19

mbk_mvn_repo

maven repository for my projects
1
star
20

mbknor.github.com

HTML
1
star
21

sbt-gte-compiler

Depricated: SBT Plugin using gt-engine to enable Groovy template support in Play 2.0
Scala
1
star
22

ddsl-status-play2

Web applications showing all online Services in DDSL
Java
1
star
23

webcontainer-info-extractor

Java
1
star
24

lighthousestuff

Simple app that help us finding important play tickets
Java
1
star