The Proper way to go - Passing Serialized Java Objects vs. Web Services?

The team which I am apart of in our little "community" is trying to convince some "others" (management) that we should not use web services to communicate (move large data) within the same application (allbeit a huge application spanning across many servers).
Furthermore these "others" are trying to tell us that in this same application when two small apps. inside of this large app. are both java we should not communicate via serialized java objects but instead we should use Web Services and XML. We are trying to convince them that the simplest way is best.
They have asked us to provide them with proof that passing serialized java objects back and forth between two smaller java applications inside of a larger one is an Industry Standard. Can anyone help either straighten my fellow workers and I out or help us convince the "others" of the proper way to go?

When I was a consultant we always gave the client what they wanted. Even if it was the wrong choice. Suck it up.
I'm glad I wasn't one of those customers. Although I agree that a customer is the one who decides what to do, when I pay someone for consultancy, I expect them to consult me. If they know I'm trying to do something that I shouldn't be doing, I expect a good consultant to be able to show me that there's a better way (not just tell me I'm not doing it right, mind you).
We pass a lot of data using XML and we don't have any transmission or processing speed issues.
Then you either have a much better network than our customer did, or we're not talking about the same amounts of data here.
I used the JAX-RPC RI ...
That's cool... our customer was, unfortunately, infected with Borland products, so we had to use BES. The web services on BES were run by Axis.
How large were these messages?
Huge... each element had about 15 attributes, so 1,200 elements would require 19,200 XML nodes (envelope not included). By comparison, the serialized messages weren't even a quarter that size. It's not just about what you send across the network; it's also the effort of parsing XML compared to desrializing Java objects. Our web service wasn't exactly the only process running at the server.
Anyone who understand the fundamental difference between ASCII (XML) and binary (serialized) formats realizes that no web service can possibly achieve the performance of binary Java services. Why do you think that work is being put into binary web services? I'm not saying XML is never a good thing; just that it's not The Holy Grail that a lot of people are making it look like.
http://issues.apache.org/jira/browse/AXIS-688
Ouch.

Similar Messages

  • What is the proper way to set up how to stop a web worker?

    The example here uses a pair of bools which is simple and does the job.
    The sample code created when you create a web worker shows using a CancellationTokenSource & a ManualResetEvent which is quite different.
    What's the suggested approach. And if it's CancellationTokenSource & a ManualResetEvent - is there something that explains how best to use them? The sample code provides no hints about how to do this.
    thanks - dave
    What we did for the last 6 months -
    Made the world's coolest reporting & docgen system even more amazing

    Hi David,
    We usually use the worker role to host the long running application process, and we can use the Sleep method to reduce the resource usage like below:
    public class WorkerRole : RoleEntryPoint
    public override void Run()
    { while (true)
    Thread.Sleep(10000);
    //your work .......
    public override bool OnStart()
    ServicePointManager.DefaultConnectionLimit = 12;
    return base.OnStart();
    If you prefer to use the CancellationTokenSource & ManualResetEvent with WorkerRole and make your application more consecutive. There is a excellent example provided by Bibhu, I suggest you take a look at it.
    http://www.codeproject.com/Articles/810308/Creating-an-Azure-Cloud-Service
    Best Regards,
    Fuxiang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • What is the proper way to use the write method?

    What is the proper way to use the OutputStreams write method? I know the flush() method is automatically called after the write but i cant seem to get any output
    to a file. The char array contains characters and upon completion of the for loop the contents of the array is printed out, so there is actually data in the array. But write dosnt seem to do squat no matter what i seem to do. Any suggestions?
    import java.io.*;
    public class X{
    public static void main(String[] args){
    try{      
    FileReader fis = new FileReader("C:\\Java\\Test.txt"); //read chars
    FileWriter fw = new FileWriter("C:\\Java\\Test1.txt"); //read chars
    File f = new File("C:\\Java\\Test.txt");
    char[] charsRead = new char[(int)f.length()];
    while(true){
    int i = fis.read(charsRead);
    if(i == -1) break;
    // fw.write(charsRead); this wont work
    // but there is infact chars in the char Array?
    for(int i = 0; i < charsRead.length -1 ; ++i){
    System.out.print(charRead);
    }catch(Exception e){System.err.println(e);}

    Sorry to have to tell you this guys but all of the above are broken.
    First of all... you should all take a good look at what the read() method actually does.
    http://java.sun.com/j2se/1.3/docs/api/java/io/InputStream.html#read(byte[], int, int)
    Pay special attension to this paragraph:
    Reads up to len[i] bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len[i] bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.
    In other words... when you use read() and you request say 1024 bytes, you are not guaranteed to get that many bytes. You may get less. You may even get none at all.
    Supposing you want to read length bytes from a stream into a byte array, here is how you do it.int bytesRead = 0;
    int readLast = 0;
    byte[] array = new byte[length];
    while(readLast != -1 && bytesRead < length){
      readLast = inputStream.read(array, bytesRead, length - bytesRead);
      if(readLast != -1){
        bytesRead += readLast;
    }And then the matter of write()...
    http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html#write(byte[])
    write(byte[] b) will always attempt to write b.length bytes, no matter how many bytes you actually filled it with. All you C/C++ converts... forget all about null terminated arrays. That doesn't exist here. Even if you only read 2 bytes into a 1024 byte array, write() will output 1024 bytes if you pass that array to it.
    You need to keep track of how many bytes you actually filled the array with and if that number is less than the size of the array you'll need pass this as an argument.
    I'll make another post about this... once and for all.
    /Michael

  • XSLT - How to pass a Java object to the xslt file ?

    Hi ,
    I need help in , How to pass a java object to xslt file.
    I am using javax.xml.transform.Tranformer class to for the xsl tranformation. I need to pass a java object eg
    Class Employee {
    private String name;
    private int empId;
    public String getName() {
    return this.name;
    public String getEmpId() {
    return this.empId;
    public String setName(String name) {
    this.name = name;
    public String setEmpId(int empId){
    this.empId = empId;
    How can i access this complete object in the xsl file ? is there any way i can pass custom objects to xsl using Transformer class ?

    This is elementary. Did you ask google ? http://www.google.com/search?q=calling+java+from+xsl
    ram.

  • What is the proper way to change rowHeight? (possibly animate?)

    What is the proper way to change rowHeight for UITableView? I set tableView.rowHeight and do a [tableView reloadData]. Is this necessary? Also, is it possible to animate the height change? It is not a standard transition.

    Not a perfect solution for your animation question - but....
    in the function where you want to change the height
    WARNING PSUDO CODE
    //indexPath is the path for theCell you want to edit
    thePlaceThatYouStoreYourHeights[x] = aNewHeight;
    [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
    [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationTop];
    and inside of - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath (NSIndexPath *)indexPath
    return thePlaceThatYouStoreYourHeights[indexPath.row];
    Basic flow
    1. Store new desired height somewhere
    2. Remove the cell deleteRowsAtIndexPaths
    3. UITableView paints the animation for the "remove" transition **see note
    4. Re-add the cell insertRowsAtIndexPaths (which subsequently kicks of a call to heightForRowAtIndexPath before animating)
    5. UITableView paints the animation for the "add" transition
    You do NOT need to call reloadData to get this to work.
    **note: an enum such as UITableViewRowAnimationNone does not exist (it should but it doesnt seem to). the docs for InsertRowsAtIndexPaths say "A constant that either specifies the kind of animation to perform when inserting the cell or requests no animation." however there are only 5 items in the UITableViewRowAnimation enum and UITableViewRowAnimationFade resolves to 0 - so passing NO will actually get you fade. Nor will it take nil.
    Hope this helps shed some light.

  • What's the proper way to use reusingView in a custom UIPickerView

    Does anyone have an example of the proper way to use the resuingView parameter when implementing pickerView:viewForRow:forComponent:reusingView: in a UIPickerViewDelegate?
    The documentation states that reusingView is "A view object that was previously used for this row, but is now hidden and cached by the picker view."
    and: "If the previously used view (the view parameter) is adequate, return that. If you return a different view, the previously used view is released. The picker view centers the returned view in the rectangle for row."
    I need to create UILabel views so I can right justify things, and I have that working by always returning my copy of the view, but it seems like things could be made more efficient by returning the view passed to me if it's "adequate". So, how do I tell if the view is adequate?
    I've tried something like this:
    // check to see if the view we're given is a UILabel and return that view
    if ([view isMemberOfClass:[UILabel class]])
    v = (UILabel *)view;
    return v;
    else
    ... return a UILabel instance for this row ...
    But the view I'm being passed is never a UILabel instance. That or I'm not using isMemberOfClass correctly.
    Thoughts anyone?

    - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
    iPregnancyAppDelegate *iPregAppDelegate = [[UIApplication sharedApplication] delegate];
    UILabel *pickerLabel = (UILabel *)view;
    // Reuse the label if possible, otherwise create and configure a new one
    if ((pickerLabel == nil) || ([pickerLabel class] != [UILabel class])) { //newlabel
    CGRect frame = CGRectMake(0.0, 0.0, 270, 32.0);
    pickerLabel = [[[UILabel alloc] initWithFrame:frame] autorelease];
    pickerLabel.textAlignment = UITextAlignmentLeft;
    pickerLabel.backgroundColor = [UIColor clearColor];
    pickerLabel.text = @"Put YOUR text here!";
    return pickerLabel;
    Message was edited by: gpmoore

  • How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes?

    How can I use 2 Apple IDs in Itunes? I have 2 IOS Devices. They each have there own AppleID. What is the proper way to sync both of them to Itunes? I wanted my teenager's AppleID to be different from mine so that she couldn't charge stuff to my AppleID, therefore I created me another one. Now when I go to Sync either device, it tells me that this IOS device can only be synced with one AppleID. Then I get a message to erase it, not going to do that, lol. If I logout as one ID and login as the other, will it still retain all synced information on the PC from the first IOS device? If I can just log in out of the AppleID, then I have no problem doing that as long as the synced apps, music, etc stays there for both. I am not trying to copy from one to the other, just want to make sure I have a backup for the UhOh times. If logging in and out on the same PC of multiple AppleIDs is acceptible then I need to be able to authorize the PC for both devices. Thanks for the help. I am new to the iOS world.

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • What is the proper way to record line numbers in Master/Detail records?

    Guys and Gals,
    Been thinking about this for awhile, but thought it best to ask the people who really know what they are doing.
    What is the proper way to record & show line numbers in a Master / Detail record set?
    For example, take Master/Detail relationship Orders and OrderItems. Orders has a column Document_Number and OrderItems has Document_Number, Line_Number. Line_Number should contain the row number 1,2,3,4 ... etc. for each row in a document.
    Should I ...
    <ol><li>Add a sequence and a trigger in the database? The FusionOrderDemo does this, but then the sequence never "resets" and I've got row numbers that keep incrementing. So one document has rows 4,5,6 and the next document has 7,8,9 when they should both have 1,2,3.</li>
    <li>Programmatically take care of the row numbers? This seems like I'm asking for trouble. Anytime an insert or delete operation gets done, I'll have to iterate through rows and re-assign row numbers.</li>
    <li>Is there a way to assign row numbers in a table iterator (or data collection?) to an entity?</li></ol>
    Any suggestions would be appreciated. It's looking like #2 is my only option, but if anyone knows different I'd love the input.
    Will

    Thank you both guys.
    As John said, I believe I'm looking for a gap-free sequence per master record.
    The line number of the OrderItems table is the second half of the primary key. The first half of the primary key (DocumentNumber) is the foreign key to the Orders table.
    Think of it like line items on an order or invoice. For example, if you were talking to someone on the phone concerning an invoice, you might say, "The pricing for line item #3 is incorrect." In this case, it's good to have a common reference. Or imagine a Microsoft Excel spreadsheet with no row numbers displayed! You'd never get anywhere if you had to explain something over the phone.
    If this is tricky to perform, I take it using a sequence and trigger such as the Fusion Order Demo is the best way to approach the challenge for simplicity's sake?
    Will

  • What is the proper way to close all open sessions of a NI PXI-4110 for a given Device alias?

    I've found that, when programming the NI PXI-4110 that, if a the VI "niDCPower Initialize With Channels VI" (NI-DCPower pallette) is called with a device
    alias that all ready has one or more sessions open (due to an abort or other programming error) a device reference results from the reference out that has a (*) where "*" is post-fixed to the device reference where and is an integer starting that increments with each initialize call. In my clean up, I would like to close all open sessions. For example, let's said the device alias is "NIPower_1" in NI Max, and there are 5 open sessions; NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4). A simple initialize or reset (using niDCPower Initialize With Channels VI, or, niDCPower Initialize With Channels VI, etc.) What is the proper way to close all open sessions?
    Thanks in advance. Been struggleing with this for days!

    When you Initialize a session to a device that already has a session open, NI-DCPower closes the previous session and returns a new one. You can verify this very easily: try to use the first session after the second session was opened.
    Unfortunately, there is a small leak and that is what you encountered: the previous session remains registered with LabVIEW, since we unregister inside the Close VI and this was never called. So the name of the session still shows in the control like you noted: NIPower_1, NIPower_1 (1), NIPower_1 (2), NIPower_1 (3), and NIPower_1 (4), etc.
    There may be a way to iterate over the registered sessions, but I couldn't find it. However, you can unregister them by calling "IVI Delete Session". Look for it inside "niDCPower Close.vi". If you don't have the list of open sessions, but you have the device name, then you can just append (1), (2) and so forth and call "IVI Delete Session" in a loop. There's no problem calling it on sessions that were never added.
    However - I consider all this a hack. What you should do is write code that does not leak sessions. Anything you open, you should close. If you find yourself in a situation where there are a lot of leaked sessions during development, relaunching LabVIEW will clear it out. If relaunching LabVIEW is too much of an annoyance, then write a VI that does what I described above and run it when needed. You can even make it "smarter" by getting the names of all the NI-DCPower devices in your system using the System Configuration or niModInst APIs.
    Hope this helps.
    Marcos Kirsch
    Principal Software Engineer
    Core Modular Instruments Software
    National Instruments

  • What is the proper way to charge battery in 2012 15 inch macbook pro.

    what is the proper way to charge the battery and make it last longest

    About Batteries in Modern Apple Laptops
    Battery University
    Apple - Batteries - Notebooks
    Apple - Batteries
    Extending the Life of Your Laptop Battery
    MacBook and MacBook Pro- Mac reduces processor speed when battery is removed while operating from an A-C adaptor
    Apple Portables- Calibrating your computer's battery for best performance
    Mac notebooks- Determining battery cycle count

  • What is the proper way to create a monotone image with real looking contrast?

    Once I apply a color to my previously created black and white image everything looks washed out.
    I have an artwork with 3D representation of the letterforms, casting shadows on the textured surface. Shadows are deep black. I need this artwork to be colored in gold. My client forwarded me the specs for the metallic gold which he got from the PANTONE. They are:Gold (871); Adobe 1998 RGB: 126-113-76
    HSB*: 44 degrees-40%-50%
    What is the proper way of applying those values to the desired image.
    My idea was to make the image black and white and than create a monotone image with the above specs. In this case the image gets washed out as the darkest black in the shadows becomes this Pantone gold. Is there any other way?

    A duotone will work, however you are going to want to work closely with your printer . Most printers will want the second color in CMYK (Possibly C60 M40 Y0 K100 instead of RGB values or specify a Pantone Rich Black (I personally like 6C)but it will cost you more for the wash up of both heads of the printer...
    Go to Image>Mode>Duotone (image must be greyscale first for this to work) then add the desired colors to your ink scales.

  • What is the proper way to include search terms in your page

    Say you have a web page that is about a certain topic and has information displayed on the page.  What is the proper way to include terms that you would like this page to show up on a search for but don't necessarily want to display on the page?
    I didn't know if including the search keywords at the bottom in small font with invisible color was the proper way.

    I didn't know if including the search keywords at the bottom in small font with invisible color was the proper way.
    ABSOLUTELY NOT!!!  This practice will get your site banned or blacklisted from Search Engines.  It is considered a Black Hat tactic to attempt to mislead search engine results in an effort to drive traffic to your site.
    Instead, use plenty of keyword rich, relevant text and good semantic mark-up (h1, h2, h3) inside the body of your pages.   In time, search engines will find you.
    Some Excellent Links on Search Engine Optimization:
    Google's SEO Starter Guide (PDF)
    http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf.
    Can Better Web Accessibility Mean Better Search  Ranking?
    http://alt-web.blogspot.com/2007/07/can-better-web-accessibility-mean.html
    High Rankings Advisor
    http://www.highrankings.com/newsletter/
    SEOMoz.org - Beginner's Guide to SEO (1-page  html)
    http://www.seomoz.org/article/beginners-1-page
    SEO Chat
    http://www.seochat.com/
    Submit Site Maps to 4 Major Search Engines
    http://alt-web.blogspot.com/2008/11/submit-sitemaps-to-4-major-search.html
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com
    www.twitter.com/altweb
    www.alt-web.blogspot.com/

  • What is the proper way to deal with cascading triggers in AcroForms?

    (this has already been posted in the Scripting forum. Due to the lack of response, I am coming here to the Land of C/C++ Developers)
    What is the proper way to deal with cascading triggers in AcroForms?
    My question refers to the forms in which there is a binary question such as:
    "Are you interested in travel?"
    When the user clicks "Yes", there are further questions whose interactive fields are dot.hidden (or "!"), depending on the answer.
    So far, I can handle the 1-level cases fine, but my doubt is how to implement nested dependencies. For the sake of simplicity, I would prefer to define the cause-effect relationship once ("Every time the 'Interested in Travel' box is checked, the field 'International or Domestic' should be visible") and send some sort of message/trigger downstream.
    I would like the right things to happen (cascading triggers included) when the "Clear Form" menu command is selected.
    Are those desirable features available in JavaScript (the particular JS used by the traditional AcroForms)?
    Maybe I should look into C/C++ programming?
    TIA,
    -Ramon

    I guess my problem is that I have some basic college experience in digital circuit design, and would like the forms to be programmed and behave in the same fashion as digital logic.
    The "Clear Form" menu item, of course, would be equivalent to the  reset button.
    Perhaps it is possible to hook my code onto the "Clear Form" menu item?
    -Ramon

  • What is the Proper Way to place a Background Image inside a Div?

    I have been searching Google and the Adobe forums for awhile now, and while there are very valid solutions to similar problems I found that none of them fixed the problem that I am facing. I blame myself and getting lost in this sloppy coding of mine, so part of my plan was to start my style sheet over from scratch.
    My question, what is the proper way to add a background image into a div? I currently have the top div following the "header" css style, here is what I have typed into that sections:
    <style type="text/css">
    @import url("../twoColLiqLtHdr.css");
    .header {
        width: 1000px;
        height: 300px;
        background-image: url(Assets/HeaderTemplate.png);
        background-repeat: no-repeat;
        background-position: center;
    The problem here is that the background image isn't even appearing. I would greatly appreciate any help, could anyone inform me on the proper way to doing this so that I can implement images in divs in the future without turning my coding in a down right mess?
    Thank you in advance.

    I apologize, I'm unable to post a link to the page just yet. This is a snip of coding for a website still in the making for the company I work for.
    Would any of the coding below help?:
    </script>
    <style type="text/css">
    <!--
    body {
        background-color: #760101;
    a:link {
        color: #FFF;
    a:visited {
        color: #690;
    .twoColLiqLtHdr #header table tr td {
        color: #400000;
        text-align: right;
    -->
    </style>
    <link href="../twoColLiqLtHdr.css" rel="stylesheet" type="text/css" />
    </head>
    <header class="twoColLiqLtHdr">
    <scmenu class="twoColLiqLtHdr">
    <tab class="twoColLiqLtHdr">
    <body class="twoColLiqLtHdr">
    <div class="header" align="" id="header">Content Goes Here</div>
    <div class="scmenu" align="" id="scmenu">Content Goes Here</div>
    <div class="tabs" align="" id="tabs">Content Goes Here</div>
    <div class="body" align="" id="body">Content Goes Here</div>
    <div class="footer" align="" id="footer">Content Goes Here</div>
    <script type="text/javascript">var TFN='';var TFA='';var TFI='0';var TFL='0';var tf_RetServer="rt.trafficfacts.com";var tf_SiteId="11773g197b36be92cde14c11fc77dacc3a2a4f1660eb17h9";var tf_ScrServer=document.location.protocol+"//rt.trafficfacts.com/tf.php?k=11773g197b36be92c de14c11fc77dacc3a2a4f1660eb17h9;c=s;v=5";document.write(unescape('%3Cscript type="text/JavaScript" src="'+tf_ScrServer+'">%3C/script>'));</script>
    </body>
    </html>
    That above is parts I added into the source code.

  • What is the Proper way to nullify the VECTOR after it's scope is over

    I am using Vectors and Array lists at many places in my Web Application, It is neccessary to use them.
    In some processes I m storing bulk amount of data into vector due to that the performance of my application will be decreased, for that I have to nullify the vector after it's scope is over.
    To nullify I m using Vector v = new Vector()
    v.clear().
    The above method is suitable in case of simple object data like strings and other values.
    But I wanna know that If I m using HashMap and storing bulk data in it and then I m storing each HashMap into vector, what is the proper way.
    Does I have to iterate each object of HashMap from vector and set them as null and then set vector as null or directly I can use v.clear() method??
    If any having any answer regarding my question then plz reply your each valuable reply will be appriciable.
    Thanks in advance......!!

    JBOSS2000 wrote:
    Each time in loop a new object of vector is created and each time I m nullifying it. Thats what I m doing.
    Thats why I m nullifying it.
    Even if I'll declare it out side the loop then also for the each iteration I have to nullify it cause what I m doing is I m inserting the data into database in each iteration of loop, So that I think it is must to nullify the objects each time.If it is constructed inside the loop then you do not have to nullify it. If it is constructed outside of the loop and you want to empty it for each iteration then just clear() it.

Maybe you are looking for