Author |
Message
|
MrVMax |
Posted: Thu Aug 01, 2013 11:15 am Post subject: Trouble with 'C' node development |
|
|
Novice
Joined: 01 Aug 2013 Posts: 23
|
Hello there ...
The issue are about 2 different problem I'm finding while I'm trying to develop a node for WMB 8.0.0.2 using 'C' language. To better understand my questions I'm an OLD assembler and 'C' programmer with NO KNOWLEDGE of java env or language.
The toolkit that I'm using is on a Windows 7 virtual machine while the Message Broker is on a Linux RedHat 6 virtual machine.
So I started with importing the example:
User-defined Extension sample
and following the instructions made work the NumCompute node in the demo flow without any trouble only within a completely new workspace while importing that sample in used workspace made some trouble for the "Project > Clean" step.
Since the sample had also a a Java node I removed everything restarted the Toolkit with the -clean option removed on the broker from the User lil path everything I've added there restarting the broker.
Then I've reimported the sample deleting from the workspace all the java stuff that I was supposing was useless for my task and leaved only
the 'C' code stuff:
- UDESampleCode
- UDESampleLibrary -> Linux_x86_64 (my env)
- UDESamplePlugInNodeProject in which I removed every reference to the other node SearchFilter
I exported the project UDESamplePlugInNodeProject as a deployable plug-in stopped the toolkit copied the exported jar restarted the toolkit with -clean
put only the lil file into the broker User lil path and everything was still working.
Now the trouble: I modified the property of the node inserting a new property in the basic group ... and made the export thing with all related stuff for the toolkit ... and on the toolkit no problem at al since i tried to deploy the bar file to the broker ... not surprising at all since i didn't make anything to let the broker know the new node property ...
So I've 2 questions:
Which file makes the broker know of the properties of the node ? And how happened that when I've cleared all and didn't put anything but the lil file on the broker the deployment was succesfully before I added the new property ?
I'm pretty shure about the stop and start stuff of the broker after each phase like the restart with -clean option of the toolkit ...
BTW at the moment i didn't modified the 'C' sources and the lil file because I'm still trying to understand which value the parameter resourceManager must receive the function cniGetResourceProperty that I suppose will give me access to the node property
I know that not many people still use 'C' language for developing this kind of things, but I hope in some help from You
thanks in advance and forgive my bad english language skill  |
|
Back to top |
|
 |
lancelotlinc |
Posted: Thu Aug 01, 2013 11:24 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Would you like to share what you want to develop with the custom node? The broker functionality is really really complete. You may find it quicker to use the in-built functionality. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
MrVMax |
Posted: Thu Aug 01, 2013 1:13 pm Post subject: |
|
|
Novice
Joined: 01 Aug 2013 Posts: 23
|
Well I know that a lot of functionality are implemented, but You know there is anyway something that is left out So there is the possibility to implement a node and if there is the possibility I would like to know how it's supposed to work !
Anyway the need is to make a flow capable to interact with the Operative System to do some different task like stopping other message flows or start shells script or to have the possibility to check the md5 checksum of files received through ftp node integrated into the flow ... with the WMB 6.1 I did those things with 2 support pacs that on the 8.0.0.2 a collegue of mine reported as not working anymore and through a triggered application that received messages and invoked the 'c' library system call sending a reply message back to the WMB.
So, since I can't depend on other people to have fixed their nodes for the 8.0.0.2 WMB and the triggered application is an time expensive solution I resolved to write directly a message node that could do those things coding that in 'C' both for performance and for skill avallability.
Any side effect that You Know ? |
|
Back to top |
|
 |
kimbert |
Posted: Fri Aug 02, 2013 12:24 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
I'm an OLD assembler and 'C' programmer with NO KNOWLEDGE of java env or language |
You probably have a lot of knowledge about the Java language and environment. You just don't realise it yet.
Quote: |
Anyway the need is to make a flow capable to interact with the Operative System to do some different task like stopping other message flows or start shells script or to have the possibility to check the md5 checksum of files received through ftp node integrated into the flow |
If you are planning to write C nodes for those tasks then you should probably see a doctor. Java would be easier. There may be non-Java solutions too.
Quote: |
I can't depend on other people to have fixed their nodes for the 8.0.0.2 WMB |
Exactly. And future maintainers of your system will have the same problem with your custom C node(s).
My recommendation: Learn how to use Java. Don't use it unless it is required. Do use it when it is the best solution. I have personally implemented an MD5 hashing solution in WMB8 using the JavaCompute node. Starting from very little knowledge, it took me half a day. And I handed over to another IBMer who was immediately able to maintain the solution. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
MrVMax |
Posted: Fri Aug 02, 2013 2:02 am Post subject: |
|
|
Novice
Joined: 01 Aug 2013 Posts: 23
|
Well I can see some reason in Your statement Kimbert, but since 'C' is still supported and the knowledge of it, at different level, is diffused in my team I don't see reason to avoid to learn the 2/3 things of the WMB interface I lack the knowledge of instead of learning a language.
I'm still trying to understand by myself which is the way to avoid the message "the implementation library installed at the broker does not match the node definition" I suppose that I must put other files in the the user lil path beside of the lil itself, but I didn't find any clue in the help about it and moreover no idea about how to produce it.
It should depend on the node.properties but in which way I can the broker have knowledge of it ? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Aug 02, 2013 5:20 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The Toolkit representation has nothing to do with the runtime representation of the node.
They are only loosely coupled.
See Setting Attributes.
Note that the C user-defined node API is a much lower level API, with a procedural rather than an object oriented interface. |
|
Back to top |
|
 |
MrVMax |
Posted: Fri Aug 02, 2013 6:33 am Post subject: |
|
|
Novice
Joined: 01 Aug 2013 Posts: 23
|
Many thanks mqjeff this is the kind of information I needed to start. So I must think in my way (procedural) and I will be happy for this.
I interpret your note in this way: no need of other files to put in the lil user path because when the deploy action is started the broker check by itself the deploying message to verify if it is compatible with what is hardcoded inside the lil. A little rough approach ... just like old time And I wasted my time searching for whatever "new technologies" could have done to make the broker know of the properties
Many thanks to all other people anyway for their answers it seems to me that this is a very nice community ! |
|
Back to top |
|
 |
|