Jump to content

mikak

Members
  • Content Count

    18
  • Joined

  • Last visited

Posts posted by mikak


  1. 11 hours ago, FPiette said:

    Whatever solution you select, I advise you to only use products for which you'll get FULL SOURCE code and you'd never use prebuilt libraries or DCU but instead recompile yourself everything. This is the only way to be sure that in the future you'll be able to have your own product survive to the death of the external product you used.

     

    This has been my guideline all the time when talking about delphi code.  and it has saved me couple of times. But sometimes must relay on ready solutions but use those who have large user base.  One just don't have enough time to write everything by himself ( = myself + my team)


  2. 4 hours ago, mvanrijnen said:

    Forgot to mention, one of the advantages of a protocol like MQTT (there are other solutions with this advantage) is that you do not have to configure firewall on the workstations, only the server (incoming mqtt port), the clients just have an outgoing connection (most of the time allowed by firewalls),

    We had a solution first where client app's where listining on certain port, but this way we needed multiple ports per client, so also configuring the firewalls etc, that has fallen away now with the mqtt solution.

    Actually I was just thinking about this. It came from differenent case where I got complaint from customer that purchase price in order  doesn't change immediatly in when user changes price in product maintenance in another workstation.  tought I could use same mecanishm to send messages. then I rememberd that some of workstation are dhcp, change and some are event in different subnet (warehouse vs storage). Had to configure many terminal.
    I will go with MQTT.


  3. 48 minutes ago, FPiette said:

    This is really a short description which is not enough for us to advice for solutions.

    For me the easiest way to exchange messages between two similar VCL application is to use simple TCP socket to make the apps peer-to-peer. You don't need complex solution if there are only two applications.

    If you tell us more about the real problem you have to solve (The requirement), you will probably get a better answer.

     

    Yes, In deed it was short description.
    there will be 2 ... n windows pc's which run our VCL application. Some are self service kiosks ( Point of Sales) and some have employees operating them.   Configuration might be for example 4 self services and 2 with personel.
    In kiosk users make mistake which required staff's actions.  Accidently orders wrong product and pays it, employees help is needed to cancel it.  Or age limited product, staff could click It's ok from his own terminal if he / she see that customer is and old guy. Anyway in these cases self service terminals application sends msg to all (configured) manned workstations.  Personel could send command (ok - continue,  wait-i'll be there) from own workstion back to originaiting selfservice kiosk.

    usually messages are from one terminal to another, but might be brodcast also.

     

    So my current plan is that number of messages quite few and they might be short. Of course if implementation works we might extend it more, like manned workstation could see what user does in self service kiosk. (not whole screen, only items purchased).

    Current envirmoments are all in own private local area cable network, so encryption isn't a must. But it will if in some day customers wan't to use stand alone clients.

    Our DB is Actian Zen (old btrieve) so no notification 😞

     

    thanks for responses so far 🙂 intresting reading.

     

    • Like 1

  4. Hi,

    I need to implement somekind of message exchange between two similar VCL apps inside same local network. All are windows machines.

    I have been thinking following options

    1. install local mosquito server and use TMS mtqq client
    2. build websocket server (for example using mORMot) 
    3. brute force: write to DB and read using  timer based poll (not a real option IMO)

     

    use case is that user can press help on self service kiosk and it would raise notification in service personal desktop app.  Or there is an error and application automatically sents notifcation .

     

    Also considering in future to have handheld (android) devices to receive messages.

     

    is there another reasonable choices?

     


  5. I was searching solution this object creation also and remembered finally that Delphi rtl json library does that. 
     

    uses ...
      system.rtti,
      rest.jsonreflect;
    
    var
      ctx: Trtticontext;
      a, another: TMybaseClass;
    begin
      a := tMyancestorClass.create;  
      //actually no need to call ctx := trtticontext.create; 
      another := TJSONUnMarshal.ObjectInstance(ctx, a.QualifiedClassName) as tmybaseclass;
      assert(a.classname = another.classname);
    end;

    Only default constructor is supported (constructor create)


  6. Hi,

    Is it possible to capture actual data of TRestRequest sent by TrestClient before sending. I have been using fiddler while developing (if needed) but during pilot installation i'd like to capture all request sent by our application only to that specific endpoint (so not every request sent by our app ) and store them safely. 


  7. 34 minutes ago, Uwe Raabe said:

    Did you rename the fast compilers to replace the original ones?

    yes. I did and at start of compilation it says Compiler Speed Pack 6.4.2 - Compiler patches applied 
    so it's 6.4.2 not 6.4.4 as I wrote but change log between isn't so huge.
     


  8. My Delphi 10.3.1 compiles my quite large application from ide in about 20-25 sec. If I check use MSbuild to compile it takes over 2 minutues.
    I have Installed fastdcc 6.4.4 and IDE Fix Pack 6.4.4 

    I there anything I could do - we have over 10 applications so building them from command line takes of course a long time...


  9. Thanks for reply. I'm quite ashamed of how badly I concentrated to read readme ... there it was, Right before my eyes. 

    But opening Spring.TestRunners.pas was quite eye opener! Thanks. Got rid of some unidac singleton and some LazyLoadAttributes.MakeClosure* leaks. 

     

    thanks again... 

     

     


  10. Hi,

    I'm testing classes that use RTTI and I get some strange leaks. 

    My isolated test case is 
     

      [ TestFixture ]
      tSomeTEst = class (TObject)
      private
        a: integer;
        b: string;
        c: double;
      published
        [ test]
        procedure sometest;
      end;
    /// ... and the test itself ..
    
    procedure tSomeTEst.sometest;
    var
      ctx: TRttiContext;
      ti: TRttiType;
      f: TRttiField;
    begin
      ctx := TRttiContext.Create;
      ti := ctx.GetType( typeinfo(Tsometest) );
      for f in ti.GetFields do
         codesite.send(f.Name);
      ctx.free;
    end;

    When I run my test I get 

      testkassaapi.tSomeTEst.sometest
      Message: 432 bytes were leaked in the test method
    Total allocation count: 26532 (1906454 B)
    Leak detected 06320CB0 size 76 B for class: TStringList
    Leak detected 06519080 size 18 B
      B0 04 02 00 01 00 00 00 02 00 00 00 0D 00 0A 00 00 00 | ??????????????????
    Leak detected 065192F0 size 40 B
      01 00 00 00 04 00 00 00 6C 95 51 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ????????l?Q??????????????
    ???????
      00 00 00 00 00 00 00 00 | ????????
    Leak detected 06519560 size 16 B for UnicodeString {RefCount: 1} = a
    Leak detected 064A57E0 size 28 B for class: TRttiInstanceFieldEx
    Leak detected 064A5A50 size 28 B for class: TRttiInstanceFieldEx
    Leak detected 064A5CC0 size 28 B for class: TRttiInstanceFieldEx
    Leak detected 064A5F30 size 32 B for UnicodeString {RefCount: 1} = 3676=3676
    Leak detected 064A61A0 size 40 B
      01 00 00 00 04 00 00 00 3C 5F 4A 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ????????<_J??????????????
    ???????
      00 00 00 00 00 00 00 00 | ????????
    Leak detected 06320F50 size 86 B for UnicodeString {RefCount: 2} = 2EC5265F-E40C-42B0-B71D-D8C0F8E30803
    Leak detected 064A6680 size 40 B
      01 00 00 00 04 00 00 0

    If I just use standard ReportmemoryleakOnShutdown, it reports no leaks.

    what's going on here? 

    I use Delphi 10.3.1. and latest leak-check from https://bitbucket.org/shadow_cs/delphi-leakcheck/src/master/


  11. Hi,

    Started (again 😄 ) to examine how to convert our server from datasnap to mars. 

    Our goal is to have api like /databasename/products or /databasename/orders/10 so one server should handle multiple databases which have same structure

     

     

    To introduce every database Mars I write.

    for s in fdatabasenames do
        FEngine.AddApplication(s+'-app', s,  [ 'Server.Resources.*','customers.resources.*','orders.resources.*',..... {about 30 different resources}]);

    Is there approach ok? or does this waste server resources? one server should be able to handle 10-40 databases. 

×