Jump to content

João Antônio Duarte

Members
  • Content Count

    11
  • Joined

  • Last visited

Everything posted by João Antônio Duarte

  1. João Antônio Duarte

    VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)

    I ran a benchmark test and found that your implementation is much more performant than mine. Congratulations on the great work!
  2. João Antônio Duarte

    VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)

    Byte[7] is filled at array initialization with random values.
  3. João Antônio Duarte

    VSoft.UUIDv7 - a Delphi implementation of UUIDv7 (RFC 9562)

    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;
  4. João Antônio Duarte

    Spring4d in Linux

    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.
  5. João Antônio Duarte

    Spring4d in Linux

    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.
  6. João Antônio Duarte

    Spring4d in Linux

    You have to use the Spring development branch
  7. João Antônio Duarte

    Spring4d in Linux

    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.
  8. João Antônio Duarte

    Spring4d in Linux

    Yes, it's a RESTful web server.
  9. João Antônio Duarte

    Spring4d in Linux

    I use Spring4D container (develop branch) + DelphiMVCFramework on linux as daemon. Works great, no problem.
  10. João Antônio Duarte

    DelphiMVCFramework-3.2.2-nitrogen has been released

    DMVCFramework is fully stable and tested. I use DMVCFramework in large production projects, in Windows and Linux environments.
  11. João Antônio Duarte

    Delphimvcframework and contenttype

    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);
×