#1 mORMot 2 » Querying rest api for expiring date token » 2024-04-08 14:51:32

slapshot
Replies: 0

Hello I am designing a daemon software for Linux. It will be server for some functions and client for others, of course. Specifically, one of the classes queries and receives a token from a remote rest api service that indicates an expiration of 90 days, after which the token must be renewed for another 90 days. I wanted to ask if there is a class in the framework that could be grafted to instantiate an object to perform some sort of expiration date check and if so, execute the method to request a new token. I was thinking I could use a TTimer in case nothing exists, which once a day performs the check. But it might be inefficient for such a task or creating a thread problem. Any advice or experiences of yours ?

Thanks

#2 Re: mORMot 2 » Object lists » 2024-03-29 12:48:28

Thanks for the suggestions, guys ! I've been away from programming for so long, and I'm trying to rebuild everything a little bit. Not that I was a great programmer 20 years ago and in fact my wonder is in considering the effort to understand this framework and the idea that it could have been written with such mastery amazes me, really a lot of stuff for this gem of a framework, congratulations.
For this server project of mine the choice was between learning another development environment or brushing up on my reminiscences of Object Pascal which I have always loved, and with the presence of Mormot 2 my choice fell on the latter.
BTW, I will have to write a daemon on a linux vm that queries a rest api server (probably triangulating another rest api server as well), then expose a series of interfaces to allow desktop, browser and mobile applications to talk to the server itself. I think it will not be easy, I am still in the design phase and then testing a small part of the framework. I hope to succeed in this endeavor.

#3 mORMot 2 » Object lists » 2024-03-29 05:53:52

slapshot
Replies: 3

Hello, sometimes can be useful having a list of object loaded in ram, something such as TList or TObjectList class. I wonder if there Is such a Mormot 2 specialized class you can advice. I'm a bit lost into documentation.

Thank you

#4 Re: mORMot 2 » Building mvc-blog example broken in Linux » 2024-03-25 19:01:04

ab wrote:

Or perhaps try to switch your debug info to Dwarf 3.
I guess the problem may be from Dwarf 2 debugging info error.
Ensure both the mormot package and the project has the same kind of debugging info.

Thank you Arnaud, this last one did the magic !

Antonio

#5 mORMot 2 » Building mvc-blog example broken in Linux » 2024-03-24 14:57:22

slapshot
Replies: 2

Hello, just trying to build the example project here in Manjaro Linux but I got a ld error. I'm not able to understand the real problem here. Thank you

Compile Project, Mode: Default, Target: /home/antonio/fpcupdeluxe/ccr/mORMot2/ex/mvc-blog/exe/MVCServer: Exit code 1, Errors: 2, Warnings: 1, Hints: 2
Hint: Start of reading config file /home/antonio/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
Hint: End of reading config file /home/antonio/fpcupdeluxe/fpc/bin/x86_64-linux/fpc.cfg
Verbose: Free Pascal Compiler version 3.2.2-r0d122c49 [2024/02/28] for x86_64
Verbose: Copyright (c) 1993-2021 by Florian Klaempfl and others
Verbose: Target OS: Linux for x86-64
Verbose: Compiling MVCServer.dpr
Verbose: Compiling MVCModel.pas
Verbose: Compiling MVCViewModel.pas
Verbose: Writing Resource String Table file: MVCViewModel.rsj
Verbose: Linking /home/antonio/fpcupdeluxe/ccr/mORMot2/ex/mvc-blog/exe/MVCServer
Warning: linker: /usr/bin/ld: /home/antonio/fpcupdeluxe/ccr/mORMot2/ex/mvc-blog/lib/x86_64-linux/MVCViewModel.o: in function `.La6':
Error: MVCViewModel.pas:(.debug_info+0x36c): undefined reference to `DBG2_$MORMOT.REST.MVC_$$_IMVCAPPLICATION'
MVCServer.dpr(85,1) Error: Error while linking
MVCServer.dpr(85,1) Verbose: There were 1 errors compiling module, stopping
Verbose: Compilation aborted
Verbose: /home/antonio/fpcupdeluxe/fpc/bin/x86_64-linux/ppcx64 returned an error exitcode

p.s. Windows is fine.

#6 mORMot 2 » Help getting started with mORMot 2 » 2024-02-27 16:36:27

slapshot
Replies: 1

Hi everyone,

I'm new here and I'm trying to learn how to use the mORMot 2 framework for developing server applications. I need a little help to get started and would be grateful if someone could provide me with examples or helpful tips.

Specifically, I'm looking to create a simple prototype of a server application that can query a table containing over 1 million records within an MS SQL Server database and return the result in a browser. I would also like to understand how to effectively manage memory and optimize queries to handle such a high volume of data.

If anyone could point me to code examples or provide me with advice on how to proceed, I would be extremely grateful.

Thanks in advance for your help!

#7 mORMot 1 » Architectural advices » 2020-05-15 19:12:07

slapshot
Replies: 1

Hello everyone, it's the first time I've tried to make such an application and I would need advice not to make a mistake. I have to develop a server application that reads the status monitor of another application (not developed by me) reading the status of the various clients that load backups, then statistical data, if a backup is running etc.. This server app of mine has to give this data to a fat client or to a browser to have the possibility to analyze this statistical data, set a recovery and other operations. Further, my server app will have to receive client backup pc informations such as client disk space, time of backup and so. Any chance to have an advice that point me into right direction ?

Thank you

#8 Re: mORMot 1 » Patching the examples sources » 2020-02-06 21:48:29

Sorry I did not have seen that.

It seems all ok, that's a weird behaviour of rsync.

#9 Re: mORMot 1 » Patching the examples sources » 2020-02-06 21:12:06

ab wrote:

If anyone knows a better way under Linux to synchronize one folder from another...

Well rsync is really a great tool and it is very difficult to fail. Which switch are you using to sync both repository ?

#10 Re: mORMot 1 » Patching the examples sources » 2020-02-06 18:07:02

I updated my working copy of Fossil and now it compiles. No problem at all. Maybe some sync troubles between repositories.

Thank you

#11 Re: mORMot 1 » Patching the examples sources » 2020-02-05 17:45:54

I don't know this, too early for me to understand this huge code ! big_smile . I checked via svn revision 8005 and 8004. There is a new parameter NameLen that there is not into abstract ancestor class.

#12 Re: mORMot 1 » Patching the examples sources » 2020-02-05 17:05:33

Thank you ! I got an svn chekout of the git repository but I'm not able anymore to compile mormot_base laz package. mORMot.pas file in row 9085 and 9086 and 9109 and 9110 has an override of IntGet and IntSet method which are differents from its ancestor.

code example
https://pastebin.com/7Pyt8reD

Thank you

#13 mORMot 1 » Patching the examples sources » 2020-02-05 13:21:23

slapshot
Replies: 10

Hello, in my attempt to have a deep understand of your great framework I'm studying example sources. I'm using FPC and Lazarus, mainly under Linux, and often I find that examples are missing of lpi/lpr project or does not compile because some directives are not working etc..

Following the hints of your handbook I have a fossil working copy on my pc of synopse repository. Is there a way to produce a patch when I modify examples source so they can compile on Linux ?

Thank you

#14 mORMot 1 » Advices to build C/S application » 2020-02-03 09:58:04

slapshot
Replies: 1

Hello, I'm trying to learn mORMot framework to build C/S application. Before to dig into source code and your wonderful help handbook I would like to ask if it is possible to accomplish what I will like to do:

1. Build a Linux server NoSql database application (will be a remote internet server)
2. Fat clients (mainly Windows) to manage all aspects of the application, of course with security user level access. So, reporting, view, browsing grids ecc..
3. Web browser to access some areas of the application
4. Phone app to to access some functions, such as shift management, list of dates, etc..

Of course, to simplify all these things wink, I will have to code with FPC and Lazarus. I cannot find anymore my old copy of Delphi 7 Pro and the email I used to register in Borland (at that time) is lost. Embarcadero seems to be unreachable.

Thanks in advance.

#15 Re: mORMot 1 » PDF documentation does not work » 2020-01-29 22:13:30

ab wrote:

There was in fact a problem during the upload.

It should be fine now... for a 24MB pdf file of more than 2500 pages!!!

I honestly never found that kind of documentation for an opensource project. Really great and important smile.

I will employ a bit to surf everything but it is necessary to have an understanding of your framework to use for my project. Even if I think I will need your help very often.

Thank you !

#16 mORMot 1 » PDF documentation does not work » 2020-01-29 13:17:11

slapshot
Replies: 2

Hello,

I believe PDF doc has some problem. From this page  https://synopse.info/fossil/wiki?name=SQLite3+Framework the "huge pdf" is not opening into a reader.

Not a big issue, just to let you know.

Thank you, and keep up your incredible work.

#17 mORMot 1 » Which FPC + Lazarus version » 2020-01-26 08:12:00

slapshot
Replies: 1

Hello, I'm starting a new Linux server project and I would like to use this incredible framework. I searched here and in Lazarus/FPC forum to get the source and having the right version of FPC and Lazarus to compile and use it. I found controversial svn Number version to use so I'm asking here  preferred method to get the things work. I have Linux and Windows workstation to write and test my code.

My question is: is it better to have SVN snapshot of all, FPC+Lazarus+mormot, such often happens for open source code? Further if not, is there a web updated Page where are info about how to have the lastest working version ?

Thank you very much.

Board footer

Powered by FluxBB