Skip to content
CMO & CTO
CMO & CTO

Closing the Bridge Between Marketing and Technology, By Luis Fernandez

  • Digital Experience
    • Experience Strategy
    • Experience-Driven Commerce
    • Multi-Channel Experience
    • Personalization & Targeting
    • SEO & Performance
    • User Journey & Behavior
  • Marketing Technologies
    • Analytics & Measurement
    • Content Management Systems
    • Customer Data Platforms
    • Digital Asset Management
    • Marketing Automation
    • MarTech Stack & Strategy
    • Technology Buying & ROI
  • Software Engineering
    • Software Engineering
    • Software Architecture
    • General Software
    • Development Practices
    • Productivity & Workflow
    • Code
    • Engineering Management
    • Business of Software
    • Code
    • Digital Transformation
    • Systems Thinking
    • Technical Implementation
  • About
CMO & CTO

Closing the Bridge Between Marketing and Technology, By Luis Fernandez

RPC versus REST in GWT: Tradeoffs

Posted on November 8, 2009 By Luis Fernandez

REST is everywhere in blog chatter, while many GWT teams still ship apps with classic RPC. If you are building a snappy front end on top of Java today, this choice shapes your server code and your day to day debugging.

GWT RPC feels like home for a Java shop. You write interfaces, share DTOs, click compile, and get type safe calls that feel like a method invoke across the wire. The client stub takes care of callbacks and serialization, so you move fast without juggling raw HTTP details. This is great for complex object graphs, custom serializers, and shared validation, since both sides speak the same language and you can refactor with your IDE without fear. The cost shows up when you need visibility at the wire level, because most calls end up as a POST with a custom payload that tools like curl or Firebug do not read easily. Version drift hurts too, as a mismatched serialization policy or a renamed field can break calls in a way that is hard to spot until production logs complain. You also give up easy browser caching since the payload is opaque and verbs are not used to signal intent.

REST in GWT means embracing GET, POST, PUT, and DELETE, plus predictable resource URLs and visible formats like JSON or XML. With RequestBuilder you can talk to endpoints that any script or device can read, and you can debug with your browser network panel, curl, or even a simple wget. Conditional requests with ETag or If-Modified-Since cut bandwidth and speed up repeat views, and shared proxies can cache results for free. You can stream small payloads, page results, and document your API with examples instead of generated stubs. The trade is that you now own mapping text payloads to client objects, usually with JavaScriptObject overlays or a JSON parser, and you need to watch the same origin policy since cross domain calls require JSONP or a tiny server proxy. Auth flows also change, since cookies and server sessions are easy with RPC, while token schemes and signed headers are more natural for REST.

So when should a GWT app pick one over the other. If you control both ends, have rich domain models, and want fast refactors with shared Java, GWT RPC is a sweet spot. It shines for internal tools, admin consoles, or apps where no one outside your team will ever call the service and where you want tight compile time help with every call. If your app needs public endpoints, mobile clients, or third party mashups, REST keeps you honest and portable, and it plays nicely with caches and proxies that already understand plain HTTP. It also helps with troubleshooting since a URL plus curl shows the whole story without custom viewers. A lot of teams mix both styles, with REST for resource reads and public tasks, and RPC for tricky write flows that rely on shared Java and rich validation, and that hybrid often lands the best uptime and the least surprise for everyone.

RPC feels like a straight shot to the database, but it can hide too much. Because many calls arrive as a POST with a blob payload, you skip the free stuff that HTTP gives you: idempotent reads, transparent caching, content negotiation, and intermediate proxies that make things faster for users who sit behind a corporate gateway. REST flips that, putting more on the client to parse and map, while the network and the browser do more for free. GWT helps with both paths today, but your choice affects build speed, test coverage, and how easy it is to stage and roll back. With RPC, a client and server must move together, or you risk serialization hiccups when only one side changes. With REST, you need to version your URLs or media types, keep response shapes steady, and be strict with error codes so the client knows what broke without a stack trace.

Let’s talk performance without buzzwords. RPC can be quick on the wire since the payload is compact and you can tune serializers, but it often defeats shared caches and turns every screen into a full round trip. REST can be just as quick when you cache smartly with ETag and only move diffs, and static resources near users help even more. Binary in RPC feels fast, yet parsing small JSON objects is plenty quick in today’s browsers and the win from conditional GETs can be huge. Tooling matters too, since Firebug, Chrome DevTools, and even simple server logs tell a lot more truth with REST than with a custom binary blob. And do not forget operations: tracing a single request through a proxy, a CDN, and a servlet is far kinder when each hop sees clear verbs and headers. Debug time is real life time, and clear wire formats cut the pain by half.

Pick the style that matches your audience and your runtime, then commit to it with clear rules.

Software Architecture Software Engineering

Post navigation

Previous post
Next post
  • Digital Experience (94)
    • Experience Strategy (19)
    • Experience-Driven Commerce (5)
    • Multi-Channel Experience (9)
    • Personalization & Targeting (21)
    • SEO & Performance (10)
  • Marketing Technologies (92)
    • Analytics & Measurement (14)
    • Content Management Systems (45)
    • Customer Data Platforms (4)
    • Digital Asset Management (8)
    • Marketing Automation (6)
    • MarTech Stack & Strategy (10)
    • Technology Buying & ROI (3)
  • Software Engineering (310)
    • Business of Software (20)
    • Code (30)
    • Development Practices (52)
    • Digital Transformation (21)
    • Engineering Management (25)
    • General Software (82)
    • Productivity & Workflow (30)
    • Software Architecture (85)
    • Technical Implementation (23)
  • 2025 (12)
  • 2024 (8)
  • 2023 (18)
  • 2022 (13)
  • 2021 (3)
  • 2020 (8)
  • 2019 (8)
  • 2018 (23)
  • 2017 (17)
  • 2016 (40)
  • 2015 (37)
  • 2014 (25)
  • 2013 (28)
  • 2012 (24)
  • 2011 (30)
  • 2010 (42)
  • 2009 (25)
  • 2008 (13)
  • 2007 (33)
  • 2006 (26)

Ab Testing Adobe Adobe Analytics Adobe Target AEM agile-methodologies Analytics architecture-patterns CDP CMS coding-practices content-marketing Content Supply Chain Conversion Optimization Core Web Vitals customer-education Customer Data Platform Customer Experience Customer Journey DAM Data Layer Data Unification documentation DXP Individualization java Martech metrics mobile-development Mobile First Multichannel Omnichannel Personalization product-strategy project-management Responsive Design Search Engine Optimization Segmentation seo spring Targeting Tracking user-experience User Journey web-development

©2025 CMO & CTO | WordPress Theme by SuperbThemes