Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 371252

Summary: [Protocol] Use JSON arrays for operations
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: tbuschto
Version: 1.5   
Target Milestone: 1.5 M6   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
client changes
none
server changes none

Description Ralf Sternberg CLA 2012-02-10 11:03:22 EST
This change has been proposed and discussed on the rap-dev mailing list [1]. The idea is to represent protocol operations as JSON arrays instead of objects in order to make the protocol less verbose. This would change the definition of the operations to:

<CreateOperation> ::= [ "create", <TargetId>, <TypeName>, <IntitialProperties>? ]
<SetOperation> ::= [ "set", <TargetId>, <Properties> ]
<CallOperation> ::= [ "call", <TargetId>, <MethodName>, <Parameters> ]
<ListenOperation> ::= [ "listen", <TargetId>, <Properties> ]
<DestroyOperation> ::= [ "destroy", <TargetId> ]

[1] http://dev.eclipse.org/mhonarc/lists/rap-dev/msg00805.html
Comment 1 Tim Buschtoens CLA 2012-02-29 08:29:10 EST
Created attachment 211793 [details]
client changes

These are the necessary changes for the web client.
Comment 2 Ralf Sternberg CLA 2012-02-29 15:51:32 EST
Created attachment 211841 [details]
server changes

Attached a patch with the server-side change I've used for my evaluation. Does not include changes to unit tests and possible cleanup.
Comment 3 Tim Buschtoens CLA 2012-03-02 06:15:56 EST
Applied both patches to CVS HEAD, and updated tests/fixture.
The client still provides the old "processOperation" API that is used by most client tests and (currently) clientscripting. The tests should be updated bit-by-bit until we can remove it.