#1 2015-09-09 10:06:12

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Versioning of SOA Interface

Developing a little app we came to a point where there should be a "general" Direction or help how to deal with it:

let me explain:

1. We made a interface

IMyInterface = interface(IInvokable)
..
  function DoReturnSomething(const AParam1 : RawUtf8) : RResultRec;
end;

2. We put it in Production an deployed an app which uses this Interface with Crossplatform
3. After a while we have to change DoReturnSomething to

..
  function DoReturnSomething(const AParam1 : RawUtf8) : RMyNewResultRec;

as result the interface is newer and all Deployed apps can not access it any more. Thats correct because it is not the same interface.
This is persisted in fContractExpected.

4. currently after deploying a app we never should change a Interface !

Do you think it is the best way simply to write a IMyInterfaceV2 / IMyInterfaceV3 for updates to the App or can you imagine a better way ?


Rad Studio 12.1 Santorini

Offline

#2 2015-09-09 10:39:35

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,663
Website

Re: Versioning of SOA Interface

I guess this is linked to this feature request:
http://synopse.info/fossil/tktview?name=1d6bcf6b12

Up to now, there is no option but define a new IInterface type for each version, if you want to MODIFY a method signature.

If you are sure that you are just ADDING methods to an existing interface, you could force the expected contract by setting a fixed string.
It would work, if the server is always updated, but older clients remain available.
Of course, the new methods won't be available from the older clients, which do not know anything about them.

Offline

Board footer

Powered by FluxBB