Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brave new world #164

Merged
merged 5 commits into from Dec 15, 2015
Merged

Brave new world #164

merged 5 commits into from Dec 15, 2015

Conversation

stalehd
Copy link
Contributor

@stalehd stalehd commented Nov 12, 2015

Rewrite into a core library with simple methods and an abstraction layer on
top of the backend system.

The following backends are implemented

  • Memory (for testing; only works within a single JVM)
  • ZooKeeper (proof-of-concept implementation of the backend)

The following libraries are created:

  • Service discovery library

This brings the overall functionality on par with 2.x with a few exceptions:

  • Locking isn't implemented. That did not work for the old library so
    there's no real change in functionality
  • It isn't possible to query everything from a client. This will be
    addressed in another commit (or just ignored completely since the
    backends offers this in some shape or form)
  • It isn't possible to resolve coordinates partially, f.e. finding
    "logserver" when your own coordinate is "service.tag.region";
    "logserver" should resolve to "logserver.tag.region". This will
    be solved in a later commit by making a separate resolver class that
    creates service coordinates based on existing coordinates.

Rewrite into a core library with simple methods and an abstraction layer on
top of the backend system.

The following backends are implemented
* Memory (for testing; only works within a single JVM)
* ZooKeeper (proof-of-concept implementation of the backend)

The following libraries are created:
* Service discovery library

This brings the overall functionality on par with 2.x with a few exceptions:
* Locking isn't implemented. That did not work for the old library so
  there's no real change in functionality
* It isn't possible to query *everything* from a client. This will be
  addressed in another commit (or just ignored completely since the
  backends offers this in some shape or form)
* It isn't possible to resolve coordinates partially, f.e. finding
  "logserver" when your own coordinate is "service.tag.region";
  "logserver" should resolve to "logserver.tag.region". This will
  be solved in a later commit by making a separate resolver class that
  creates service coordinates based on existing coordinates.
@stalehd stalehd assigned borud and neumayer and unassigned borud and neumayer Nov 13, 2015
Ståle Dahl and others added 2 commits November 17, 2015 14:33
* Javadoc: Spelling errors, inconsistent puncutation
* Tests: assertThat(<something>, is(equalTo(<other>)))
  rather than assertThat(<something>.equals(<other>), is(false))
* Use Array.deepEquals() in CloudnamePath
5ms is a little bit too quick for Core i5 and lesser processors. Be nice
and increase the time to 100ms. This is a lot so most backends should
(or rather, *must*) manage this.
@stalehd
Copy link
Contributor Author

stalehd commented Nov 21, 2015

After a lucid moment last night (you know the drill) I'll add a listener to the returned LeaseHandle instance that gets a callback whenever the backend connection is lost and code in the service library to reacquire the lease when the connection is restored. Quite important stuff and not very nice to start thinking about 2 am in the night.

The last version missed this feature completely as well.

Bugger.

Use a connection URL to create backends via the BackendManager class.
This makes for a much easier way of creating different backends.
Use forEach() - much cleaner implementation.
stalehd added a commit that referenced this pull request Dec 15, 2015
Brave new world (beta). Complete rewrite of the library and zero backwards compatibility.
@stalehd stalehd merged commit f5b3f40 into Cloudname:master Dec 15, 2015
@stalehd stalehd deleted the pre-3.0 branch December 15, 2015 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants