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 9215627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:14:46+00:00 2026-06-18T02:14:46+00:00

I’m working on the client-side of a project with a large and complex server-side

  • 0

I’m working on the client-side of a project with a large and complex server-side component. The client will be deployed as an mobile app among other contexts.

For client-server communication, there are two opposing views:

  • Use REST
  • Use web sockets

Personally, I don’t mind which approach is taken so long as the resulting API is well thought out, understandable and extensible.

From experience with using TCP sockets before on a complex C++-based application, I know that roll-your-own syntax/protocols can quickly get inconsistent, confusing and difficult to manage.

Are there any general purpose styles or protocols, like REST or SOAP, for client-server communication using web sockets? Are there any guidelines or best practices on designing your own client-server communication scheme/protocol?

  • 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-18T02:14:47+00:00Added an answer on June 18, 2026 at 2:14 am

    Without any intended slight, Jesse, I’m going to answer my own question after some research.

    I didn’t come across any equivalents to REST. The current trend appears to be to use JSON to send and receive objects. That seems sensible in a JavaScript-orientated world and allows messages to immediately update data on receipt.

    For example:

    • https://developer.mozilla.org/en-US/docs/WebSockets/Writing_WebSocket_client_applications
    • http://blog.new-bamboo.co.uk/2010/2/10/json-event-based-convention-websockets

    I gave a stab at writing my own protocol along these lines. However, the most fully defined protocol along I came across is JSON-RPC. An additional plus about that protocol is that the same messaging system can be used over HTTP and WebSockets, should you be writing in a mixed-sockets and HTTP application.

    Another approach I came across was to “port” exiting messaging protocols to WebSockets (regardless of whether they use JSON or not). So, for example, XML-RPC (which JSON-RPC is based on) could be re-implemented fairly simply for use over sockets. Indeed, SOAP also could be re-implemented over sockets.

    A nice, small, protocol I came across though one of the above links was STOMP. That could also be ported – and indeed has.

    • 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'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.