Closed kelpisland closed 8 years ago
I started taking a look at this last night.
Much of the load time mentioned in point 8 seems to be from the API itself.
I ran a test with siege, as follows:
siege http:\/\/www.bclaws.ca\/civix\/index\/tree\/statreg --time=1H -l --delay=30 -c 5
My end results looked like this:
Transactions: 1056 hits
Availability: 100.00 %
Elapsed time: 3599.03 secs
Data transferred: 1191.98 MB
Response time: 2.03 secs
Transaction rate: 0.29 trans/sec
Throughput: 0.33 MB/sec
Concurrency: 0.59
Successful transactions: 1056
Failed transactions: 0
Longest transaction: 6.40
Shortest transaction: 0.96
I'd like to do some testing with apache benchmark, as it provides nice graphical output for this sort of thing.
Responses times from the API seem to vary quite a lot, looking at the terminal output from my siege, and I think this warrants a further look!
Ok, I ran another short test with Apache Jmeter
I ran a test with 5 test users, starting a second apart, and stopped the test a little after a minute.
Here's a quick graph of the latency:
Bearing in mind, this is just a GET request to http://www.bclaws.ca/civix/index/tree/statreg
I've attached my Test Plan from jmeter here, BC Laws Users.jmx.zip, so you can run the same test if you like.
I'd love to have some conversation about this with someone working on it, is that possible?
Hi Willwh,
I would be happy to answer any questions you have. Let's keep the dialogue on here for all participants to see.
Thanks Willwh,
Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
Hi Alex, Absolutely! So looking at this without considering the client side, can we do anything about the response times and data format returned by this endpoint: http://www.bclaws.ca/civix/index/tree/statreg?
Maybe you could answer the following:
Lastly - is there a repository available with the current implementation that you could publish?
Even if this were just the required libraries, and a sample page wiring things up, I think getting that together would allow others to take a look at this more easily.
I'm definitely not a front end performance expert (which is why my questions are mostly about the back end) - but I think providing the current code implementation for people to poke at with performance tools would make sense. (e.g. Profilng Javascript Performance)
My suspicion here is that XML might just be the wrong choice, in terms of the response body, and also using dhtmlxtree.js, but I would need to do some more digging on this first.
Wow, this turned out much longer I expected.
Thanks for chiming in!!
Just thinking maybe I have not been terribly clear.
I think there are 2 issues we need to solve here:
Hi Willwh,
Yes we can provide JSON. We will implement this change and update the API documentation accordingly.
Thanks Willwh, Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
Great :) About my other question, re: server side caching, is there anything we can do there? :)
BC Developer's Exchange test is now complete. Thanks to all for participating.
Thanks everyone, Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
Hi everyone,
We are looking into the server side performance. We will post back with results/changes.
Thanks everyone, Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
Hello everyone,
Please let me know if you have any technical questions regarding this project. I would be happy to answer your questions or to hand them off to someone who can.
Thanks,
Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
What are the requirements for the server side? Do developers need to sign an NDA to get access to the server side code?
I am also interested in what would be required to work on the server/client software. In an ideal situation we would run all of this as a copy on our machines to get the data working exactly the way you want then you could take pull requests for each project respectively.
Hi everyone,
The solution to this task should be completed without server side changes. Our public facing API provides access to the full source XML used to create the tree.
For example, the Legislative Catalogue found here: http://www.bclaws.ca/civix/content/lc/?xsl=/templates/browse.xsl
By removing the query variables you can see a listing of each index in this aspect: http://www.bclaws.ca/civix/content/lc/
You can then call the API for each /root/index/CIVIX_DOCUMENT_ID: http://www.bclaws.ca/civix/index/tree/{CIVIX_DOCUMENT_ID} e.g. http://www.bclaws.ca/civix/index/tree/statreg http://www.bclaws.ca/civix/index/tree/psl etc...
And build your favorites tree from the combined xml.
Thanks, Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
@AlexStrudwick Any updates on JSON output of the data?
@willwh
Sorry nothing yet. I should be able to get something to you by the end of next week.
Thanks, Alex Strudwick Supervisor, Information Systems and Application Development Queen's Printer, Digital Publishing Shared Services BC | Technology, Innovation and Citizens' Services 563 Superior St, Victoria BC V8W 9V7
@AlexStrudwick sounds great :)
My one concern with the performance portion of this ticket is still the API response times.... re: my initial notes in this issue. I wonder if anything can be done there?
@willwh
We are working on that as we speak.
I'm taking a look at it.
This issue has gone stagnant and will be closed.
Story:
As a product owner I have discovered that the favourites tree is not working correctly as there is a threshold after which the favourites content tree becomes non-functional.
Additional detail:
Goto: http://www.bclaws.ca/civix/content/complete/statreg/?xsl=/templates/browse.xsl and click on Favourites. As a “Content Distributor” the user may already have a favourites tree but when they point a lot of content at it (Goto: http://www.bclaws.ca/civix/content/arch_oic/arc_oic/?xsl=/templates/browse.xsl) the content tree becomes overwhelmed; so as an interim solution it was removed. So it’s not so much that the piece of work is adding documents, this is done through the application layer and consumed through the API interface, but that as I add documents the trees performance degrades to an unacceptable level.
Acceptance criteria:
How to contribute
We will evaluate each pull request and choose the best solution to the issue based on the acceptance criteria. Submit the best solution and you could be paid $1000.
More than one pull request may be considered for payment on this issue.
Please read the Contribution Guidelines for the Terms that set the rules for participation in a Pay for Pull, including how you’ll get paid if you are successful.
Have questions? Please post your questions in the comments section below this issue.
And check out our Partners page for more information on our work.