Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Archive for December, 2009

on Dec 22nd, 2009Eclipse RAP 1.3 M4 Released

The RAP team is proud to announce the fourth milestone for the Eclipse Helios release.

What’s new? Well, RAP now supports drag and drop semantics. The user can use the mouse and keyboard the way he is used to in his desktop applications to move, copy or link data. The API is SWT-compatible, using DragSource, DropTarget and Transfer.

dnd 300x137 Eclipse RAP 1.3 M4 Released

JFace ControlDecoration support has been added to RAP so you can make your controls look pretty now.

ControlDecoration 300x116 Eclipse RAP 1.3 M4 Released

There were many other features and fixes in the release, read the new and noteworthy for more information. If you have any feedback, please let the RAP team know on their mailing list.

on Dec 18th, 2009Eclipse Helios M4 is out

Christmas is in the very near future and I have the pleasure to announce the availability of the forth milestone for next year’s Eclipse Simultaneous Release Helios: M4 is out! This time it was less than one week between the Eclipse Platform build (called ‘+0′) last Friday, several builds (‘+1′ to ‘+3′) this week where other Eclipse projects prepare their contributions, and the package build (called ‘EPP’ – what else?) yesterday.

You can go ahead and download one of the Helios EPP packages from this URL

http://eclipse.org/downloads/packages/release/helios/m4

or you can update with the Release Train repository and the features from all participating projects from this URL

http://download.eclipse.org/releases/helios/

Everything is based on Eclipse 3.6M4.

Thanks again to everybody who helped to make this happen!

on Dec 13th, 2009Persistent Trees in git, Clojure and CouchDB

This is a tale of three images. I found these images while investigating the internals of several different applications. There are some really neat software projects emerging at the moment, and as a developer I always find it interesting to take a look at the implementation details, because there is often a lot to be learned. It’s not always something you might need right now, but maybe a few years down the line you may be confronted with a similar problem. Plus – in my opinion – knowing a bit about the internals of a program helps reasoning about its behaviour.

Exhibit A: git repositories

git trees Persistent Trees in git, Clojure and CouchDB

Let’s start with the first image. This one is taken from Scott Chacon’s talk “Getting Git”. (Actually I had to mix slides 138 and 142 together to better fit the blog format.) I’ll try not to go to much into the details of git here, listen to the talk instead of you want to know more. The thing I do want to talk about though is git’s tree structures. These tree structures describe the project contents (both directory and file) for one specific commit. These trees are completely immutable (this is ensured by SHA-1 hashes). A new commit creates what amounts to a completely new tree. But usually the changes in each commit are only a fraction of the whole tree. Since a lot of the sub-trees of the original tree have not changed (and are immutable), these can be safely recycled. Only files and folders that have changed need to be added. Note that this means parent nodes of changed nodes have to be created as well, recursively up to the tree root. But even though the tree itself is new (as evidenced by the new root) the additional space requirements are quite low, on the order of approximately O(log n). This makes for extremely compact repository format, and an astonishingly simple one.
Another thing I want to point out that the only element that needs to be mutated is the reference to the root of the tree, everything else is immutable.

Exhibit B: Clojure’s persistent data structures

clojure trees Persistent Trees in git, Clojure and CouchDB

Next up is a picture lifted from Rich Hickey’s “Clojure Concurrency” talk. If you are interested in figuring out ways to deal with the impending multi-core age, I highly recommend you take a look at this talk. The concepts and techniques are not exclusive to Clojure, so even if you are not into Lisp’s you might want to watch it.

The way clojure deals with concurrency (in a nutshell) is that every core data structure (list, trees, hash maps, etc) is immutable. This has one big perceived drawback: Immutable data structures incur a huge overhead because of all the copying involved in creating new instances. But this is only a problem if the immutability is implemented naively. Analysis shows that usually only a part of a data structure is actually modified at any given time. This again allows recycling large parts of the the “old” data structure and only creating part of it new, and just pointing to the bits of the old structure that have not changed. As these are immutable as well, it is completely safe to do so. In the picture the two green boxes are the root nodes of two data structures sharing large parts of their trees.

Since a program that only deals with static, immutable data is pretty boring, there are mechanisms for introducing changes in a program. These mechanisms are called references, and these do mutate. But the runtime ensures that these changes happen in a controlled and well behaved manner, e.g. in the form of Software Transactional Memory (STM) or agents. But everything else is essentially immutable. Note that this has the neat side effect that reading process are inherently thread-safe since nothing can suddenly change while you are looking at it, i.e. no more ConcurrentModificationExceptions.

Exhibit C: CouchDB’s append-only file format

couchdb trees Persistent Trees in git, Clojure and CouchDB

The third picture is from a blog post by Ricky Ho titled “NoSQL patterns”. CouchDB has made quite a few waves recently, so I wanted to see what makes it tick under the hood. In keeping with the Erlang philosophy of robustness and failure tolerance, couchdb uses an append-only file format. This means that all data written is not modified any further and there is thus little chance for corruption. CouchDB uses a B+ Tree to index its entries, so again we have a tree structure. And because the tree entries live inside an append only file, these trees are immutable as well. When making a change to the database, the new data is written along with all changes to nodes in the B+ Tree. Since the B+ Tree is very flat, that means even for databases with millions of entries the number of updated tree nodes is fairly small. The most recent root of the index tree can always be found at the very end of the file, and thus the database file is read from the end backwards. If any kind of failure occurs while writing changes, the software can see that the last entry is corrupt and can seek further back until it finds a “good” entry and proceed from there. Another interesting benefit is that reading processes don’t block writing processes and vice versa. A reading process can just find the latest root and then work from there. Because all references go backward in the file, and everything is immutable there is no contention. Meanwhile a writing process can happily append at the end of the file without disrupting any readers.

Further exhibits

There are probably more examples of this pattern to be found. The oldest reference I could find is “The Design and Implementation of a Log-Structured File System” written by Mendel Rosenblum and John K. Ousterhout in 1991. The most recent file system effort seems to be NILFS. The flash-based SSDs that are currently entering the market are also rumored to use something along these lines internally. I also suspect that a few of the traditional DBMS might use similar data structures under the hood

Shared characteristics

Although all the applications do very different things and come from completely different backgrounds, they share a common data structure underneath. Unfortunately I have not been able to find a well published moniker for this pattern. If anyone does, please let me know.

Update: As FuncFan pointed out in the comments the moniker I was looking for was “Purely functional trees“. Thanks for the quick reply!

Immutable, recycling trees

All three systems have these immutable trees in some way way or form that allow sharing structure. In git these are tree objects, in Clojure they are called persistent data structures, and in CouchDB they are part of the internal index tree.

Mutable references

To allow for changes in an otherwise immutable world, all systems allow for mutable reference constructs. All change is encapsulated in these references, which are called exactly that in both git and Clojure. In CouchDB the story is a little different. Here the “reference” to the latest tree is simply the end of the database file

More common ground

Apart from these “primary” characteristics there are other shared features among these three systems, that are a direct result of the underlying data structure.

Garbage collection

Because data may be shared between data structures, it is often not safe to delete all children when a root node is no longer needed. Instead a garbage collection mechanism is needed to free unused structures. Git does have a special command that does exactly that, Clojure uses the Garbage Collection in the JVM implicitly, and CouchDB offers a compact operation, which removes old versions and tree indices.

Versioning

Because no structure is changed, it is trivially easy to keep old versions around, and since a lot of data is shared it is usually fairly cheap in terms of memory to do so. Versioning is the primary application of git, so no big surprises on that end. In Clojure it is also fairly easy to add versioning for things like an “undo” buffer: Just keep a list of the old objects around. CouchDB also offers some lightweight versioning out-of-box, but it is mostly used for replication. But it should be fairly simple to add more sophisticated versioning features.

Concurrency Safety

The immutability properties of all three system make reasoning about concurrent changes and processes a lot simpler. Reading is trivial because all that is read is set in stone, so to speak. Writing is made easier by the fact that there is only a single point – the reference – that is modified to effect a specific change. This critical point can then be guarded with traditional synchronization primitives, without having to worry about the rest of the data structure.

Conclusion

I have to admit I found it a bit eerie seeing a single pattern pop up in so many different places. It may be just an idea whose time has come (similar to Garbage Collection a few years back). Or it may be just that now we simply have enough memory and computing resources at our disposal, which allows us to never have to delete something from the record, but instead only add incrementally. And oftentimes the history of data is just as interesting as the data itself. The benefits of immutability may also be a good way to tame the concurrency beast in the years to come.

I hope you enjoyed this comparative trip into the internals of these software systems. Again, check out the two talks and the blog post, they are well worth the time.

on Dec 12th, 2009PDE Goodness: Project and Target Platform Templates

A nice thing about Eclipse PDE is that it has mechanisms to make it very easy for developers to get started consuming your frameworks. Here are two of them.

Target Platform Templates

For runtime projects, such as Riena, RAP and Equinox, the first hurdle a developer faces is to set-up the appropriate target platform. A target platform is the collection of bundles that are available during compilation. Obviously if you ship runtime components they must end up in there to be available for compilation.

You can make this much easier for others by contributing a target platform template to the “New Target Definition” wizard. A developer can then select an entry in the “Template” drop-down and will instantly receive a pre-configured target definition. Much easier and less error-prone that recreating the target definition manually from step-by-step instructions.

Since the target definition’s payload can be provisioned over http, the developer only has to click on “Set as Target Platform” and is done. For details refer to the org.eclipse.pde.core.targets extension point.

pde new target PDE Goodness: Project and Target Platform Templatestarget PDE Goodness: Project and Target Platform Templates

Project Templates

Another way to help developers with their first steps is to provide a project template. This hooks into the last page of “New Plug-in Project” Wizard and pre-populates a new project with source code, binary content and appropriate plugin.xml and MANIFEST.MF files.

The templating mechanism has a lot of depth as you can manipulate data-models to dynamically craft the MANIFEST.MF and plugin.xml files. You can also define placeholder variables, such as $pluginId$ and use them in source templates. There are mechanisms to tie these variables to UI elements in the wizard pages. The developer documentation on the matter is somewhat superficial. At the moment your best bet is to check out and study the org.eclipse.pde.ui.templates project from the Eclipse CVS (/cvsroot/eclipse/pde/ui/org.eclipse.pde.ui.templates). It contains the templates that ship with the IDE and therefore plenty of examples. Complement this by reading the specification of the org.eclipse.pde.ui.pluginContent extension point and this introductory article on developer works.

pde templates PDE Goodness: Project and Target Platform Templatesriena mail PDE Goodness: Project and Target Platform Templates


on Dec 12th, 2009Eclipse 3.6 M4 (Helios) available for download

Just in time for the Holidays, the Eclipse platform team has made Eclipse 3.6 Milestone 4 available.

Feel free to download it:
http://download.eclipse.org/equinox/drops/S-3.6M4-200912101301/index.php

Upgrade to it:
http://download.eclipse.org/eclipse/updates/3.6milestones

or just browse the New and Noteworthy:
http://download.eclipse.org/eclipse/downloads/drops/S-3.6M4-200912101301/eclipse-news-M4.html

There’s a whole host of new features such as Virtual Folders

virtual folder Eclipse 3.6 M4 (Helios) available for download

and the ability to execute multiple quick fixes at once:

multifix problem hover1 Eclipse 3.6 M4 (Helios) available for download

Enjoy the early Christmas present icon smile Eclipse 3.6 M4 (Helios) available for download

on Dec 10th, 2009Webinar: Eclipse in the Large

On December 14, 2009, the Eclipse Foundation is hosting a webinar that will include speakers from Cisco, Morgan Stanley and eBay discussing deploying Eclipse to thousands, and even tens of thousands, of their developers.

Here’s the breakdown of the schedule…

  • Dennis Vaughn, Cisco
    • Scalability (65k + source files)
    • Diverse Deployments (geographically, NFS, OS/Versions)
    • Engineering Environment Diversity (legacy tools, acquisitions)
    • Working Culture (curmudgeons versus new hires, ROI versus VI/Emacs)
  • Miles Daffin, Morgan Stanley
    • Enterprise Constraints and their Consequences for Eclipse Provisioning
      • Next Steps: Further Reduce Total Cost of Ownership and Provide more Useful Features as Needed
      • Joep Rottinghuis, eBay
        • Scalability (100k + source files)
        • Deployment (individualized workspaces)
        • Usage Tracking (who is using what, and what issues are in what versions)
        • Manifest Maintenance (OSGi bundle/package versions)

      Please register via email if you’re interested.

      on Dec 8th, 2009Eclipse Vienna DemoCamp 2009

      Last week, Jeff McAffer and I had the honor to attend the Eclipse Vienna DemoCamp hosted at the beautiful TU Vienna campus.

      viennademocamp1 225x300 Eclipse Vienna DemoCamp 2009

      There were about 80 people that showed up and many interesting talks were given. Instead of going through all of them, I’ll highlight some of the ones I personally enjoyed. The day started with Werner Keil giving a talk about the Spatio-Temporal Epidemiological Modeler (STEM) project at Eclipse. STEM is a tool designed to help scientists and public health officials create and use spatial and temporal models of emerging infectious diseases. These models can aid in understanding and potentially preventing the spread of such diseases. The STEM project should serve as a reminder that Eclipse is entering new verticals and isn’t just an IDE.

      viennademocamp2 300x225 Eclipse Vienna DemoCamp 2009

      The next talk I found fascinating was e4 by Tom Schindl.

      viennademocamp3 300x225 Eclipse Vienna DemoCamp 2009

      Tom did a great job explaining why e4 exists, why EMF and how people can get involved. In his demo, Tom was self-hosting the workbench using CDO. Since the workbench model is now based on EMF, there’s a lot of interesting technologies to take advantage of in the Eclipse Modeling space. Another talk that intrigued me was by Christoph Mayerhofer who spoke about ReviewClipse.

      viennademocamp4 225x300 Eclipse Vienna DemoCamp 2009

      ReviewClipse is an integrated code review tool, that helps developers to review the source code continuously. From my point of view, this project is awesome and direly needed at Eclipse. If we had first class code review support at Eclipse and had it integrated with Mylyn… my life would be much simpler. At the moment, ReviewClipse only integrates with SVN, but future connectors are planned. The authors of the tool are looking for an open source license and I highly recommend they choose the Eclipse Public License (EPL) and move the code to Eclipse where more people would be exposed to the terrific tool. If you think this is a good idea too, please email the project.

      After that, I enjoyed more talks from the Viennese Eclipse community.

      viennademocamp5 225x300 Eclipse Vienna DemoCamp 2009

      Jeff McAffer and I also gave a talk introducing people to EclipseRT and Toast. It seems people are understanding what EclipseRT is really about now that we have a great example of the power of the technology via Toast. A decent example can speak volumes to potential adopters of your technology.

      ChrisAniszczykAndJeffMcAfferOnToast 300x200 Eclipse Vienna DemoCamp 2009

      In the end, I’m amazed to see how strong the Austrian Eclipse community is and only see great things in terms of community growth. And finally, special thanks to Michael Clay and Peter Kofler for organizing the event and allowing us to speak.

      on Dec 3rd, 2009RAP Case Study: Texas Center for Applied Technology

      I enjoy seeing people use EclipseRT technology in the wild. Recently I met and spoke with Austin Riddle from the Texas Center for Applied Technology (TCAT) about how they are using the Eclipse Rich Ajax Platform (RAP) and what applications they are building with it.

      1. What does your application(s) do?

      We have several live RAP applications that take the form of information dashboards. These dashboards allow decision-makers and analysts to disseminate information and produce a common operating picture related but not limited to global biosurveillance and large-scale emergency preparedness/management. Users can log in to our systems, customize their view of information via component and profile switching, visually integrate information within the dashboard and selectively share information between echelons of human infrastructure. Our US government customers have been very pleased with the power and flexibility of the systems.

      2. Why did you choose Eclipse RAP?

      We needed a powerful Rich Internet Application. We needed one that had to provide capabilities that frankly push the limits of what a traditional RIA could deliver. It also had to perform on older hardware and software. After working with and analyzing other options, including GWT, Flex, OpenLaszlo and others, we decided that RAP provided both the features we needed to fulfill our requirements, and the framework to develop custom features that empower our users even more. Being able to leverage other Eclipse Runtime Technology in our applications greatly reinforced our decision.

      3. How did single sourcing benefit your project?

      Our organization has a significant investment in Eclipse RCP capabilities that we needed to leverage in order to meet our dashboard requirements. It was amazing to see elements from our desktop systems just “appear” in our RAP application after just “dropping” the bundles in. Also, during our development process, we actually wrote capabilities in our RAP application that could be used in our desktop RCP applications. This “reverse” single sourcing was a pleasant surprise!

      4. In the end, how did RAP help and benefit your project?

      Most impressively, we were able to implement a first working prototype of a dashboard system in 30 days! RAP gave us the ability to rapidly prototype and ultimately provide solid systems that have withstood the scrutiny of rigorous government security evaluations. Currently, we are looking into bringing even more of our eclipse-based desktop investments to the web.

      dashboards screenshot 207x300 RAP Case Study: Texas Center for Applied Technology

      Cool stuff, huh?

      on Dec 1st, 2009Eclipse Community, Thanks!

      There has been a lot of talk lately about what the Eclipse community is and is not doing.  While I have no intention of going anywhere near that conversation, I did want to highlight something that makes me very proud to be part of this great community.  This month, the Eclipse community raised over $3,000 for men’s health issues, and that’s awesome!

      van Eclipse Community, Thanks!

      Of course I’m talking about Movember!

      mo eclipse Eclipse Community, Thanks!

      David Green led all Mommitters with $740 raised.  Thanks David.  A big thank-you also goes out to Kevin Barnes who replied to my tweet on Oct 30th and motivated me to start the Mommitters. This would not have happened without you Kevin.  I also want to thank Kim Moir (and Kim Horne for the great suggestion) who helped get our Movember splash screen in the I-Builds.

      All the Eclipse Mommitters also deserve a big thank-you for stepping up and growing a stache for charity.  You all looked terrific.

      But the biggest thanks goes out to all the community members who stepped up with their wallets and donated a few bucks to a great cause.  Looking through the list of donations it was quite a diverse group of individuals.  As a community there may be things we can improve, but I think we should be very proud of this accomplishment.

      © EclipseSource 2008 - 2011