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

  • Home
  • SEARCH
  • 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 7853971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:52:33+00:00 2026-06-02T19:52:33+00:00

I’m currently reworking a somewhat extensive communications protocol into something easier to work with,

  • 0

I’m currently reworking a somewhat extensive communications protocol into something easier to work with, and this is kind of an opinionated question, but based on your experiences, which of these two ideas is easier to maintain as code grows larger and larger.

There’s a client and a server. The server has pieces of information the client might want, A, B, C, D, etc. A piece of information isn’t a single set of data, like a name, but rather a list of names. Generally the entire contents of a column. The client will generally want this stuff in groups, like ABC, DEF, ABD, etc. There isn’t a ton of overlap (meaning, generally 80% of the requests for A are also requests for B and C).

As the system grows larger is it easier to maintain a system where the communication protocol works like:

Request 1: Server returns ABC
Request 2: Server returns ABD

or

Request 1: A
Request 2: B
Request 3: C

etc

I’m inclined to go with the first one because it seems to make the code a bit easier to read and work with, and having special requests for groups, like ABC, can often let the server run fewer queries on its database to get the information needed. But the code base is going to get significantly larger than it is right now, and since I’m already taking the time to overhaul how the client and server are communicating, I wanted to hear some experiences people here have had with either/or method.

Edit:
Note that I’m not just talking about network traffic, but also things like how the server will handle these requests. If the client makes three individual requests, the server will have to make three DB queries, where as the grouped request could be most likely run as a single query.

  • 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-02T19:52:36+00:00Added an answer on June 2, 2026 at 7:52 pm

    I think this is a case of ‘premature optimisation’.

    1. You don’t know if there’s actually going to be a performance issue.
    2. You’re going for what you state is more complex code for a perceived performance issue.
    3. In reality, the second option may well performance worse (consider which is heavier – accepting a connection and processing a request, or sending out a slightly longer response)?

    Now, you are more likely to find that any bottlenecks or performance issues may be related to where you look this information up (say, in a database). In which case, you can tune for performance on that end without affecting your protocol (for example, you can cache the values returned by the DB).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
For some reason, after submitting a string like this Jack’s Spindle from a text
I want use html5's new tag to play a wav file (currently only supported
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

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.