{"id":19567555,"url":"https://github.com/mbknor/ddsl","last_synced_at":"2025-04-27T02:31:58.026Z","repository":{"id":1316227,"uuid":"1261075","full_name":"mbknor/ddsl","owner":"mbknor","description":"DDSL - Dynamic Distributed Service Locator","archived":false,"fork":false,"pushed_at":"2015-10-11T18:58:30.000Z","size":307,"stargazers_count":102,"open_issues_count":1,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T19:42:01.933Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbknor.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-16T19:02:43.000Z","updated_at":"2023-04-29T17:23:34.000Z","dependencies_parsed_at":"2022-08-16T13:05:12.176Z","dependency_job_id":null,"html_url":"https://github.com/mbknor/ddsl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbknor%2Fddsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbknor%2Fddsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbknor%2Fddsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbknor%2Fddsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbknor","download_url":"https://codeload.github.com/mbknor/ddsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251080412,"owners_count":21533096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T05:38:15.582Z","updated_at":"2025-04-27T02:31:57.450Z","avatar_url":"https://github.com/mbknor.png","language":"Scala","funding_links":[],"categories":["服务发现"],"sub_categories":["Spring Cloud框架"],"readme":"DDSL - Dynamic Distributed Service Locator\n===================\n\n * Service Discovery\n\n * Plug and play dynamic Cluster\n\n * Now also with modules for [Play Framework 1.x](https://github.com/mbknor/ddsl-playframework-module), [Play Framework 2](https://github.com/mbknor/ddsl-play2-module), [Dropwizard](https://github.com/mbknor/ddsl-dropwizard) and [Ruby](https://github.com/bmaland/ddslbg)(Thanks to Bjørn Arild Mæland)\n\nDDSL is written in Scala and can be used by Scala, Java or any other Language on the JVM.\n\nHave a look at [ddsl-cmdline-tool](https://github.com/mbknor/ddsl/tree/master/ddsl-cmdline-tool) if you are using a none-JVM-language or just likes the command-line.\n\nHere you can find \u003ca href=\"http://bit.ly/kEhVOc \"\u003emy Lightningtalk about DDSL\u003c/a\u003e at Roots Conference in may, 2011.\n\nCheck out [ddslConfigWriter](https://github.com/mbknor/ddslConfigWriter) which automatically reconfigures nginx (or any other reverse proxy like apache, squid etc)\n\n\nProject history\n-------------------\n\n * 20130211 - Version 0.3.3 released - using Scala 2.10.0\n * 20121029 - Version 0.3.2 released\n * 20121029 - Fixes #6 - Prevent exception when querying a never-used zookeeper\n * 20121009 - Version 0.3.1 released - Fixes logger dependency issue\n * 20121004 - Version 0.3 released\n * 20121004 - Added persistent serviceUp - usefull for static resources like databases etc\n * 20120911 - Added [ddsl-cmdline-tool](https://github.com/mbknor/ddsl/tree/master/ddsl-cmdline-tool)\n * 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\n * 201105xx - Added Java example\n * 20110226 - version 0.2 released\n * 20110125 - version 0.1.RC1 released\n\n\nWhere does DDSL help?\n-------------------------\n\nIn many big companies you have a lot of services (SOAP, REST, etc) spread across many servers on \nseveral different Web Containers/Application Servers/ESB (Weblogic, Glassfish, Tomcat, Jetty, Mule, etc).\nAt least this is the situation where I work. You also have several different environments:\ntest, preprod, prod etc with different servers and databases etc.\n\nOne service might use several other services.\n\nYou might also have (or want) several different versions of one service to run at the same time.\n\nAll those service locations... This means a lot of configuring\n\nThis is where DDSL helps..\n\n\nWhat is DDSL ?\n------------------\n\nDDSL - Dynamic Distributed Service Locator\n\n(Scaladoc can be found [here](http://mbknor.github.com/ddsl-scaladoc/))\n\n\n### Dynamic ###\n\n- No admin needed\n- You don't have to manually add your service / version to the repository\n- Your application can automatically register its location.\n-- It can also register it's \"quality\" (Clients will preferred locations with better \"quality\"\n- Locations on \"localhost\" will be preferred\n- You can mix several \"environments\" (prod, test) within the same DDSL-repository\n- Automatically load balancing between multiple locations with same \"quality\"\n- Service is automatically removed from repository, if it crashes/go down\n\n### Distributed ###\n\n- DDSL has no single point of failure\n- It uses [ZooKeeper](https://hadoop.apache.org/zookeeper/) as its dynamic distributed storage\n\n### Service Locator ###\n\n- A repository of services (with version) and their current locations\n\n\n### Coming functionality ###\n\n#### Distributed logging ####\n\nDistributed logging will have no single point of failure and will make it possible to\nlook up which client is using / depending on which service...\n\n\nHow to use DDSL?\n====================\n\nThe idea behind DDSL is really simple and dynamic / flexible - So is its usage.\n\nAPI documentation can be found [here](http://mbknor.github.com/ddsl-scaladoc/)\n\nBelow you can find a simple and running example but first some highlights. \n\nBoth servers and clients uses [DdslClient](http://mbknor.github.com/ddsl-scaladoc/com/kjetland/ddsl/DdslClient.html) to communicate with DDSL.\nThe client is created like this:\n\n\tval client = new DdslClientImpl\n\t\nWhen a service wants to broadcast that it is available, this is how it is done:\n\n\tclient.serviceUp( Service( serviceId, serviceLocation))\n\n[ServiceId](http://mbknor.github.com/ddsl-scaladoc/com/kjetland/ddsl/model/ServiceId.html) specifies what kind of service it is, \nand [serviceLocation](http://mbknor.github.com/ddsl-scaladoc/com/kjetland/ddsl/model/ServiceLocation.html) specifies how clients can reach us.\n\nWhen a client wants to get the best location of a specific service:\n\n\tval location = client.getBestServiceLocation( ServiceRequest(serviceId, clientId ))\n\t\nIt specifies the [ServiceId](http://mbknor.github.com/ddsl-scaladoc/com/kjetland/ddsl/model/ServiceId.html) describing what service it needs, and\n[ClientId](http://mbknor.github.com/ddsl-scaladoc/com/kjetland/ddsl/model/ClientId.html) so DDSL can log which client is using which services.\n\nWhen 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):\n\n\tclient.serviceUp( Service( serviceId, serviceLocation), true)\n\n\n\nHave a look at the examples to see how it can be used:\n\n * [Scala example](https://github.com/mbknor/ddsl/tree/master/examples/ddsl-scala-examples)\n * [Java example](https://github.com/mbknor/ddsl/tree/master/examples/ddsl-java-examples)\n\n----\n\nAlso, have a look at [DDSL-Status](https://github.com/mbknor/ddsl-status), a simple web-app showing status of all online services.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbknor%2Fddsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbknor%2Fddsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbknor%2Fddsl/lists"}