Activities of "Thiqah.Abp"

  • ABP Framework version: v4.2.0

Hi, We have recently done a performance and load test on one of our new systems (developed using ABP). The report came out with high recommendation to improve GetApplicationConfiguration application service.

I have notices the TODO comment to optimize and enhance the service in the source code. Also noticed that there are already an implementation for caching the configurations in Volo.Abp.AspNetCore.Mvc.Client module.

My questions:

  1. Why the caching implementation is applied only on the dynamic client proxy and not implemented directly in the configuration application service? Because I thing it will reduce a lot of processing if the whole configuration object get chached (even if there already a cache implementation for individual configurations).
  2. As the localization only depend on the cuture, Why is the cached localization in the application configuration object not cached seperatly to reduce cache size?
  3. The local event: CurrentApplicationConfigurationCacheResetEventData confused me! how can the handler be called if the Volo.Abp.AspNetCore.Mvc.Client module exists in different application (not the API)? Or I missunderstood the implementation and usage of the module?

Fadi Thanks

Still not working! Calling the generated conventional controller does not validae the input. However, after reading the documentation again and again, I figured the issue:

ABP framework uses the dynamic proxying / interception system to perform the validation. In order to make it working, your method should be virtual or your service should be injected and used over an interface (like IMyService).

https://docs.abp.io/en/abp/latest/Validation#validation-infrastructure

Our problem is that the Application Service Method is not virtual, after adding the virtual keyword to the method, it works.

hi

Can you share the full source code to reporduce the problem?

I have reproduced the case with just an empty template and a simple application service bellow:

In Application.Contracts project:

[DependsOn(typeof(AbpFluentValidationModule)] Added to Module class

//Dto
public class SampleInputDto : EntityDto<Guid>
{
    public string RegistrationNumber { get; set; }
}

//Validator
public class SampleInputValidator : AbstractValidator<SampleInputDto>
{
   public SampleInputValidator()
   {
      RuleFor(input => input.RegistrationNumber)
            .NotEmpty()
            .MaximumLength(25);
   }
}

//Application service Interface
public interface ISampleAppService
{
   Task AddAsync(SampleInputDto input);
}

In Application project:

public class SampleAppService : AbpFluentValidationDemoAppService, ISampleAppService
{
     [Route("add")]
     public Task AddAsync(SampleInputDto input)
     {
         return Task.CompletedTask;
     }
}

In HttpApi project (Controllers):

[Route("api/Sample")]
public class SampleController : AbpFluentValidationDemoController, ISampleAppService
{
     private readonly ISampleAppService _sampleService;

     public SampleController(ISampleAppService sampleService)
     {
         _sampleService = sampleService;
     }

    [HttpPost]
    [Route("add")]
    public Task AddAsync(SampleInputDto input)
    {
        return _sampleService.AddAsync(input);
    }
}
  • ABP Framework version: v4.2.1
  • UI type: No
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  1. I have created a simple Application service with one post method (Just return success)
  2. Added a simple Dto to the application service.
  3. Created a simple fluent validator for the Dto.
  4. Created a controller implements the Application Service interface.
  5. Keep Conventional Controllers configuration in the host project enabled.

I ended up with two endpoints appear on the Swagger: one for the controller and the other one from the Convension. The problem is that the Fluent Validation is not being called by Conventional Controllers, but working fine for the real controller action.

Should it work? or the fluent validation is not working with Conventional Controllers? Or there is a missing configuration?

Update 21/2/2021: Seems it's not related to Fluent Validation. I have tried to add my custom IObjectValidationContributor and it's called only from Controller and not from Conventional one!

Hi,

If we have many microservices (or systems) and one centeralized Identity server. As I understand, the permission management module is independent from the identity. The question here is: What is the recommended implementation and what are pros and cons of each one:

  1. Make the persmissions centeralized in the identity server? Or:
  2. Add the permission module to each system?
  3. Or there is a better solution?

in option 1, the Identity server have users, roles and clients but not the permission list. In option 2, each client has it's own permission list buut not users, roles and clients! So, how to manage permissions (UI) in each case.

Thanks Fadi

Showing 1 to 5 of 5 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11