#1 Re: mORMot 1 » cant compile with RIO 10.3.2 » 2019-08-10 18:34:05

Did you make any changes to the mormot library when started with Rio ?

Vitaly wrote:

I'm using mORMot with 10.3.2 for a couple of weeks. Everything works fine. Didn't meet any trouble while migrating from 10.3.1.
Delphi 10.3.2 Professional with Mobile Version 26.0.34749.6593

#2 Re: mORMot 1 » cant compile with RIO 10.3.2 » 2019-08-10 16:59:20

unfortunately it doesn't help
Have someone used mormot with 10.3.2 ?
there were some other compile errors which I fixed myself
like adding syntable  to the uses list  in SynDBUniDAC.pas  ([dcc32 Error] SynDBUniDAC.pas(222): E2003 Undeclared identifier: 'ftInt64')

#3 Re: mORMot 1 » cant compile with RIO 10.3.2 » 2019-08-10 14:34:59

Thanks , but not .
I use latest build.

#4 mORMot 1 » cant compile with RIO 10.3.2 » 2019-08-09 21:20:35

nirnir
Replies: 8

Gets
   error E2065: E2065 Unsatisfied forward or external declaration: 'CodecGetReadKey'
   error E2065: E2065 Unsatisfied forward or external declaration: 'sqlite3_key'
and few more declaration without implementation .
I verified sqlite3.obj does exist
tried use c.bat to compile but bcc32 does not exist with this delphi version .
using bcc32x instead failed to compile

#5 mORMot 1 » working example of javascript/react authentication » 2019-06-03 09:56:08

nirnir
Replies: 1

Hi,
couldn't figure how to authenticate pure javascript  or react on synopse server .
a working example would be much appreciated ( delphi server side and javascript client side)

#6 mORMot 1 » Login with sms message » 2018-04-25 11:40:27

nirnir
Replies: 1

Is it possible to implement login with sms message?
updating AuthUserRT with temporary time limited password (which was sent to the end user)

#7 mORMot 1 » check plain password on server side » 2016-05-25 06:51:27

nirnir
Replies: 1

If , for some reasons ,  I have a plain password on the server side ,
How can I verify it against  the TSQLAuthUser.PasswordHashHexa  ?

#8 mORMot 1 » Authenticate from jscript » 2016-05-18 14:03:09

nirnir
Replies: 2

Do you have an example of how doing that ?

#9 Re: mORMot 1 » one server redirects Authentication request to other server » 2015-08-11 19:43:21

Thanks
But  as I understand this will allow the remote server access to the login table on the main server .
The remote server shouldn't have any access to the actual  AuthUser table ,
Authentication request  on the remote server should trigger the check on the main server without 'sharing' the table with the remote server .

Is it possible ?

#10 mORMot 1 » one server redirects Authentication request to other server » 2015-08-10 08:12:32

nirnir
Replies: 2

I have few servers which only one of them should handle Authentication .
(all other servers are logged to the Authentication server)
is it possible that  when server gets Authentication request from the client  he will redirect it to the Authentication server ?
if the server gets positive answer from the Authentication server he will allow the session .

#11 mORMot 1 » setuser detailed response » 2015-04-27 06:08:25

nirnir
Replies: 1

Is it possible that on failed setuser request the server will be able to response with an error message ( 'incorrect password'/'user expired'....)  ?

#12 mORMot 1 » Exception in TSQLRestServer.SessionDelete » 2015-04-02 07:24:49

nirnir
Replies: 1

Hi ,
I noticed an exception occurs in TSQLRestServer.SessionDelete
sometimes Ctxt in nil , causing an exception on the log command .
Also , the library wouldn't compile when removing the WITHLOG directive .

    {$ifdef WITHLOG}
    fLogFamily.SynLog.Log(sllUserAuth,'Deleted session %/% from %/%',
      [User.LogonName,IDCardinal,RemoteIP,Ctxt.Call^.LowLevelConnectionID],self);
    {$endif}

#13 Re: mORMot 1 » implement push notifications » 2015-03-25 19:29:54

is there an event exposed by the server which I can use ?
In the terms of the example , I maintain a list of the 'TLongWorkServiceThread' in order to inject them notifications when needed .
when the connection is suddenly broken, how can I know that ?

#14 Re: mORMot 1 » implement push notifications » 2015-03-25 17:19:27

Following  the example LongWorkserver/client , how does the server can detect client disconnection ?

#15 Re: mORMot 1 » implement push notifications » 2015-03-25 10:02:47

Thanks  ab,
Thats a great help .
I would like to make sure I understand  the usage correct architure .

If I have s synopse ORM server who serve  5,000 concurrent  users (synopse delphi clients ) whom I want to push 'random' notifications   .
Each client logged in will create kind of 'TLongWorkServiceThread' on the server which will be active as long as the client logged .
Is it the right way ( in terms of server resources cpu/memory)  to keep all those threads active (although doing nothing most of the time) ?

#16 mORMot 1 » UDP protocol » 2015-03-24 13:38:50

nirnir
Replies: 1

Can the library be used also for simple client/server UDP communication ?
If yes , which classes should be used ?

#17 Re: mORMot 1 » implement push notifications » 2015-03-24 09:24:42

Thanks Arnaud,
I'm also waiting for an example .

#18 Re: mORMot 1 » implement push notifications » 2015-03-23 09:50:06

I'm trying to understand how to use it from the regression tests .
I downloaded the latest build but it  fails with those errors :


2.1. Bidirectional remote connection:
  - Websockets JSON protocol: 60 assertions passed  24.28ms
  - Websockets binary protocol: 240 assertions passed  4.67ms
  - SOA callback on server side: 2,234 assertions passed  361.09s
  - Run http server: 1 assertion passed  20.78s
! Bidirectional remote connection - SOA callback via JSON websockets
! Exception EInterfaceFactoryException raised with messsage:
!  TInterfacedObjectFakeClient.FakeCall(IBidirService.TestCallback) failed: 'URI
root/BidirService.TestCallback/2 [-4,2] returned status 404'
! Bidirectional remote connection - SOA callback via binary websockets
! Exception EInterfaceFactoryException raised with messsage:
!  TInterfacedObjectFakeClient.FakeCall(IBidirService.TestCallback) failed: 'URI
root/BidirService.TestCallback/4 [-4,2] returned status 404'


Using mORMot 1.18.1117 FTS3
Running on wSeven_64 with code page 1255
Generated with: Delphi XE2 compiler

Time elapsed for all tests: 426.69s
Tests performed at 23/03/2015 11:45:37

Total assertions failed for all test suits:  1 / 6,413,873
! Some tests FAILED: please correct the code.

Done - Press ENTER to Exit

#19 Re: mORMot 1 » implement push notifications » 2015-03-23 06:45:10

Great ...
Do you have a sample project to demonstrate how it should be used ?

#20 mORMot 1 » implement push notifications » 2015-03-22 13:19:36

nirnir
Replies: 59

Is it possible to implement push notifications (server to client) without polling the server ?

#21 mORMot 1 » Extend TServiceCustomAnswer » 2014-11-19 17:46:34

nirnir
Replies: 1

can TServiceCustomAnswer be extended to return more then one binary object ?
I need the orm server to return record which contains more fields in addition to the blob one.

Is there other ways to make the server return mixed data ?
if , for example I have a response record  like

TResponseRecord = record
   blob1:RawByteString;
   blob2:RawByteString;
   simpleString:string;
   number:integer;
end;

maybe   should be another   layer which pack TResponseRecord   into TServiceCustomAnswer on the server side and extract it back to TResponseRecord on the client side  ?

#23 mORMot 1 » encrypt/decrypt string example » 2014-11-13 08:10:06

nirnir
Replies: 2

Hi ,
Do you have a simple example of how doing  that ?

#24 Re: mORMot 1 » mustache xml instead of json » 2014-10-03 12:38:06

I saw you have JSONToXML function in SynCommons is the other way exist somewhere else ?

#25 mORMot 1 » mustache xml instead of json » 2014-10-03 08:38:16

nirnir
Replies: 3

Can I feed mustache with XML data instead of json ?

#26 Re: mORMot 1 » Encryption/Decription » 2014-06-26 14:35:07

Can I encrypt only some of the requests and not all of them ? (The server will decide when)
I'm afraid it will decrease performance.

#27 mORMot 1 » Azure » 2014-04-03 10:47:18

nirnir
Replies: 1

Currently I'm using mormot with microsoft MsSql ,
I thinking of moving the database into Azure .
Does mormot work  with Azure sql ?

#28 Re: mORMot 1 » TSQLTableJSON set field size » 2013-12-29 08:07:50

Thanks, you are great .

you forgot to change   

ContentSize := -1; 
TO
ContentSize := FieldSize;
inside SetFieldType

#29 Re: mORMot 1 » TSQLTableJSON set field size » 2013-12-26 06:26:35

suppose the longest first_name in the json database was 'ab' ,
after I converted it to Tdataset the column size would be 2 and I wouldn't be able to insert value longer than two characters .

#30 mORMot 1 » TSQLTableJSON set field size » 2013-12-25 20:11:35

nirnir
Replies: 5

I'm using TSQLTableJSON and convert it to Tclientdataset .
the field size in Tclientdataset is automatically defined by the json column content length ,
The current value length shouldn't be the maxsize of the dataset column.
I'm using SetFieldType to define the column type for the created dataset , how can I control the size also ?

#31 Re: mORMot 1 » JSONToDataSet - preserve column type » 2013-12-11 10:58:48

Thanks,
Any idea about the nulls translated to zeros ?

#32 Re: mORMot 1 » JSONToDataSet - preserve column type » 2013-12-11 08:32:35

Another problem with that :

Null datetime values are translated to zeros in the Tclientdataset instead of null , that makes the grids display 30/12/1899 instead of empty column .

How can we solve that ?

#33 Re: mORMot 1 » JSONToDataSet - preserve column type » 2013-12-11 08:10:29

Thanks , it works .
As I understand the TSQLTableJSON  is automatically freed when I free TSynSQLTableDataSet  (when use CreateOwnedTable with Table<>nil ), am I right ?


You have small compilation error under XE2

function JSONToDataSet(aOwner: TComponent; const aJSON: RawUTF8;
  const ColumnTypes: array of TSQLFieldType
  {$ifndef UNICODE}; aForceWideString: boolean=false{$endif}): TSynSQLTableDataSet; overload;
{$ifdef HASINLINE}inline;{$endif}

[DCC Error] mORMotVCL.pas(158): E2439 Inline function must not have open array argument

#34 Re: mORMot 1 » JSONToDataSet - preserve column type » 2013-12-10 21:12:41

Thanks ab,
But
on the client side I get json string from server and immediately convert it to dataset ,
The client  doesn't  know the exact fields order  and therefore can't  pass the matching column type array .
can you create constructor with Tpair<fieldname,fieldtype> array or TDictionary or callback function resolveFieldType(p_fieldName:string):TSQLFieldType

#35 Re: mORMot 1 » JSONToDataSet - preserve column type » 2013-12-10 07:20:25

The problem is that the dataset is created by jsonTodataset .
Maybe you can add OnColumnCreated event/callback   to jsonTodataset.
it will allow to specify the column type instead of guessing by value .

#36 mORMot 1 » JSONToDataSet - preserve column type » 2013-12-09 14:00:05

nirnir
Replies: 10

On the client side I use devexpress grid expecting tclientdataset .
I get the data from server (external MSsql) as json and using JSONToDataSet to convert it to dataset
with this process I loose the field column type which makes  me problems with displaying dates and booleans .

Anyway to add the json string the column type and parse it when building the dataset ?

#37 mORMot 1 » PasswordHashHexa into plain password » 2013-12-04 14:59:27

nirnir
Replies: 1

How can I convert PasswordHashHexa into plain password ?

#38 mORMot 1 » AV when drop session (return true) in OnSessionCreate » 2013-12-03 22:05:14

nirnir
Replies: 1

I modified sampel14 server to demonstrate

/// this server will use TSQLRestServerFullMemory over HTTP
program Project14ServerHttp;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  Classes,
  SynCommons,
  mORMot,
  mORMotHttpServer,
  Project14Interface;

type
  TServiceCalculator = class(TInterfacedObject, ICalculator)
  public
    function Add(n1,n2: integer): integer;
  end;
  Tclass = class
   function sessionCreated(Sender: TSQLRestServer; Session: TAuthSession; Ctxt: TSQLRestServerURIContext):boolean;
  end;
  function TServiceCalculator.Add(n1, n2: integer): integer;
  begin
    result := n1+n2;
  end;

  function Tclass.sessionCreated(Sender: TSQLRestServer; Session: TAuthSession; Ctxt: TSQLRestServerURIContext):boolean;
  begin
    result := true;
  end;
var
  aModel: TSQLModel;
  aServer: TSQLRestServer;
  aHTTPServer: TSQLHttpServer;
  aclass  : Tclass;
begin
  // define the log level
  with TSQLLog.Family do begin
    Level := LOG_VERBOSE;
    EchoToConsole := LOG_VERBOSE; // log all events to the console
  end;
  aclass  := Tclass.create;
  // create a Data Model
  aModel := TSQLModel.Create([],ROOT_NAME);
  try
    // initialize a TObjectList-based database engine
    aServer := TSQLRestServerFullMemory.Create(aModel,'test.json',false,true);
    try
       aServer.OnSessionCreate:= aclass.sessionCreated;
      // register our ICalculator service on the server side
      aServer.ServiceRegister(TServiceCalculator,[TypeInfo(ICalculator)],sicShared);
      // launch the HTTP server
      aHTTPServer := TSQLHttpServer.Create(PORT_NAME,[aServer],'+',useHttpApiRegisteringURI);
      try
        aHTTPServer.AccessControlAllowOrigin := '*'; // for AJAX requests to work
        writeln(#10'Background server is running.'#10);
        writeln('Press [Enter] to close the server.'#10);
        readln;
      finally
        aHTTPServer.Free;
      end;
    finally
      aServer.Free;
    end;
  finally
    aModel.Free;
  end;
end.

#39 Re: mORMot 1 » ICopiable interface » 2013-12-01 16:11:58

Ok ,thanks,
If we are already talking about interface , how do I register a service  to be used only on the server side and not exposed to the client ?

aServer.ServiceRegister(Trt_mangr,[TypeInfo(IrtMng_1)],sicShared);
aServer.ServiceRegister(Trt_mangr,[TypeInfo(IrtMng_2)],sicShared);


IrtMng_1,IrtMng_2 are interfaces to the same Trt_mangr object

IrtMng_1 is used from the client
IrtMng_2 should be used from other units on the server only

#41 PDF Engine » convert multipage tiff file to pdf ? » 2013-11-29 15:43:27

nirnir
Replies: 1

Can this library can be used to convert multipage tiff file into pdf ?

#42 Re: mORMot 1 » connection dropped by the client » 2013-11-26 11:01:43

This is broken on the client side
it isn't  in the main thread and used for uploading/downloading data in the background .
What's the property name on the client for request timeout

#43 mORMot 1 » connection dropped by the client » 2013-11-26 07:47:51

nirnir
Replies: 3

I noticed that in interface calls if the call takes longer then 30 seconds it is droped by the client .
Where can I configure this timeout .

I tried to increase keepAlive but it doesn't help .

I created that service to check it

  ITests  = interface(IInvokable)
     ['{0214C711-E14B-4D86-B418-B48553EDA24C}']
    function test_wait(p_mili:integer):integer;
  end;


  TTests = class(TInterfacedObject, ITests)
   public
     function test_wait(p_mili: integer): integer;
    end;

function TTests.test_wait(p_mili: integer): integer;
var
  speedTester:TspeedTester;
begin
  speedTester.start;
   my_sleep(p_mili);
  result := speedTester.elapsed;
 end;




type
  TspeedTester = record
  private
    startTime: int64;
  public
    procedure start;
    function elapsed: int64;
    function elapsedSTR: string;
  end;

implementation

{ TspeedTester }

function TspeedTester.elapsed: int64;
begin
  result := GetTickCount - startTime;
end;

function TspeedTester.elapsedSTR: string;
begin
  result := inttostr(elapsed);
end;

procedure TspeedTester.start;
begin
  startTime := GetTickCount;
end;

#45 Re: mORMot 1 » SQLite3VCL.JSONToDataSet VS mORmotVCL.JSONToDataSet » 2013-11-21 07:20:56

Tclientdataset is common in client/server applications .
when you need pure Tclientdataset , it would be usefull to have JSONToClientDataSet .

#46 mORMot 1 » register existing object in TSQLRestServer.ServiceRegister (sicShared) » 2013-11-20 19:00:46

nirnir
Replies: 2

Can I register already exist object in ServiceRegister  in sicShared mode  ?

#47 Re: mORMot 1 » SQLite3VCL.JSONToDataSet VS mORmotVCL.JSONToDataSet » 2013-11-20 17:52:37

where do I find the updated SQLite3VCL.pas , it doesn't exist in the nightlybuild

#48 mORMot 1 » SQLite3VCL.JSONToDataSet VS mORmotVCL.JSONToDataSet » 2013-11-20 14:59:53

nirnir
Replies: 4

I need json to  Tclientdataset converter .
Why there are two functions ?
If I'm adding SQLite3VCL to my uses I get compilation errors in SQLite3Commons .
[DCC Error] SQLite3Commons.pas(2313): E2037 Declaration of 'WriteObject' differs from previous declaration

#49 Re: mORMot 1 » serving TDBXReader/TclientDataset objects » 2013-11-20 09:32:03

Thanks,

I will try to migrate my TDBXReader usage to SynDB units .
As I understand TSQLDBConnectionProperties.ExecuteInlined  is thread safe and I need only one instance of TSQLDBConnectionProperties on the server side . Am I right ?

#50 Re: mORMot 1 » serving TDBXReader/TclientDataset objects » 2013-11-19 17:13:02

Thanks,
But if I have an old code returning TDBXReader ,  do you have a fast converter from TDBXReader  to RawJSON ?

Board footer

Powered by FluxBB