NamoRamana 3 Posted July 30, 2019 Newbie here.. We have a lot of COM+ server components ( > 30 COM dlls developed in Delphi 2006) in the present system. We are evaluating to convert them in Delphi Rio based some REST server, preferably keeping the endpoint signatures the same (to make minimum changes in a huge delphi client application). It will be a huge undertaking, apart from unicode etc related conversion (64-bit conversion will be the next step; after successful 32bit upgrade). I was wondering if MARS can ease this server migration? - in MARS, can I install multiple resources under the same server ? Idea here is that, each com server dll will act as own resource and its public methods will be the endpoints. For the better code management, is it possible to keep each resource code in its separate delphi project? how complex will be the installation of the REST server and these multiple resources, if we host them in IIS? - in current COM servers, Many of the method calls make heavy use of OleVarients as input and output paramas. Is there anything in MARS/REST that can keep those method signature same ? - in current COM env, we see some heavily used components slow down the end-user response a lot (sometimes, we have to reboot the host server). Do you think, MARS based REST service can handle a lots requests to a resource(I don't have request numbers)? Sorry for the lot of heavy questions. Your response/strategy/recommendation to tackle this upgrade will be helpful. Thank you :). Share this post Link to post
stijnsanders 37 Posted July 30, 2019 I would respectfully request you to have a look at an alternative web platform I've been working on: https://github.com/stijnsanders/xxm It's not really designed to do REST endpoints, but all of the worker threads are COM enabled and also the main interface to generically connect all of the things any HTTP server environment offers is a COM interface. If I understand correctly, mapping each request to and from the different COM objects and their methods should be set up. This could be quite a manual task, or in the best case partially generated from scripts based on the IDL, but for a public facing HTTP endpoint it's important to do input sanitation and other security measures. Share this post Link to post
Andrea Magni 75 Posted August 14, 2019 On 7/30/2019 at 11:18 PM, NamoRamana said: I was wondering if MARS can ease this server migration? - in MARS, can I install multiple resources under the same server ? Idea here is that, each com server dll will act as own resource and its public methods will be the endpoints. For the better code management, is it possible to keep each resource code in its separate delphi project? how complex will be the installation of the REST server and these multiple resources, if we host them in IIS? - in current COM servers, Many of the method calls make heavy use of OleVarients as input and output paramas. Is there anything in MARS/REST that can keep those method signature same ? - in current COM env, we see some heavily used components slow down the end-user response a lot (sometimes, we have to reboot the host server). Do you think, MARS based REST service can handle a lots requests to a resource(I don't have request numbers)? Hi, welcome to this forum and to MARS. I've worked in the past to some migration process from Datasnap to MARS (and from RemObjects to MARS too). One thing you could take advantage is that TMARSActivation class (quite the core of request / REST method execution matching) can be replaced / tweaked. This means you may change the way an http request is matched against the Delphi code to be executed to produce response. Or you may want to have a different strategy/parsing technology to fill REST method arguments from the request. Obviously this is not the easiest task in the world but may have a lot of sense especially on large projects (I've migrated large datasnap applications to MARS with minimal effort and reducing to the minimum changes in the methods code). Coming to your questions: 1) MARS can expose multiple engine (1 engine -> 1 port). Each engine can expose multiple applications. Each application can expose multiple resources. Each resource can expose multiple methods (http verbs and sub resources). You can organize resources as you like (one resource per unit, for example). I didn't get what you mean with "separate delphi project". You can deploy MARS server in several ways including ISAPI for IIS. 2) MARS serialization/deserialization mechanisms are designed to be pluggable so you can implement your own readers/writers to handle OleVariants as you prefer. 3) I have knowledge of MARS servers used in heavy load situations. Numbers are not significative because they actually depends on hardware/storage/purpose of REST methods. If you are looking for extreme performance, I would take a look to mORMot. But in 99% of my experience MARS is fast enough and REST architecture may help you to properly deal with scaling and performance boosts. Sincerely, Andrea Share this post Link to post