#1 2012-02-26 00:30:16

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

Interface-based service implementations in the final stage

Server-side implementation sounds finished and powerful.
Simple provided regression tests passed with success - beware: some nice code within this commit, in order to call an interface from and to JSON encoded remote requests!
See http://synopse.info/fossil/info/6b39ccefe8

Client-side implementation of remote Interface access now is able to create "fake" classes in order to emulate native interfaces - the stubbing code (i.e. asm generated on the fly) is IMHO simple and working great...
See http://synopse.info/fossil/info/be458e5fb5

I'm some kind of proud of those two commits.
This implementation  can be proudly compared to Embarcadero's Rio or Rtti unreadable units.
Tested with Delphi 6 up to XE2 (32 bit specific code by now).
Stay tuned!
smile

Offline

#2 2012-02-26 18:30:40

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

Re: Interface-based service implementations in the final stage

That's it: our mORMot framework now implements Client-Server service implementation using regular Delphi interfaces (and a JSON-RPC like protocol).

Client side serialization has been implemented, and general service code reviewed.

Our testings passed successfully - need feedback from you!

See http://synopse.info/fossil/info/86107183864f

I'll write some the associated documentation, and I think this will definitively be worth a blog article.
In short: a true Open Source light and powerful alternative to DataSnap - with some nice features comparable to WCF.
From Delphi 6 up to XE2 - even the "Starter" editions.

Offline

#3 2012-02-29 17:15:03

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

Re: Interface-based service implementations in the final stage

A lot of work has been done on the interface-based service implementation.
This sounds just working with any kind of handled data, supporting serialization of objects or records.
Tests have been written and run, and shall cover most of the features implemented (including interface inheritance and most kind of parameters - yes you can pass parameters by reference to methods, i.e. you can use "var" or "out" kind of parameters for all supported kind of data).
See http://synopse.info/fossil/info/d0135ee1d6

Performance is very good.
There is no big impact to serialize and use our "fake" implementation classes on the client, and unserialize and run the real implementation class on the server. A lot of our JSON-related code has been reused here.
In all cases, our implementation pattern is much lighter than DataSnap's or SOAP "official" implementation. For instance, it does not create the code stub and VTable array for each instance, but re-use the existing one.

And IMHO the code implementing the low-level assembler part (i.e. the "fake" implementation classes created on the fly on the client side) is much more readable than the one from Borland/Embarcadero.
See in SQLite3Commons.pas:
- TServiceFactoryServer.ExecuteMethod + TServiceMethod.InternalExecute on the server side;
- and TInterfacedObjectFake.FakeCall + TServiceFactoryClient.Create methods on the client side.

Since we based our SOA architecture over interfaces (using them just like WCF "contracts"), I think we implemented an unique feature in the Delphi world.
It will work from Delphi 6 up to XE2.

More to come!
(the documentation will be updated, and some blog articles published soon)

And the release of revision 1.16 is closer than ever.
smile

Offline

Board footer

Powered by FluxBB