Atom Atom feed

C#/C++ Interoperability via IIOP.NET and TAO

This thing just works.

I've mentioned the OCI internal Java lunches on this blog before. Well, today we have our internal C++ lunch. And this is my experiment blogging the event live.

Dan Troesser is out speaker. And he's talking about IIOP.NET.

He's developing a GUI and the decision is made to do it in .NET. And he has requirement to talk to TAO/C++ CORBA servers.

He looked at:

  • IIOP.NET
  • Borland Janeva
  • J-Integra Espresso
  • Remoting.CORBA

And IIOP.NET was the logical choice:

  • Open Source, LGPL
  • Maintained by Elca Informatique SA
  • Supports lots of ORBs
  • Worked with .NET 1.1, .NET 2.0 and Mono
  • Nice presentation on their website.

Dan jumped to the presentation on the IIOP.NET website, and started the technical part of the presentation.

  • IIOP.NET Channel
  • IDLTOCLSCompiler

Steve asked about any mapping difficulties, and Dan said no, but we are using simple types and sequences and structs on the project.

Kevin asked if they do IIOP to SOAP conversion. Dan have never came across that.

IIOP.NET uses the .NET Remoting's Channel interface.

Now Dan's throwing class names on the screen. Things like Ch.Elca.Iiop.Services.RmiIiopInit, Ch.Elca.Iiop.Idl.CustomMapperRegistry.

You can get to CORBA Naming service from IIOP.NET.

Phil asked if the naming service access code is the result of IIOP.NET's mapping of the OMG's naming service IDL. The answer is yes.

The CLSToIDLGenerator can generate IDL interfaces for your existing .NET Remoting classes so that foreign applications can talk to them via CORBA.

The IDLToCLSCompiler turns IDLs to .NET assemblies. Dan mentions that if you are using value types, you have to something special.

Phil asked if IIOP.NET support dynamic CORBA. The answer is that we haven't used it.

Dan then showed some examples for:

  • .NET client, .NET server
  • .NET client, .NET server with Naming Service
  • TAO/C++ client, .NET server
  • TAO/C++ client, .NET server with Naming Service
  • .NET client, TAO/C++ server with Naming Service

People are commenting that the C# code is more like RMI code rather than CORBA code. For example, it is not apparent when the event loop (or any thread) is started to service the CORBA object.

Dan closed the talk by saying that he likes .NET 2.0 and Visual Studio .NET 2005. It contains many improvements over .NET 1.1 and Visual Studio .NET 2003. Kevin mentioned that VC++8 is the best Purify you can buy. Just running our code VC++8 uncovered a number of bugs in our code.

Dan closed the talk for real by providing a few tips:

  • Don't hand code the remote interface
  • Use MPC for C++ and C#
  • Chad added support for vc8 and C# to MPC

Oops, AJAX Patented

Jeffrey Zeldman: On Valentine’s Day the U.S. Government granted a patent on AJAX to an obscure web shop that promptly announced plans to “license” the technology thousands of sites and products are using. What happens next is anyone’s guess, but I suspect it will involve lawyers.

Tags :

Google Page Creator Beta---Good!

It has all the features of Microsoft Word that I use.

I like it! I like Google Page Creator, that is.

I clicked on the link. I logged in with my GMail account. I agreed to the terms and conditions. And boom, I'm right at the main page, where I can create my home page. Less than a minute later, I'm done.

Go take a look. At http://weiqigao.googlepages.com/home.

Here's the screen shot of a working session of Google Page Creator:

From a UI perspective, the features provided in this tool is comparable to the features I normally use when I'm in Microsoft Word (the stuff that's present since Word 2.0, Title, Heading, Bold, etc.)

I still need to figure out

  • How to save the created page somewhere else
  • What to do when the googlepages.com server is down
  • How to control who can or cannot read the page
  • If they support some kind of automatic link creation
  • If they support link migration (BTW, have you noticed how on Windows XP if you create a link on the desktop and you subsequently move the original to a different spot, the desktop link will follow the move?)

I can't wait when Google Presentation Creator comes out!

Tags :

Kevin Wants To Teach You Boost

Come and discover why C++ is fun again.

Kevin Heifner: I'm still finishing up the course, but OCI has started advertising the class.

Boost is a quickly growing and widely utilized Open Source C++ collection of libraries that provide tomorrow's C++ today. Boost allows developers to more quickly develop high performance production ready tailored applications. Many of the libraries are either already part of the draft C++ Standards Committee's Library Technical Report (TR1) or are proposed for the upcoming TR2.

Go and register yourself to any one of the four offerings.

Tags :

Hit F7 If You Are In Firefox

Hit F7 If You Are In Firefox.

Hit F7 If You Are In Firefox.

Tags :

QEMU: The Open Source Processor Emulator

Run Windows apps in any operating system.

I've been playing with QEMU for 47 days now. QEMU is an processor and system emulator written by Fabrice Bellard and released under the GPL(for binaries)/LGPL(for shared objects) licenses. I installed QEMU 0.8.0 on my AMD64/Fedora Core 4 Linux machine and created several guest images and installed different OSes on them, including several flavors of Linux and Windows.

By far the most challenging and the most fun OS to install and work with is MS Windows 3.1:

QEMU emulates a whole PC system with a Pentium II processor, PCI bus, a CirrusLogic graphics card, SoundBlaster 16 sound card, floppy drive, IDE hard drive, CD-ROM, and an Ethernet card. QEMU also provide the emulated system with a DHCP server and a SMB server.

The QEMU download for Linux is only 2.6MB in size, not as overwhelming as VMWare Server's 207MB total download. The QEMU documentation is extremely clear and helpful. The QEMU Users Forum is also a good source of information. (The MacOSX group is very active.)

To get started with the Windows 3.1 installation, all I have to do is:

[weiqi@gao] $ qemu-img create ms-windows.img 500M
[weiqi@gao] $ qemu -fda /dev/fd0 -boot a ms-windows.img

QEMU will create the hard drive image, and start booting from the floppy drive. From that point on, everything proceeds exactly as if I'm building a new machine, with one exception—QEMU can't detect floppy disk or CD-ROM disk changes. In addition to the physical act, I have to switch to the QEMU console (Ctrl-Alt-2) and issue commands to tell QEMU that the floppy disk has been changed:

QEMU 0.8.0 monitor - type 'help' for more information
(qemu) eject fda
(qemu) change fda /dev/fd0

My choice of MS Windows 3.1 as the guest OS is part pragmatism and part nostalgic. Pragmatic because it's small—MS-DOS 6.22 comes in three floppies, and MS Windows 3.1 in six. Nostalgic because I spent considerable amount of time there and I haven't seen it for a long time.

I'll spare you with the boring details of setting up a Windows 3.1 box except for noting how primitive it was and how compact it was. Both CD-ROM support and TCP/IP networking are add-ons to the OS. But it runs fine on 8MB of memory. Thanks to the internet, I'm able to find all the hardware drivers and a few applications.

I leave you with my CONFIG.SYS and AUTOEXEC.BAT:

C:\>type config.sys
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE NOEMS I=B000-B7FF WIN=B500-B7FF WIN=B200-B4FF
BUFFERS=10,0
FILES=50
DOS=UMB
LASTDRIVE=E
FCBS=16,8
DEVICEHIGH /L:2,12048 =C:\DOS\SETVER.EXE
DOS=HIGH
DEVICEHIGH /L:2,9872 =C:\SB16\DRV\CSP.SYS /UNIT=0 /BLASTER=A:220
STACKS=9,256
DEVICEHIGH /L:2,22896 =C:\CDPRO\VIDE-CDD.SYS /D:MSCD001 /P:1F0,14 /P:170,15 /P:1
E8,12 /P:168,10
SHELL=C:\DOS\COMMAND.COM C:\DOS\  /p
C:\>type autoexec.bat
@ECHO OFF
SET SOUND=C:\SB16
SET BLASTER=A220 I5 D1 H5 P330 T6
SET MIDI=SYNTH:1 MAP:E
C:\SB16\DIAGNOSE /S
C:\SB16\MIXERSET /P /Q
C:\WINDOWS\VGAUTIL\winmode.exe t640=75 t800=60 t1024=60 t1152=70 t1280=87 t1600=
0
LH /L:0;2,45456 /S C:\DOS\SMARTDRV.EXE
LH /L:2,13984 C:\DOS\SHARE.EXE /L:500
C:\DOSIDLE\DOSIDLE.EXE
LH /L:2,27952 C:\DOS\MSCDEX.EXE /D:MSCD001
LH /L:2,6384 C:\DOS\DOSKEY.COM
LH /L:2,9216 C:\CRYNWR\NE2000.COM 0x60 11 0xC100
LH /L:2,4144 C:\CRYNWR\WINPKT.COM 0x60
PROMPT $p$g
PATH C:\DOS;C:\GUPTA;C:\WINDOWS;c:\trumpet;C:\UTILS;C:\WIN31DDK\386\TOOLS;C:\WIN
31DDK\286\TOOLS
SET TEMP=C:\DOS
WIN

Oh, and finally, for the other six people on earth who also are trying to run Windows 3.1 in either QEMU or VMWare, I have solved the CPU usage reduction problem by writing my own VxD. This is a 32-bit virtual device driver that hooks the Windows primary scheduler's idle event and issues the privileged (ring 0) HLT instruction. It's similar to AMNHLT and DOSIDLE. I'm calling it WQGHLT and am making it available here.

This blog entry is composed in part in Netscape 4.08 for Windows 3.1 over Trumpet WinSock 3.0.

Tags :

JavaScript To Gain Pythonic Features

Also, Python in XUL will land soon.

Brendan Eich: Mark Hammond's work to support Python in XUL is nearly done. The DOM_AGNOSTIC2_BRANCH should land in the next few weeks. Already I see many on the PyXPCOM list testing Mark's fine work, chomping at the bit to use Python in XULRunner.

This brings to mind a hot topic in my recent hacking: infusing JS with Pythonic generators and iterators, including array comprehensions. Brief taste: ...

Read the rest of the post.

The Ja in AJaX is expanding in front of our very own eyes.

New Toys in JDK 6

I think "Java 6" is what they call it now. Whatever!

I just downloaded and installed the beta release of JDK 6 a.k.a. Mustang. And here's some very superficial impressions.

  • The download is almost the same size as JDK 5.
  • Both Rhino and Jython started up under JDK 6 Beta with no problems. This was not the case for JDK 5. JEdit 4.2 works fine too.
  • javap output still looks funny.
  • The JDK bin directory contains the following new experimental tools (some documented here):
    • java-rmi: ?
    • jhat: Heap Dump Browser - Starts a web server on a heap dump file (e.g., produced by jmap -dump), allowing the heap to be browsed.
    • jmap: Memory Map for Java - Prints shared object memory maps or heap memory details of a given process or core file or a remote debug server.
    • jrunscript: Script shell for Java - Runs a script. (See Paul Jensen's article.)
    • jstack: Stack Trace for Java - Prints a stack trace of threads for a given process or core file or remote debug server.
    • schemagen: ?
    • wsgen: ?
    • wsimport: ?
    • xjc: ?

This doesn't feel like the big jump that we experienced with JDK 5. (But if you know what "shared object memory" is, I'd like to hear about it.)

Interestingly, in the OCI Java lunch yesterday, most of the developers are still using JDK 1.4 at work. They didn't move to JDK 5 for various reasons. It would be interesting to see how organizations manage the transition to JDK 6. Maybe they can just skip 5 and go to 6 directly?

I have a feeling that the lack of a 5.1 version has really hurt the adoption of JDK 5.

Tags :

The Rumor Is True. Oracle is buying.

Sleepycat acquired.

Mike Olson: You have likely heard the rumors; you may even have heard the news. It's true.

Go read the whole thing.

How Much Is Your Blog Worth?

Not bad.

(Saw this on Curt's Comments)


My blog is worth $9,032.64.
How much is your blog worth?

Tags :

GNU's Now Unix

GNU has won. Unix (at least Solaris) is free.

Tim Bray: I think Sun could legally ship something like this under the name “GNU/Unix”. Which would be concise, descriptive, accurate, and funny. (Because GNU stands for “Gnu’s Not Unix” and Solaris, after all, is.)

I was chatting this over with Simon Phipps and he suggested that GNU could stand for “Gnu’s Now Unix”.

Tags :

OSGi, No Stuff Just Fluff, Old Post, ...

It's JUG meeting day today.

The St. Louis Java Users Group meets on the second Thursday of the month. Today's presenter is O'Reilly author Brian Coyner, and the topic is Open Services Gateway Initiative (OSGi).

Most people recognize OSGi as the foundation for Eclipse 3's plug-in architecture. Brian takes the concept and applies it to Swing based GUI product development. What results is a highly modular, service oriented, hot patchable GUI framework—a JBoss-like container for Swing components.

Brian is his usual lively self. There are lots of back and forth with the audience.

The presentation slides can be found here.


The No Fluff Just Stuff Software Symposium will come back to St. Louis on March 03-05, 2006. We gave out a free pass to the show at the JUG meeting today.

This is an excellent show. I attended twice. I highly recommend it. Send the whole project team. Early registration is still open (till Feb 12.)


I overheard a comment today that reminded me of an old blog entry I wrote. So I searched for it. It's hard to believe but I wrote it in 2003. Here it is.

Tags :

Recycling Electronics

Blogged for future reference.

Electronics recycling was on the local news (KMOV Channel 4) today. They provided a link to a map of sites that recycles electronics in St. Louis:

Tags :

VMWare Wants To Email You A Free VMWare Server License

And a lot of my colleagues are excited about it.

The news started to trickle in last week. And the press release hits the wire today:

VMware (an EMC company): VMware Server is feature-packed with the following market-leading capabilities:

  • Support for any standard x86 hardware
  • Support for a wide variety of Linux and Windows host operating systems, including 64-bit operating systems
  • Support for a wide variety of Linux, NetWare, Solaris x86 and Windows guest operating systems, including 64-bit operating systems
  • Support for Virtual SMP, enabling a single virtual machine to span multiple physical processors
  • Quick and easy, wizard-driven installation similar to any desktop software
  • Quick and easy virtual machine creation with a virtual machine wizard
  • Virtual machine monitoring and management with an intuitive, user friendly remote console

Download here.

Tags :

NetBeans Still Thinks It Competes With Eclipse

It's competing with its own past, which is an impossible task. Just ask the Applet people.

Roumen: Why Doesn't Sun Want to Join Eclipse Foundation

Ok... this question keeps coming all the time. Everytime we announce a new release of NetBeans someone asks it. So in case somebody asks you, you can send them a link to this blog entry. Thanks, Gregg, for summarizing this.

Question: These Sun developer tools have some great features, but why try to do it all? Why not just join the Eclipse Foundation and have one focused effort to use for building tools? In other words, why couldn't all of Sun's leading-edge tools features just be delivered as Eclipse plugins?

A: There are several reasons:

He gave six reasons. And every one of them is wrong. Wrong not in the technical sense, but in the sense that it won't win anybody over to their side who are not already there.

I'm fairly open minded to the new version of NetBeans. I had a little issue about their web site using the wrong license, but that seems to have been fixed with the 5.0 beta's and with the final release. I just downloaded and install NetBeans 5.0. And it looks great. (Although the new class wizard still generates a no-arg constructor, which, if you think about it, does more harm than good.)

Here's my reaction to Sun's reasoning. (The fact I'm still thinking NetBeans as a Sun product rather than an independent Open Source product may be indication of the ill of NetBeans marketing.)

"SWT is not WORA"

This is so 1997. WORA, while a good ideal, hurts Java as an ideology. The first round of WORA war got us a Microsoft technology (.NET) that competes with Java. The second round of WORA war got us an IBM technology (SWT) that competes with Swing. I'm not sure Sun wants to fight another WORA war. For what? To lose the hand held market place?

"Look at this bug (SWT/Mac Issues)"

Don't look at other peoples bugs. Look at your own. I reported many bugs to Sun. Took them months to just acknowledge them. Some has gone on years without being fixed.

"Ours is one big bundle (Theirs you have to piece together)"

My version of Eclipse comes with my operating system installation with everything configured just right. Even for C++ or Python development.

"Look at what people built with our platform"

They look great! So?

"We are 31% market share, and people download us"

J++ were, like, what, 85%. I've downloaded NetBeans many times in 2005. I actually downloaded it three times in the past two weeks (rc1, rc2, and final.) I did not download Eclipse this year at all. It came with my operating system distribution.

"Competition is a good thing"

You bet it is.

In conclusion

Come on guys. You are selling an Open Source technology. Tell us what it can do and how it does it better than anybody else's open source or commercial products. If it fulfills a need, people with that need will use it. Bashing Eclipse gets you guys nowhere.

WORA is a winning technical proposition, but a lousy marketing slogan with a losing track record. Say it one more time, I'll disable Java in my browser. Oh wait, it already doesn't work. (There is no 64-bit browser plugin in the amd64 JDK.)

The best marketing approach for NetBeans? Make a non-paid, non-Sun, non-NetBeans core team member come out and say good things publicly about NetBeans. I know someone who did exactly that.

Tags :

Java News Brief (JNB): Scripting Support in Mustang

Is it 6.0 time alreasy?

This month's OCI Java News Brief features Paul Jensen on Scripting Support in Mustang:

Paul Jensen: The upcoming JDK 6.0 (Mustang) release does not approach the magnitude of enhancements in JDK 5.0, but does offer several interesting updates. Among these updates is the incorporation of JSR 223 Scripting for the JavaTM Platform. Essentially, this introduces a standard framework to allow scripting language programs to be executed from and have access to the Java platform. It provides many of the capabilities of BSF (Bean Scripting Framework). As with BSF, JSR 223 provides a common interface for integration of a variety of scripting languages. The specification includes examples incorporating PHP and Javascript. Eventual support for a wide range of scripting languages (BeanShell, Jython, Ruby, etc) is expected.

Scripting support in Java has come a long way since I first wrote about it 1800 days (about five years) ago. I am glad that scripting support has finally come to the JDK proper.

On a completely different note, is it really almost JDK 6.0 time already? It feels like yesterday when JDK 5.0 was released. But it's been a year and four months now.

Tags :