15,913,027 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by yong2579 (Top 2 by date)
yong2579
6-Aug-14 21:16pm
View
Hmm pardon me but for summary point 1, if I were to implement a possible solution, do you mean something like:
Original Scenario:
At [WebApp], invoke [Assembly1]InvoiceHelper.Post
At [Assembly1], invoke [WCF]new InvoiceServiceClient().Post
At [WCF], invoke [Assembly1]InvoiceMgr.PostLocal
Possible Solution:
At [WebApp], invoke [Assembly1]InvoiceHelper.Post
At [Assembly1], invoke [Assembly2]RemoteHelper.Post
At [Assembly2], invoke [WCF]new InvoiceServiceClient().Post
At [WCF], invoke [Assembly1]InvoiceMgr.PostLocal
yong2579
6-Aug-14 0:27am
View
Hello Kieth, sincerely appreciate your time to help out here and massive thanks for your proposed solution. In a nutshell I understand these are what you are proposing:
1) Rather than helper to call manager that contains data access codes, have helper to call manager which in turn call data access objects (DAO) within DAL to make changes to the database.
2) Rather than posting immediately, setup some queue mechanism so that another thread which poll this queue and do the posting by itself.
3) Rather than posting one by one, batch up invoices and do a single post (E.g. InvoiceMgr.PostForeign(invoices);)
Hmm I do have some comments for each of the points:
1) Actually within InvoiceMgr.Post, it's calling a 3rd party integration API to process the provided invoice. Through profiling, I know this API is making lots of retrieval and some insertion/updating of data for each post operation. (E.g. IntegratorAPI.Post(invoice);)
2) The queue strategy looks feasible but this will impact the system on how invoices are posted. Example, a new invoice status "Pending Post" needs to be introduced and invoice having this status needs to have certain controls disabled while it's waiting to be posted.
The bad news is the web application is not within our control as it is done by another vendor. They hire us to build this posting mechanism via InvoiceHelper.Post
I think while it looks good, the additional cost to change the web application may not be too acceptable by them.
3) For posting by batch, it's doesn't quite solve the situation as a single invoice already take 2-3 minutes via the API.
Hmm I think I'm still kind of stuck in the situation, do you have another advices? Thanks!