#301 Re: mORMot 1 » Kingdom Driven Design principles » 2019-10-01 08:16:50

I'm interested too. Currently I use TSQLRecord derived classes directly, and I'm satisfied with the concept and architectures.

The last time I read about the DDD (in the context of mORMot) and I wasn't convinced - I think it's over-complicated and over-engineering.

So I'm also interested to see how the cut-down version of DDD might look like.

#302 Re: mORMot 1 » DSqlite - an interesting project » 2019-09-05 10:29:27

Hello ab,

I'm glad you find this project useful and intend to extend mORMot with it - that will make mORMot a **distributed** system!

Re not supporting Windows, maybe you wait a little time, also for its maturity.

It seems to use a patched sqlite engine.

#303 Re: mORMot 1 » DSqlite - an interesting project » 2019-09-01 06:56:12

The "d" in dsqlite means distributed, from what I read, it allows your data to be automatically distributed into multiple servers, and if any of the servers is down, the data service will still keep working.

As a matter of fact, I don't think DSqlite can be easily integrated into mORMot.

Since you asked, in a perfect world, I want to program against mORMot's API, and my data to be transparently distributed in multiple nodes and take advantages of the multiple computing power.

#304 Re: mORMot 1 » DSqlite - an interesting project » 2019-08-31 04:32:51

@pvn0, actually it's quite different smile

#305 mORMot 1 » DSqlite - an interesting project » 2019-08-30 16:34:40

edwinsn
Replies: 9

Distributed SQLite but still embedded, by the company that made Ubuntu.

No sure how difficult it'll be to integrate it with mORMot smile

project site: https://github.com/canonical/dqlite

#306 Re: SyNode » QuickJS FPC & Delphi Bindings » 2019-08-25 04:20:29

I like that the engine's very small in size, runs JS quickly, and fully supports the ES2019 spec!

#307 mORMot 1 » What might cause TDocVariant.NewFast memory leak? » 2019-08-21 08:57:27

edwinsn
Replies: 0

Hello ab,

I'm having trouble fixing a memory leak caused by a variant variable. I'm wondering if you have any suggestions.
The procedure  which is something like:

var
  v: Variant;
begin
  TDocVariant.NewFast(v);
  v.SomeString := 'testString';
  AnotherProc(v);
end;

The following are one of memory leak report by madExcept:

type: GetMem
address: $15b33c28
size: 27
access rights: read/write

thread $7fc (TMyWorkerThread):
671c90b2 madExcept32.dll madExceptDbg              1603 GetMemCallback
00406c74 app1.exe System                    4189 @GetMem
006d7196 app1.exe SynCommons               20604 FastSetString
006d55f6 app1.exe SynCommons               18893 RawUnicodeToUtf8
006f4339 app1.exe SynCommons               43865 TSynInvokeableVariantType.SetProperty
00470ab2 app1.exe System.Variants           6340 TInvokeableVariantType.DispInvoke
00466b60 app1.exe System.Variants            930 DispInvokeCore
00466bc2 app1.exe System.Variants            953 @DispInvoke
012fbcda app1.exe MyUnit1                    309 TMyClasss.LoadRenderingContext
...
00d740e1 app1.exe EyThreadPool               436 TEyExecProcWorkItem.Execute
00d73db1 app1.exe EyThreadPool               378 TEyWorkerThread.Execute
004b002b app1.exe madExcept                17436 HookedTThreadExecute
00541366 app1.exe System.Classes           14548 ThreadProc
0040b9d8 app1.exe System                   22016 ThreadWrapper
004aff11 app1.exe madExcept                17369 CallThreadProcSafe
004aff76 app1.exe madExcept                17419 ThreadExceptFrame
75ab343b kernel32.dll                                   BaseThreadInitThunk

#308 Re: mORMot 1 » Enumerated types in method parameter » 2019-08-10 11:13:50

@Vitaly,
Thanks for your comments.

It's good to know about the useful `TEnumType` type and your real-life experience with it.

But If I understand the OP correctly, he wants the parameters of type enum of an interface-based service to be transfer by the framework in the format of strings instead of integer values, as far as I know it's not possible?

I just checked the "Service Methods Parameters” chapter of the document, it states that all enum values are being transferred as JSON numbers, not sure if there is an option to configure/change that.

#309 Re: mORMot 1 » Enumerated types in method parameter » 2019-08-10 04:33:56

I believe converting and transferring the enum values in their string presentations would significantly reduce the performance.

#310 Re: mORMot 1 » CBOR data format » 2019-08-05 08:23:42

I agree with ab. One of the beautiful things about JSON is that it's human-readable and it has a huge advantage when debugging or testing.

#312 mORMot 1 » A PR for a fix for handling boolean values of the JSON standand » 2019-08-03 08:49:37

edwinsn
Replies: 2

@ab, since my previous PR didn't get you noticed until a few days later, so I'm not sure if you really monitors the github PR notification, and to avoid my local repository to fall behind your repository, I'm notifying you this pull request, and if it makes sense, I wish you can merge it ASAP.

The PR fixed: `TDocVariantData.B` or `GetBooleanByName` couldn't correctly handle the "true" and "false" JSON values.

Just in case anyone of you find my contribution workflow is not optimized:
- I have two local repository:
  - 'mORMotOfficial': which is exactly the official mORMot repository.
  - 'mORMotFork': For pushing to my github repository.
- When I need to make a change I work in the 'mORMotOfficial' folder, once passed tests I sync it to the sibling 'mORMotFork' folder, which will then be pushed to my github fork of the mORMot repository. Then I create pull request to @ab.

So if the official mORMot repo has new commits, I'll have to:
- sync my fork on github
- pull my fork to local
- backup my changes to somewhere else and pull the official repo to local
- re-apply my changes to both the local fork and working folders
- push again to github

So that's why I'm afraid of falling behind the official repo after I created a new PR smile

Thanks.

#313 Re: mORMot 1 » Error compiling in Lazarus/FPC » 2019-07-28 03:07:23

@EMartin, FPC is compiler while Lazarus is the IDE, so I guess the compilation error has nothing to do with Lazarus.

I just checked my fpcupdeluxe installation and it's Lazarus 2.1 which was installed many months ago.
And I just checked it was able to compile the mORMot I checked out few days ago.

#314 Re: mORMot 1 » Error compiling in Lazarus/FPC » 2019-07-26 15:07:26

@hnb,

Do you know where I can find descriptions for all these "versions"? Is "fixes3.2" the most recent AND stable release?

I know 'trunk' is the latest but not stable, but the 'stable' release is too far behind and sometimes cannot compile mORMot.

All I want is to choose the most recent but ALSO stable enough release to work with mORMot, is "fixes3.2" currently the best suit? Thanks.

#316 Re: PDF Engine » Virus alert when installing .dll » 2019-07-26 09:11:20

Definitely it's the issue of the anti-virus software...

#317 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-25 14:16:49

@ab, one more question - does the 'KDFRounds' parameter for the encryption and decryption has to be the same?
I mean if the rounds are not the same, will it cause decryption fails?

#318 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-13 15:29:20

I see, Your approach is a quite customized one. But I fully agree that the system must be tolerant.

#319 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-13 08:08:26

@macfly, thanks for sharing, it's very insightful.

Re "Today I control the licenses online. Each time a user requests the registration the server checks how many requests it has made in the last x days and if it detects abuse it blocks, and warns me.", have you implemented any kind of "deactivation" operation for the end user?

#320 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-12 16:18:11

werewolf wrote:

> ExtractFileName(Application.ExeName) can be a good idea
All your code can be changed. ;-)
Do not invent sec - rely on cryptography.
GUID here is something. It may be changed for Major releases etc.
There is no reason to prevent user from renaming executable. I think that relying on executable name is bad practice.

Agreed, actually after thinking deeper after my previous reply, I had the same conclusion with you smile

#321 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-12 10:32:01

Thanks @ab, as always, your help comes fast!

Ah I see! Assuming in the scenario of implementing a 'software activation' system, it seems that the `aSecretPass` parameter is perfect suitable for accepting the serial number the customer purchased?

For `aDPAPI` and `aDecryptSalt`, I just had an idea - it seems that ExtractFileName(Application.ExeName) can be a good idea, because that can prevent the bad people from changing the program's file name smile

PS, you meant "some non-empty constant strings", right smile

#322 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-12 08:21:13

@ab,

I'm just starting looking at `ECCAuthorize`, my question is, will it decrease the security level if I pass empty string '' for all the `aSecretPass`, `aDPAPI`, `aDecryptSalt` three parameter?

I want to simplify things, since this approach is based on asymmetric encryption I think that's enough - I'll keep the 'app locking private key' secretly and that'll be enough. Am I wrong? Thanks.

#323 Re: mORMot 1 » Application Locking using Asymmetric Encryption » 2019-07-12 08:15:15

werewolf wrote:
ab wrote:

The idea is that you supplied some needed information as aContent: TObject output, encrypted as JSON within the .unlock file.
If you let ECCAuthorize return 0, the system won't work. smile

Well, that changes everything: return 0 and {"godmode":"on"} in aContent smile
What is the difference with "strong" https request of the same content?

I think you misunderstand the purpose of the approach @ab is introducing here,  It's the Code Signing's task to protect the EXE file from being tampered.

#324 Re: mORMot 1 » GraphQL? » 2019-06-07 03:22:41

I guess implementing a GraphGL server would be very complex. The wikipedia page says GraphGL is not suitable for simple API.

#326 Re: mORMot 1 » Recommended implementation of auto completed properties » 2019-06-06 05:11:07

Use TStringList to store the value list, and use json_each to query. Check: https://www.sqlite.org/json1.html

#327 Re: mORMot 1 » [SOLVED] HttpServer in Centos » 2019-06-06 05:06:18

Can you install Lazarus on your Centos and debug?

#328 Re: mORMot 1 » How to do with "rotated" tables using mORMot? » 2019-06-02 08:17:06

Really interesting question.

What do you mean by not having control of the server? Is the server also based on mORMot?

A thought:
- Pause the client, then perform the table rotating (renaming) on the db level (not the ORMot leve), empty the cache (both the client and server side), and resuming using the clients.

#330 Re: mORMot 1 » Splitting tables between several SQLite3 databases » 2019-05-25 15:05:39

if the db is sqlite, I think all write operations to the db are coordinated with a lock, which means it's thread-safe but the writes are not parallel.

#332 Re: Free Pascal Compiler » fpc/lazarus - mormot » 2019-05-25 06:23:29

macfly wrote:

@edwinsn I'm from Brazil.
Another issue, the Indy server to download SSLs is protected by captcha for me.

I saw in fpcupdeluxe thread that this is not for everyone.

Certainly the servers are acting differently according to the IP location.

Since the source check out process need to download a lot of files, and given the fact that SVN is not very fast,  to me it's more like a technical issue on the server side.

#333 Re: Free Pascal Compiler » fpc/lazarus - mormot » 2019-05-24 15:32:00

@macfly, where are you in? Yes, in China here without an "extended" VPN the svn check out most likely will fail.

#334 Re: mORMot 1 » [solved] Dmustache - can I call partial recursively? » 2019-05-23 05:46:07

Found the answer from the document: "Partials are rendered at runtime (as opposed to compile time), so recursive partials are possible. Justavoid infinite loops. ".

So the answer is YES.

#335 Re: Free Pascal Compiler » fpc/lazarus - mormot » 2019-05-23 05:27:05

Yes, SVN is much slower than git.

#336 mORMot 1 » [solved] Dmustache - can I call partial recursively? » 2019-05-22 17:50:53

edwinsn
Replies: 1

With the Dmustache template engine, can  I call a partial recursively?
The case is generating multi-level sub-menus, where the levels of the menus are dynamic.

From this stackoverflow question (https://stackoverflow.com/a/31927431/133516), the official JS mustache does support recursive calling of partials.

Thanks.

#337 Re: mORMot 1 » TSQLRestServerFullMemory Batch mode? » 2019-05-22 15:24:05

I insist that the ORM processing will slow your mORMot testing code down. Publish your testing code into a github repository.

#338 Re: mORMot 1 » Hello » 2019-05-21 14:34:09

macfly wrote:

I think he looked at the first post of the thread: "Sticky: My mORMot Videos by warleyalex"

Because it's a fixed post, it stays at the top regardless of the date, and the last post was in 2018.

I think you are correct, in the mORMot sub-forum 'above the fold' all are old posts, while 'below the fold' all are new posts big_smile big_smile big_smile

#339 Re: mORMot 1 » TSQLRestServerFullMemory Batch mode? » 2019-05-21 08:11:07

cybexr wrote:

restClient.Server.DB.Synchronous := smOff;
      restClient.Server.DB.LockingMode := lmExclusive;

guess maybe helpful?

I don't think so. The looking mode and synchronous setting are only affect on-disk db file, but not in-memory db.

#340 Re: mORMot 1 » Hello » 2019-05-21 04:08:10

Hey you must be missing something, it's not possible the last post is dated Dec 2018

#341 Re: mORMot 1 » TSQLRestServerFullMemory Batch mode? » 2019-05-21 04:06:22

Your mORMot testing code uses the ORM, while the UniDAC testing code access the db directly, it's not a fair comparison. Use ISQLDBStatement (from SynDb.pas) instead.

#342 Re: mORMot 1 » Newbie - looking for samples ? » 2019-05-11 05:01:10

Don't be afraid, once you pass the initial learning stage, the gaining will be BIG smile

#343 Re: mORMot 1 » Newbie - looking for samples ? » 2019-05-10 07:27:41

general samples: https://github.com/synopse/mORMot/tree/ … e3/Samples

Re. example usage for SynCrypto, check function Cypher in <mORMot>\SQLite3\Samples\MainDemo\FileEdit.pas

#344 Re: synopse.info » Why keep "Releases -> Latest version of components"? » 2019-05-09 10:26:27

ab, even this's a very minor issue, u respond as fast as always smile I've been visiting this forum for many years and to be honest I've never noticed nor used the 'Jump to' navigation links smile

BTW, I always use the github repo for getting updates.

#345 Re: mORMot 1 » Unexpect query results after REINDEX » 2019-04-30 08:32:47

I guess SQLiteStudio  cannot recognize some of the mORMot collations? I use SQLite Studio for querying only, never dare to perform actions  like that with it.

#346 Re: mORMot 1 » Authorization tables not created with "CreateMissingTables » 2019-04-23 08:11:00

I actually declaring a classes inheriting from TSQLAuthUser/Group and add it to the model, but what you did should also work.

I'm using Delphi only, with sqlite db. maybe you can debug into the CreateMissingTables method.

#347 Re: mORMot 1 » Authorization tables not created with "CreateMissingTables » 2019-04-22 15:14:54

Include TSQLAuthUser and TSQLAuthGroup in your database model, something like:

TSQLModel.Create([TTicket, TSQLAuthUser, TSQLAuthGroup],'root');

#348 Re: mORMot 1 » FoundationDb - I'd like to bring it to your attention » 2019-04-08 12:53:33

ab wrote:

MongoDB has a replication system, with automatic election IIRC.

You can build anything on top of assembly, too. wink

It may be a very good tool, but my guess (perhaps I am wrong) is that it would demand a lot of work to have a proper driver, and proper ORM integration - even for basic tasks.

FoundationDb distributed feature is much more than replication. Check out this extremely impressive video:
https://www.youtube.com/watch?v=oLGYMdo2q2g

I believe when its first come out, nothing like that on the earth, and one of the reasons it's acquired by Apple than released being an open source project 3 years later.

Re possible integration with mORMot, yes, I believe it's not easy, I asked implementing it using SQLIte's Virtual table approach, the developer of foundationdb said it's not scaleable in that way.

#349 Re: mORMot 1 » ORM and date queries[Solved] » 2019-04-07 03:43:41

larand54 wrote:

Finally it worked smile

I could also reduce it to:

  Baby := TSQLBaby.CreateAndFillPrepare( aClient, 'BirthDate=?',[double(dt)]);

So you may ask... Why all this about using DateToSQL and DateTimeToSQL when you should cast it to a double?
It has to be some other situations when you need to use them but when?

PS
  Is there any Convention how to mark a thread solved here ?
DS

It's not very normal that the datetime values are stored as Double, what type is TSQLBaby.BirthDate? If it's defined as either TDateTime or TDate, and if the saving is done via mORMot, the field values stored to the db should be something like @AOG posted, in iso8601 format, by design of the framework, check the doc here.

I usually edit the forum post and add '[solved]' to the title.

#350 Re: mORMot 1 » FoundationDb - I'd like to bring it to your attention » 2019-04-02 07:05:11

Hi ab, I must say I don't have real-life project with both of the two, but here are several perceptions I got reading on Hacker News:
- MongoDB might be far less stable than FondationDB - I used to watch a demo video on youtube by one of the FoundationDB co-founders, there were 4 or 5 nodes running the distributed FondationDB system, you randomly turn off two of them, and in just a minute, the distributed system automatically restore to full working service. It's very impressive, nothing like that in the market as far as I know.

- You can built anything on top of FondationDB's layer system, that's the goal of its fundamental key-value system.

Board footer

Powered by FluxBB