Posts Tagged ‘Java’

IPC and Talend at the DOSUG March Meeting

March 3rd, 2009

Tonight was the Denver Open Source User’s Group March meeting.

CLIP IPC Library

First up was Clark Hobbie on the CLIP IPC Library.

First, Clark addressed the question,”Why do we need an IPC library?” . He purports you need IPC “anytime you access something outside your JVM and need to share it in a controlled and coordinated manner with another client”. Clark says that CLIP was created as an answer to the cryptic and verbose shared memory classes in the JDK.

A brief outline of what he covered in his slides is as follows:

  • What is useful about IPC?
  • When to use different IPC options
  • The example applications
  • The CLIP library
  • Shared Memory
  • Semaphores
  • Shared Queues
  • Resources
  • Where to get the slides
  • Other useful sites, etc.

Clark did a great job on his slides with funny anecdotes, images for analogies, and clear verbal examples of IPC types (props to World of Warcraft).

Talend ETL Tool

Second up was Tim Berglund speaking on the open source Talend Open Studio ETL (Extract Transform and Load) system. This French startup company is attempting to create a new price point for ETL tools with the now-common OSS business model, selling support and training while giving away the core product for free.

He neatly said this is a talk for non-DBAs but rather developers that need to work with databases. Tim admitted that there are a few negatives to the otherwise great Talend tool. Those are: the JAR is 70MB, the error messages have a French accent, and Mac Eclipse support is a work in progress.

The visual designer has a lot of off-the-shelf transforms. We also saw XML, Excel files, 10+ DB brands, and CSVs as just some of the data sources.

It was a fun set of slides that were in the vein of Slideology.

tmap.gif

Windows domain-wide setting of Environment Variables at Logon

February 25th, 2009

This post succinctly sums up significant research that I did over the last few days on the available means of setting environment variables for a Windows Domain Group of users at logon time. A Java Swing-based desktop application I’m helping a client with reads environment variables for its connectivity settings (server IP, etc.), so, it is logical that there needs to be a way to distribute these environment variables all all users from the Domain Controller. Below are the results of that research.

Oh, and be sure to hop over to this question at StackOverflow.com and add your own unique knowledge to the mix.

My research says there are four ways to do this. I started at the Microsoft Logon Script documentation pages and fanned out from there.

Login Script Batch File

Windows Server 2000, 2003, 2008

Login batch file (.BAT) scripts are just a temporary instance of a CMD window, and the environment variables set in there go away as soon as the login window closes.

set MYVAR=MyValue

Won’t work for the aforementioned reason.

So, alternatively, I can try to set the variable via directly writing to the registry like so for a System Environment Variable:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v MYVAR /t REG_EXPAND_SZ /d MyValue

or to the User Environment Variables like so:

reg add HKCU\Environment /v MYVAR /t REG_EXPAND_SZ /d MyValue

The drawback here is that the variables, though written to registry, are not read until the next login for all I can see. A new CMD window shows no trace of them until the user re-logs-in.

Login Script WSH VBS File

Windows Server 2000, 2003, 2008

With a Visual Basic Script (VBS) login script, you can use a more programmatic method to access the environment variables. This is looking like my most viable approach. This example would append to the end of PATH.

Set WSHShell = WScript.CreateObject("WScript.Shell")Set WshEnv = WshShell.Environment("SYSTEM")WshEnv("Path") = WshEnv("Path") & ";M:\DB\whatever\"

This example would just set the variable.

Set WSHShell = WScript.CreateObject("WScript.Shell")Set WshEnv = WshShell.Environment("SYSTEM")WshEnv("MYVAR") = "MyNewValue"

This approach yields variables that are immediately available via a CMD window. No reboot is required like the batch file registry writes.

ADM File

Windows Server 2000, 2003, 2008

ADM files are a way to expose custom functionality of settings to the Group Policy Editor. It seems tricky to get them installed and visible on the domain controller so I’m jumping over this option.

Microsoft Support TechNet Reference on ADM File Locations.
Another article about ADM files and using them to set Registry settings.
Tom’s Hardware on ADM Files.

---- set.adm ---- CLASS MACHINE CATEGORY "Environment" POLICY "Self dfined variables" KEYNAME "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" PART "Set MyVar1 =" EDITTEXT DEFAULT "MyValue1" VALUENAME MyVar1 ; EXPANDABLETEXT ; add expandabletext if it can contain Variables itself END PART END POLICY END CATEGORY ---- set.adm ----

Group Policy Preferences (GPP)

Windows Server 2008

Windows Server 2008 has a new feature called the Environment Extensions for the Group Policy Preferences. It allows you to conveniently set what otherwise required complex batch scripts. The new items exposed include registry values, environment variables, and more. A quick how-to guide is available here.

I can’t use this option because my clients don’t have Windows Server 2008.

RESTful Java Web Services must not return void to iPhone HTTP Services

February 17th, 2009

After many sessions of debugging and even memory inspection not yielding fruit, I’ve finally discovered what caused my previous RESTful demo apps to have sporadic behavior, in addition to the memory leak of the synchronous call.

Today’s problem solving summary:

  1. XCode projects cannot have commas anywhere in the path up to the location where they are stored or else you’ll get an error message of:
    ld: -filelist file not found: <Project Path>
  2. All RESTful web services called via the NSURLConnection APIs must return a non-null payload.

    This bit me because my “Add Contestant” function was adding the contestant and returning void. I now return a string of “Success” to satisfy this requirement. The observable failure is very quiet, which made it so hard to debug; every other web service call appears valid, but never actually makes a call across the wire. This was proven via TCPDump. All the web service call callbacks are properly called in the Objective C side of the program. It just silently failed and passed back a null payload in the response data structure.

All the code for this project is available on GitHub and will be updated with the results of the adjustments based on the above findings by tomorrow.

iPhone & Java Web Services Development, Mind Map Image

February 14th, 2009

I’m working on some updated course materials for iPhone & Java Web Services training and, by popular demand, am putting up the Mind Map I created as the master reference for the courseware. The graphic is open source for the community to leverage and benefit from. Have fun with your iPhone exploring of some new topics you might see on this Mind Map, and let me know in the comments the parts that interest you the most…

Also, here’s a link to my iPhone tagged Delicious bookmarks.

iPhone Development MindMap

Creative Commons License
iPhone Development Mind Map by Matthew J. McCullough is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

JMeter & Plugins

December 26th, 2008

I noticed a post on JMeter EJB plugin. It is a short but well written example. My ears are a bit more attuned to Apache JMeter these days after I wrote the first OSS Groovy plugin for JMeter last month. One of my clients is now using it for scalability testing of a JEE application. I highly suggest you take a look and consider contributing ideas or code to the project. I’d be glad to have other contributors.

JCP Executive Commitee Results

November 18th, 2008

I applied this year to the EC elections of the JCP for a seat on the Java SE board. I got 15.8% of the vote, but alas, did not win a seat. The PR release for this can be read here.

Standard / Enterprise Edition Executive Committee
Number of eligible voters: 948
Percent voting members casting votes: 26.9%

The top two members have been elected and will serve for the next three years.

Intel Corp. 46.4%
Keil, Werner 24.9%
McCullough, Matthew 15.8%
Tiwari, Shashank 12.7%

Other NFJS Denver Reviews

November 18th, 2008

Several other attendees, namely Tim Berglund and Mike Brevoort took some excellent notes on the specific sessions they attended at No Fluff Just Stuff. If you want a recap of the sessions so you can best choose what to attend when NFJS hits your city, take a moment to read their summaries.

No Fluff Just Stuff and Open Source in the Enterprise

November 17th, 2008

My attendance this weekend of the NFJS tour in Denver, CO proved once again to be as valuable as ever. With a heavy penchant for Open Source and its rapid innovation, the speakers showcased technologies that weren’t even on people’s vocabulary lists just last year. And take note, these are not just technologies for the sake of technology. The speakers such as Ken Sipe, Venkat Sumbramaniam, Stu Halloway, Neal Ford, and more served out a steady stream of reasons why each new technology is a game-changer in its given space.

A quick top 5 list of the best presentations (that I attended):

  • Hacking, The Dark Arts by Ken Sipe
  • Towards an Evolutionary Design by Venkat Subramaniam
  • Git by Stu Halloway
  • Failing with 100% Test Coverage by Stu Halloway
  • Mylin by Brian Sam-Bodden

If you have an opportunity to get your employer to purchase a seat for you to attend a stop on the NFJS tour, do it. If you are self employed, then don’t even think about not going. This is one of the best ROI’s of any conference going today. As Ken Sipe said in his keynote address, you must increase your networking, you must increase your knowledge portfolio, and you must continue to constantly change and improve as we IT professionals work in literally one of the most dynamic industry verticals in the world.

A very interesting article from InformationWeek also touches on the impact of Open Source, like TerraCotta in the Enterprise. With so much Open Source presented at NFJS, one can’t help but imagine the NFJS attendees are the drivers of this migration.

SwingX No Longer Funded

October 31st, 2008

Well, it looks like Swing continues to be a technology that has matured enough to be left out to pasture. In addition to the Swing team departures at Sun, the most recent related event is that SwingX, one of my favorite libraries, has stopped being funded. I don’t see this as a huge problem, as most applications are heading to the web nowadays unless they have a hugely compelling reason to be on the desktop (Development IDEs, CAD, Drawing, Graphics apps). JavaFX continues to be the also-ran in the RIA lineup against Flex (forefront) and Silverlight (2nd place).

Ambient Ideas on the iPhone

October 17th, 2008

Ambient Ideas has officially been accepted into the iPhone Developer Program, meaning we can finally deploy beta software to actual handsets and completed products to the iTunes / iPhone Application Store. Keep an eye out for our upcoming presentations at DJUG on iPhone + Java Web Services integration.

iPhone Developer Program - Ambient Ideas Accepted.png