Here is my system architecture of data flow for creating a record.
Clients ====> RabbitMQ ====> (RESTful service, also listens RabbitMq)
However, the clients can also directly access the RESTful service by REST endpoints for fetching a record.
In order to uniquely identify a record, the client sends the "CorrelationId" (an UUID/GUID). Since clients generate GUIDs, can clients use the same GUID as a resource identifier to access resources from the RESTful service?
Example: http://MyApi/Resource/GUID
I know, GUID is 32 character long for an identifier. It's bit strange, apart from that do you see any RESTful design pattern violation?
Please suggest me the recommended approach.
Thanks, Pandiarajan
There is no issue with allowing a GUID as a unique identifier for a resource. REST says nothing about what a URI should look like. There are some tradeoffs (less human-readable, more secure), but nothing strongly compelling in most cases. So sure, if it's the right thing for you to do, do it.