Over a million developers have joined DZone.

Oil & Gas Exploration on the NetBeans Platform

· Java Zone

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.

Below, an interview with Bernd Ruehlicke (pictured, right) about Vinland Software Suite, an application for geoscientists created at Eriksfiord. Bernd also shares many tips and tricks here, together with interesting insights and starting points for NetBeans Platform newbies.

Bernd was born in Germany, grew up in Denmark, and currently lives in the United States. He is a petrophysicist with a background in mathematics and computer science.

Hi Bernd, you're behind the Vinland Software Suite. What exactly is that?

Vinland is an application in the oil & gas exploration business. Simply put, oil and gas sits in rock. Rock has exciting (often frustrating) behavior, if it gets exposed to stresses – like when drilling a hole through it. (Very similar to drilling tunnels through the Alps). The science around rock and its behavior under stress is often covered with the term “Geomechanics”.

Lots of the applications/formulas in the geomechanical arena are either hugely over-designed and hopeless-to-use spreadsheets or very time consuming Finite Element models, often run on poorly performing 32-bit based Windows boxes. Even though you will need a numerical model later along in your analysis, like when adding plastic deformation for example, many of the initial questions to bracket the stress tensor can be solved analytically and hence much faster.

Vinland was created to solve this problem. Its mission is to make the daily life of geoscientists easier and to avoid forcing them to become spreadsheet addicts. Here is a screenshot to make this a little bit more exciting:

(Click to enlarge the above screenshot.)

The next screenshot shows "icon badging" in action. I have really found this to be a very nice way to give the user visual feedback on the status of objects:

Learn more about icon badging here.

What are some of the typical problems that an application for geoscientists needs to solve?

The range is too wide to discuss here – it stretches from simple equation solving over massive data loading and processing to gigantic 3D visualizations consuming gigabytes of memory.

Too much software in the geoscience arena is written by “techies”. Really cool software features, but very difficult to use and most of the time with very ugly cumbersome GUIs (if any). Very often the poor design and complicated GUI is excused by the fact that the software tries to solve really complicated real-life questions. It is of no use, however, if geoscientists spend more time on the technical intrigues of the software than on using their skills on interpreting a geological setting.

How does the NetBeans Platform help with these problems?

From my experience, many applications start with a brilliant idea by someone and a quick prototype is written. Now it increases in size as new features get thrown into the prototype, without a lot of consideration of how to support this in the long run or investing time in the underlying design.

After a while, memory management, software integrity, and dependencies, plus a lot of Window/GUI management becomes the primary time consuming part of the software development process, which totally remove the focus from the main purpose... which is the development of features solving geological problems.

Using NetBeans as a platform reduces this time by multiple orders of magnitude:

  1. It makes sure that you do not mix the underlying framework with your application and keeps a clear separation of the code, simply due to the fact that you are using the very well designed NetBeans APIs.

  2. The NetBeans Platform gives you all the plumbing needed to deliver a scalable suite of applications. As a consequence of running inside the same JVM, you can allow objects from the different applications to be shared, for example via the powerful Lookup API. No need to re-invent the wheel and write your own messaging or IPC protocol, which again sidetracks you from your real purpose. Not to mention that NetBeans Platform 6.7 even includes an installer framework.

All this gives you more time to focus on the core value-adding activities.

How did you decide to use the NetBeans Platform over its competitors?

Platform independence, 100% Java, fully Swing based, very well documented, and very strong on-line community.

I looked at Eclipse. Just locating the correct distribution already gave me a bad taste – but after I came across their SWT dependency I ran away as fast as I could.

The NetBeans Platform is really the only true Swing based application platform out there. And, by the way, the Ant-based build system is extremely useful and powerful in a bigger setting, with integration into continuous build systems.

But isn't Swing "really slow"?

Without starting a long unproductive discussion with some rendering 3D graphics gurus – it really boils down to: A) Good code design for the parts rendering/acquiring data and B) Memory and C) The graphic card.

All the rest of the discussion around this is just noise.

How has the development process on the NetBeans Platform been? What would you recommend to others starting to do the same thing?

As with any bigger mature API, it will take some time to get acquainted with all the possibilities. I would say to really get the hang of it – set aside a month.

After that, you will start to enjoy all the benefits and possibilities given to you by the NetBeans APIs. The best thing is to find something which really interests you and to start there. For me, it was the Visual Library which really started me using the NetBeans Platform. (Quick start for Visual Library is here.)

Take your time and go through the tutorials – check the Top 10 NetBeans APIs screencasts as a start. After that – make sure you understood what was said. Then try it out! Then, find a tutorial which fits the problem you currently have – for me it was the Povray series (soon to be re-released as a full-blown on-line course) which really got me started. If you are planning to write an application with project support, node selection, file support, etc, go through this course once it is released.

Of course - subscribe to the NetBeans Platform developer mailing list, which is a fantastic resource.

Please finish this sentence: "If I had known that..." :-)

... removing objects from the Lookup also triggers a "LookupEvent", I would have saved some time debugging slow performance. It is of course obvious that it should (doohh), but... I simply did not think about it in the beginning. I will write a "removeSilently(object)" method for this in my VinlandLookup. ;-)

Any tips or tricks for advanced NetBeans Platform users?

  1. In Heiko Boeck's book there is an example of how to make a context aware action which is really cute and I use it all over Vinland. I combined this info with the example for a DropDown action from Geertjan's blog (here), Antonio Vieiro added this to the NetBeans Wiki (here).

  2. Think about if your TopComponent(s) should be singleton(s) or rather allow multiple instances – go here for details.

Anything else you want to share?

Remember to create many modules and use the decoupling strategy explained in Part 2 of the Top 10 NetBeans APIs series, which explains how service providers and dependencies are handled in the NetBeans Platform. (Use a Factory in case you need to get multiple instances of a given object).

It is a huge advantage, not just for limiting possible spaghetti-code but also to allow updates of an already deployed application via the update center mechanism!



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.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

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.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}