Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7717609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:56:42+00:00 2026-06-01T02:56:42+00:00

I have to send a large amount of xml data through sockets. Example of

  • 0

I have to send a large amount of xml data through sockets.
Example of xml file (server side generates such a file):

<message>
 <data>
  <param1>12345</param1>
  <param2>234</param2>
 </data>
...
 <data>
  <param1>321</param1>
  <param2>34234</param2>
 </data>
</message>

And then client receive such data.
Client have to parse this file and insert parameters to db.

Client receives this data by parts (size of byte):

byte[] receivedData = new byte[1024];
int receivedBytesLen = streamFromServer.read(receivedData);

How can I process this data?

  1. For example, if I read all the file data to the variable on the client side and then process. I think it’s not good – may be problems (large amount of data).
  2. Write all data to the temp file and then to process? Create file, delete…
  3. Read and process in the same time. But the xml is not full.
  4. Something else?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:56:43+00:00Added an answer on June 1, 2026 at 2:56 am

    A few years ago, I developed a solution for a broadcaster who was using a sports wire service that worked EXACTLY this way.

    A few tips from them:

    1. Make sure every message has a unique identifier. It can be something as simple as a guid attribute in the document element.
    2. Transmit the messages multiple times (unless this is a point-to-point and you have an acknowledgement built into your solution). The client should maintain a hashtable of successfully processed messages’ unique identifiers, and disregard duplicates it has already handled.
    3. Keep your messages small. Do you really need all the “data” nodes to be in one message? Can you not send them as individual messages?
    4. Separate your messages with a non-viable XML character. CR’s and LF’s won’t work. This service used {0x02} bytes to separate messages. Use that on the client side to find the separation points between XML documents.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app i have to send a xml data as request, I am
Hi I want to send a fixed amount of data (say 5MB) from server
I have a large amount of data files to process and to be stored
I have finally got my Delphi application to send data using direct sockets with
A friend and I have been discussing what's the best way to send large
I have a client that wants to send a large number of SOAP Header
After user places an order I have to send detailed email message containing order
In my project there are situations where we have to send xml messages (as
We have a fairly intensive Drupal installation running on a large EC2 server instance.
I need to pull a large amount of data from various tables across a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.