-
Content Count
11 -
Joined
-
Last visited
Everything posted by João Antônio Duarte
-
VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)
João Antônio Duarte replied to Vincent Parrett's topic in I made this
I ran a benchmark test and found that your implementation is much more performant than mine. Congratulations on the great work! -
VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)
João Antônio Duarte replied to Vincent Parrett's topic in I made this
Byte[7] is filled at array initialization with random values. -
VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)
João Antônio Duarte replied to Vincent Parrett's topic in I made this
Interesting, I also made my own implementation of GUID V7 a while back. Your implementation seems to be more optimized than mine. function NewGuidV7: TGUID; var LBytes: array[0..15] of Byte; LUnixMSec: Int64; I: Integer; begin for I := 0 to 15 do LBytes[I] := Random($FF); LUnixMSec := DateTimeToMilliseconds(TTimeZone.Local.ToUniversalTime(Now)) - Int64(UnixDateDelta + DateDelta) * MSecsPerDay; LBytes[0] := (LUnixMSec shr 40) and $FF; LBytes[1] := (LUnixMSec shr 32) and $FF; LBytes[2] := (LUnixMSec shr 24) and $FF; LBytes[3] := (LUnixMSec shr 16) and $FF; LBytes[4] := (LUnixMSec shr 8) and $FF; LBytes[5] := LUnixMSec and $FF; LBytes[6] := (LBytes[6] and $0F) or $70; LBytes[8] := (LBytes[8] and $3F) or $80; Result := TGuid.Create(LBytes, 0, True); end; -
I run my web services as self-contained services, so I use Indy as the HTTP server. However, all my webservices are behind a reverse proxy (Nginx), so I can set up load balancing for endpoints with a large flow of requests.
-
Perhaps the problem occurs because you are deploying your application as an Apache module. In my case I don't use apache, I deploy it as a self-contained application running as a Linux service. The way an Apache module is started is different from a self-contained application. It may be that this is causing a failure in the Spring container.
-
You have to use the Spring development branch
-
See this example project: https://github.com/joaoduarte19/DMVC-with-Spring4D-DI I use Ubuntu 20.04 and 22.04 to deploy in production. For testing and debugging I use Windows WSL.
-
Yes, it's a RESTful web server.
-
I use Spring4D container (develop branch) + DelphiMVCFramework on linux as daemon. Works great, no problem.
-
DelphiMVCFramework-3.2.2-nitrogen has been released
João Antônio Duarte replied to Daniele Teti's topic in Delphi Third-Party
DMVCFramework is fully stable and tested. I use DMVCFramework in large production projects, in Windows and Linux environments. -
Delphimvcframework and contenttype
João Antônio Duarte replied to borni69's topic in Network, Cloud and Web
By default DMVC registers a serializer only for the application/json content-type. But you can define a serializer for other types. In your WebModule, after creating the TMVCEngine add the following code: FEngine.Serializers.Add('application/sim+json', TMVCJSONDataObjectsSerializer.Create);