main website home
  • About this blog

    This blog features updates, opinions, and technical notes from Caucho engineers about Caucho products, the enterprise Java industry, and PHP. Caucho Technology is the creator of the Resin Application Server and the Quercus PHP in Java engine. A leader in Java performance since 1998, Caucho is a Sun JavaEE licensee with over 9000 customers worldwide.
  • Tags

    ajaxworld bam candi cdi cloud cluster comet configuration deploy devoxx eclipse ejb embedded flash flex google app engine hessian hmtp ioc java ee 6 javaone javazone jms messaging newsletter nyjug osgi php pomegranate quercus resin resin 4.0 REST servlet sfjug silicon valley code camp spring testing training tssjs watchdog webbeans web profile websockets wordpress
  • Meta

    • Register
    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
« TSSJS 2011 Round-Up
Health Check System Enhancements »

JSON for WebSockets

As WebSockets gets closer to a final draft, the real question becomes: how should applications use it? While JSON is an obvious payload format, sending plain JSON payloads just doesn’t have enough structure for any non-demo application. I’m putting together a JSMP (JSON Message Protocol) rough draft, as a suggested JSON pattern for WebSockets.

JMTP is based on our experience with clustering in Resin for the last two years. While we use Hessian instead of JSON for the payload, the architecture and issues are the same.

  • typed messages: basically object-oriented messages. Any significant application will have several message types, and using an object-oriented
    type is a clean way to dispatch.
  • unidirectional messages and rpc queries: both styles are needed, and queries require a bit of protocol effort and definition to get right.
  • addressing: larger applications should be decomposed into smaller services. With addressing, that architecture is trivial.

This entry was posted on Thursday, April 7th, 2011 at 10:23 am and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.


Caucho Technology is proudly powered by WordPress and Quercus®
Entries (RSS) and Comments (RSS).

  • HOME |
  • CONTACT US |
  • DOCUMENTATION |
  • BLOG |
  • WIKI 4 |
  • WIKI 3 |
  • Resin: Java Application Server
Copyright (c) 1998-2012 Caucho Technology, Inc. All rights reserved.
caucho® , resin® and quercus® are registered trademarks of Caucho Technology, Inc.
resin® is a cloud optimized, java® application server that supports the java ee webprofile ®