Menu

#15 Marshalling/Unmarshalling API for C#

STAF V3.1.4
open
nobody
5
2007-03-26
2007-03-26
Yong Boon
No

STAF APIs are written to run in several language platform such as C/C++, Java, Python, Perl but not C sharp(.net Framework). This patch attempts to contribute data marshalling/unmarshalling API for C# language platform.

Included in the patch are the source codes for STAFMapClassDefinition.cs, STAFMarshallingContext.cs, STAFQueueMessage.cs and STAFException.cs. In addition, there is a TestProgram.cs that demostrates on the usage of these APIs.

Other APIs such as STAF registering and submitting of commands were already contributed by rohitkkumar. Please refer to
http://sourceforge.net/tracker/index.php?func=detail&aid=605064&group_id=33142&atid=407384

Discussion

  • Yong Boon

    Yong Boon - 2007-03-26

    Logged In: YES
    user_id=1718772
    Originator: YES

    Retrieve the attached file for minor changes. Sorry for any inconvience caused. I will post the file again at some later date.

     
  • Yong Boon

    Yong Boon - 2007-03-30

    Logged In: YES
    user_id=1718772
    Originator: YES

    Hi,
    Sorry for the delay. The C# Unmarshalling/marshalling API is up.
    File Added: STAF Marshalling and unmarshalling.zip

     
  • RND

    RND - 2007-04-03

    Logged In: YES
    user_id=1756219
    Originator: NO

    Hi i am new to STAF. I have some confusion about marshalling and unmarshalling.
    What i understand by this terms is
    Marshalling is serialising an object to enable it to pass across process boundaries efficiently (normally conversion to a byte stream). Unmarshalling is carried out in the other process to reconstruct the original object from the serialised version.
    But why do we need this. How can we use this with STAF.
    I am trying to implement it using C#.NET but at the moment i am not very clear with its functionality.
    Thanks

     
  • Charles Rankin

    Charles Rankin - 2007-04-03

    Logged In: YES
    user_id=279901
    Originator: NO

    staf_rnd, I'm not sure where your confusion really lies. You have the correct definition for (un)marshalling. STAF is inherently a multi-system multi-process environment. So, when you make a call to a STAF service and that service wants to return some structured content, there needs to be a mechanism where that can happen across process, system, and language boundaries. That mechanism is the STAF Marshalling APIs.

    In this patch, evangel55 was kind enough to provide these APIs for C#.

     
  • Rohit

    Rohit - 2007-04-04

    Logged In: YES
    user_id=1358616
    Originator: NO

    Hey, cool. I looked at the code its much neater than what I had implemented for the Unmarshall routine. Does it make sense to merge our two contributions into one?

     
  • Charles Rankin

    Charles Rankin - 2007-04-04

    Logged In: YES
    user_id=279901
    Originator: NO

    That's always a possibility. Why don't you append your version (along with the info indicated in the contributors guide) to this patch. When we integrate this patch, we can merge them appropriately.

     
  • Rohit

    Rohit - 2007-04-05

    Logged In: YES
    user_id=1358616
    Originator: NO

    I have removed my C# wrapper from the site where I was hosting it. Apparently, I need to get it cleared from legal before I can submit it. It should take a week's time.

     
  • Yong Boon

    Yong Boon - 2007-04-07

    Logged In: YES
    user_id=1718772
    Originator: YES

    Hi,
    Sorry for the late respond. Currently, I am out of office. Once I am back, I will discuss this with my superior about what you suggested. Thanks!

    YB

     
  • J Freyensee

    J Freyensee - 2007-08-31

    Logged In: YES
    user_id=1880230
    Originator: NO

    I work for a Fortune 500 company. According to our Legal department, this code breaks copyright laws because the distribution does not contain any license information. The license that this code is missing from source code to a readme file is the CPL. This code does fall under the CPL because is a a derived work from the base STAF work that can be downloaded from staf.sourceforge.net (in which the CPL license is clearly visible everywhere). The <copyright> tag in the file header is misleading because CREST, NYU does not own the rights to this work; the CPL does.

    There is a real easy fix to this code to make it compliant:
    1. Add the CPL license to the file comment header to every source file
    2. In the file comment header, say how the work has deviated from the base STAF work. In this case, the code is adding Marshalling/Unmarshalling code for C# for STAF.

    You can look at the file headers of what IBM has added to STAF code for examples.

    Anyways, my company prides itself on ethics. If you work for a company prides itself on ethics too, you should not use this code until the license documentation is added. But do what you feel...this is my 2 cents.

     
  • Yong Boon

    Yong Boon - 2007-09-03

    Logged In: YES
    user_id=1718772
    Originator: YES

    Sorry for the misleading information. I already removed the zip file for changes. Thanks for pointing out this.

     
  • Nikhil chinchwade

    I am looking for C# wrappers over STAF. Can anyone help me in this???
    Thanks in advane :)

     

Log in to post a comment.

MongoDB Logo MongoDB