I mean something similar with Datasnap(it is called MIDAS before) in delphi.
No such middleware components exists for Lazarus/FPC. You'll have to write your own.
On the other hand, you might also want to look at the freeware, Hyperbase
http://www.vglib.com/link-4.html. Hyperbase is an alternative implementation of MIDAS.DLL. It supports 100% of MIDAS' featureset. You can use it freely in your applications.
From the README file:
Overview
--------
HyperBase is a dynamic-link library that implements Borland MIDAS III DLL
(DBCLIENT.DLL and MIDAS.DLL) ClientDataset Redistributables replacement.
It allows developers to replace original MIDAS libraries and to use MIDAS III
functionality without purchasing the expensive MIDAS Deployment License for
multi-tier programs.
HyperBase implements all COM objects and interfaces exported by DBCLIENT.DLL
and MIDAS.DLL. It is a drop-in replacement of Borland MIDAS and allows to
developer to use all components and existing applications without any code
modifications.
HyperBase is available in source code.
I've never used it with Lazarus but since it is packaged as a dll, I guess it should work. Good luck.
(accidentally edited by moderator, but hopefully properly restored. I'm sorry - Marcov)