Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Strangeloop Disruptor Workshop Materials

DZone's Guide to

Strangeloop Disruptor Workshop Materials

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

On Sunday I gave my very first workshop on the Disruptor.  The aim was to give people some hands-on coding experience using the syntax.  Because time was limited (you can't get people to build an entire application architecture in 2.5 hours) the example is somewhat contrived, and needs a big leap to make it into a proper application context.  But the workshop should:
  1. Give an overview of the Disruptor
  2. Show how to create a simple one producer, one consumer example.
  3. Show how to wire up a parallel event handler
  4. Show how to how (and why) to create a diamond dependency graph.
  5. Extrapolate beyond these very simple examples to something closer to a real world architecture.
Requirements are:
  1. Basic Java skills
  2. Java 7 update 7
  3. (Optionally) IntelliJ.
The slides (not all that useful, I'll grant you, without me talking) are available, and you can download the code.

If you want to work through the examples yourself, start with com.mechanitis.towerdefense.TowerDefence.  The starting point code for the workshop is in package  com.mechanitis.towerdefense.   com.mechanitis.towerdefense1 shows a solution to exercise one,  com.mechanitis.towerdefense2 to exercise 2 and so forth.  The final package,  com.mechanitis.towerdefense4, has some different towers you can play with to see the effects.  They don't really show anything special about the Disruptor, but they were fun to write and are interesting to play with.




Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Published at DZone with permission of Trisha Gee, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}