Starts in:
2 DAYS
5 HRS
16 MIN
27 SEC
Starts in:
2 D
5 H
16 M
27 S

Activities of "rcalv002"

Albert,

My original question was around the part regarding sending requests to remote systems that require require login sessions, these systems would all be on separate servers that I would not control. It was regarding the best way to do this, pulling the connection information from configuration on the tenant. Could you please reread the thread with the original question and my clarifications after initial response?

Hi Albert, Yes actually I was clarifying the remote call issue and would like some feedback on this point of my original quest, please?

When new data comes in ( new orders for example ) the module will kick off a distributed event (these will be local initially but the code should work for when we move to microservice, per the docs). The main application then subscribes to these events and should record the transaction locally on abp database, and then schedule and process a background job (using the hangfire implementation) that posts the transactions into the appropriate remote backend.

Okay, thinking that you have a microservice application now since you want to manage transactions with database and background jobs. There is also a pattern for microservice transactions, which is called inbox-outbox pattern. And it happens to be that ABP will be implementing this pattern in v5. Check the annoucements about it.

Thanks, I did see the announcement earlier and am looking forward to it, but don't want to wait 2 months to start working on this, I can refactor later. Right now my app will not be a ms, but a mono with modules.

Does this make sense to do? Also since the background jobs seems to be picked up from the queue sequentially and there could be many jobs and tenants, would we run into a problem where there could be a ton of transactions queued and they'd only be processed sequentially so a particular tenant could see huge delays getting their transactions in?

I suggest checking transactional outbox pattern which we already implement. I don't think there will be a delay problem for tenants.

Okay, I'll search the forums and docs, if you have a direct link great.

A bigger concern is the fact that creating a bunch of httpclients to make the outgoing requests to the remote backends could cause resource exhaustion. In the past I've used an httpclient in DI to make the requests, however there's a problem here, and that is that each tenant will configure via settings management their remote backend url, these are different servers (but all the same software so contracts are the same).

I fail to understand the usage of http requests in here. Since you are in distributed system, why not using message broker (rabbitmq, kafka etc) async communication instead of http requests? Simply adapt for async communication over synced communication to prevent it from the begining.

I'm not currently on microservices but regardless, I'm sending requests to an external, remote, non-managed backend. For more clarity, we implement backend ERP systems, these have web api. These systems are administered by our clients. We will send data from our abp app to these remote systems, it must be through http :).

When the transaction is processed and send to the remote backend, the url will be different because they are different servers.

There are service locators (envoy, consul etc) for that. It's only job is to find the related service.

Each tenant will have different url to their remote backend server that we don't manage. We simply send the appropriate transactions via api. This abpp app will mostly be a multitenant integration platform.

To complicate matters most, the remote backend requires Login -> Receive SesssionID -> Then send this in the header of every subsequent request. In non multi-tenant implementations where its only one backend the application is sending these requests to, i simply use an interceptor to modify the header on the outgoing request.

No no no. You don't send any session id or something over the network for internal communication. If you want to use synched communication over http, it will be using Client Credential Flow grant type of OAuth2.0 without user credentials. Don't try to re-invent bicycle if it is about security and if your job is not creating bicycles for security.

Right, its not internal communication, and the remote systems only have one authentication mechanism, which is to send user and pass, receive a 30 min session id, and send this with subsequent requests.

In multi-tenant I assume the best thing to do would be to login -> send to redis cache for the tenant, and check this each time in the future when a request needs to go out and its for a particular tenant ID.

Multitenancy in ABP framework is very nicely abstracted and you can use with resolvers or a midware. You can check the source code.

I'm looking for any suggestion on how to accomplish this reliably without collapsing the application, keeping in mind that thousands of transactions can be posted in to the abp app, from different web carts, from different tenants.

The use of redis I mentioned here was intended to store the 30 min session id, and picking it up for requests that should go to the appropriate backend remote system, when it expires or is removed from cache (same right?) I'd have to login again to get a new session id and continue.

I would suggest leaning towards async messaging (eventbus over message broker) over synced messaging (http requests). Aso watching Mastering Chaos - A Netflix Guide to Microservices can give you ideas about how they solve millions of requests.

I know this is a loaded question. Just looking for direction to make the most of this framework using best practices.

You can also follow eShopOnAbp repository where we are building eShop application using Abp.

Thanks for the suggestions, I'll look up the netflix document. I started watching the eshoponabp repo since it was announced. I see a lot of action on it this last week.

Hi all, Thanks for the responses! Im subscribed to the thread but did not receive update over email so I missed your responses until now. I will clarify some parts here i noticed were not clear.

gterdem is the guide out?

Hi There! Can you share the error you're getting? As far as I know any service you create in your application project that ends in AppService is automatically exposed so you can consume it from your web project.

Hello David. I will send you a sample project that DevExpress has been fully implemented.

I'd love this project too :)

Hi,

Thanks for the feedback I'll take a look into it. I see the example is to user razor pages even though my project is implementing apis on the net core and the frontend on angular. Does that mean that the real base of abpio is to use the mvc deployment since some modules seem to rely on it? for example docs module doesnt seem to be available for angular

Should I just switch my entire project over to netcore with mvc to have the largest coverage?

Same problem if you upgrade existing solution to 4.0.1, angular client stays at gray screen and this can be seen in console.

Answer

Cli 4.0 and suite 4.0 Generate a brand new project, build project, add an entity in suite. services are correctly generated on the backend, however UI is not generated on the frontend. reviweing suite log I can see the path to the schemas has .suite\schematics.suite\schematics in it (its duplicated!!) if you generate the path structure inside it as its looking for, it runs and generates the UI. surely this is just a bug with the duplicate path?

example

2020-12-03 10:42:03.931 -05:00 [INF] Running the Angular Schematics command: npx "projectpathhere/angular/.suite/schematics/node_modules/.bin/ng" g ".suite/schematics/collection.json:entity" app-pro CustomerPortal "projectpathhere/aspnet-core/.suite/entities/Customer.json" 2020-12-03 10:42:07.601 -05:00 [INF] Angular Schematics command failed. Collection "projectpathhere\angular**\.suite\schematics\.suite\schematics**\node_modules\@abp\ng.schematics\collection.json" cannot be resolved.

Showing 51 to 60 of 63 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06