Nakataa Kokuyo

Ranch Hand
+ Follow
since Jul 24, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
33
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Nakataa Kokuyo

Tim Holloway wrote:Network latency is something that you need to take up with your network administrator. Since most networks run gigabit or faster rates in-house these days, actually transferring 5-10MB shouldn't be an unreasonable delay. Heck, these days, just ordinary web page viewing can easily suck down that much data for each and every desktop in the shop*. Which is a sad commentary on most websites, but nonetheless true.

But if you are repeatedly constructing the document from scratch, THAT can hurt. It can take a relatively long time to assemble a PDF or image from scratch, so avoid doing that. Especially if multiple requesters are demanding the CPU at the same time to create the same thing at the same time. Create it once and then cache it. There are all sorts of cache mechanisms available, both for in-memory caching and online storage caching. For good measure, make sure that your document response requests client-side caching as well.

---
* I just did a quick check of a typical Ranch page. 1.58MB for the one page. Fortunately, a lot of it is client cached.



Thanks Tim and all,
very good point, i need to explore on caching mechanism, currently if 1000 users access to same content 5mb pdf (it was converted from powerpoint slides,it contains images and text), the system just halt due to network unable to cater 5GB bandwidth (5mb x 1000), hence the tomcat system require to restart to release the connections.
9 months ago
Thanks Stephan and Tim for your warm replies.

The root cause is network latency, while we requesting infrastructure upgrade (normally it take long time).

Is it possible for us to limit maximum user to access the same file concurrently? how possible the code handle in this situation.

Thanks again.
9 months ago

Stephan van Hulst wrote:First, you need to perform a stress test on your application, and profile it to see which part of it is causing the delay. There is no point in reducing the file size if the delay is caused by something unrelated.

Regardless, if your problem IS caused by a combination of file size and number of concurrent requests, a first step might be to try a higher compression ratio for your PDF. There is a limit to how much you can compress data before it becomes lossy though.

Finally, it might just be an issue of server resources or limited bandwidth. If you can't host your file in the cloud, then you must invest money to scale up network and server capabilities.

Note that hosting in the cloud does not necessarily mean hosting your file on a CDN without any form of protection. You can write a small application that does nothing more than authenticate a user, and then serve the file. The application can then be hosted in the cloud, and redirected to from your legacy application.



Thanks a lot Stephan, very detail.

For file compression, would it advisable to convert to jpg instead, the size and quality would it better than compressed pdf.

Thanks again!!
9 months ago
Good day,

I'm working on legacy portal , which allow users to access and view the activity announcement, the announcement portion was structure in the way from landing page (image - 1mb file size). When user click on the image, it will show the pdf file(multiple pages, mostly powerpoint slide conversion).

Each pdf file size could reach out nearly 5-10mb, the performance turn horrible or sometimes server halt due to concurrent users access to the same information or pdf content.

This application serving few hundred users, users can access at the same time when activity announced, and developed under struts framework.

My intention is to fine tune this legacy application, and seeking Guru advice what is the best approach to improve this concern especially in situation to handle file size reduction or better approach to handle this kind of announcement activity .


PS : CDN is not allow due to confidential content

Many thanks for your advice!
9 months ago
Thanks Jelle Klap for the guidance, will certainly look into it
Thanks Bill, I certainly miss out this
9 years ago
Thanks a million K. Tsang and Ulf Dittmer for the warm replies, it really help !

for the front end, is that possible we can make tenant have their own URL rather than append general URL with tenantID ? for instance, www.hosptal-1.com for tenant1, and www.hospital-2.com for tenant2
9 years ago
Sorry for misunderstanding and bad language

Assume this is an online healthcare application, each hospital setup their own information like product or services which going to publish to public, and can be done under an URL say www.e-care.com, which is also treat as back-end office application.

however, on user interface side, it will have separate URL to show their UI page, public can go though URL like www.hospital1.com to view their hospital-1 information, and www.hospital2.com to view hospital-2 information. but internally, those information are captured and entered under one back-end system, in this case www.e-care.com.

Question :

1. Can we build or is it make sense to have application to behave this as above mentioned (back-end in one application, front-end in another URL) ?
2. Should i achieve this under web hosting or cloud base in term of infrastructure setup ?
3. In term of software design, how to design such application especially data display(user interface, configuration, etc) base on user login in effective way?
4. this is licensed base application, it allow multiple user login for the same instance, for instance, Hospital-1 might have 10 users to login to www.e-care.com for back-end administrative and view the same page.
5. How to make sure user do not misuse the login and ensure with security?
6. Is there a better alternative ?

Thanks in advance for enlightenment !
9 years ago
Good day,

Appreciated someone can enlighten me with the idea of how we can turn the application to licensing and cloud base.

By depending on user login, user will direct to different instance of the application with respective data showing.

just like how salesforce.com react

Thanks in advance!
9 years ago
Good day,

I'm new in ANT, I'm about creating a build.xml for my deployment, and current task that i working on is about do zip file from respective folder.

I want to zip all the file under c:\myproject_folder\xml , but how come i can't use ${xml.dir} in includes tag ? if i remove it and place includes="xml/**", it works! , can anyone please enlighten me on this? thanks in advance!

9 years ago
Thanks Tim,

We can also run the ftp and login to linux task from ANT too ? my understanding is that ANT is for most build task, maven is more on project initialze too even it can run the ANT script as well.

Do i need to use ANT script to trigger shell script from window system?
9 years ago
Good day,

I'm using window 8 OS and new in linux, would like seek for your advice how to handle below task with script, thanks ahead for the guidance!

1. Checkout latest code from svn (window)
2. Zip related file(window) and transfer it to linux (window ftp)
3. Copy the zip file and build the .jar file (linux)
4. Stop current process and replace the latest .jar file which was build (linux)
5. Start the application (linux)

May i know how i can achieve these and what script expecting to learn from my end?

thank you !
9 years ago
Hi K. Tsang,

there are two ways user can trigger the file generation - manual or auto.

Both approach will trigger from web UI, for manual, user can download the file and allow to upload it into different environment at anytime.
for auto, user trigger the file generation process from web UI and the generated file will transfer over via FTP to other environment instantly.

the file size checksum is to ensure the content is not being modify by the user.

9 years ago
Thanks K. Tsang, that's sound a better idea on using modified date !

Between, After the file generation, it will drop into a unix folder and then move into DB, it suppose not interfere by the user, management want to ensure security.

regards the implementation, if possible could you please shed some light on this too ?

9 years ago