Any way to decrease connection number?

Hello;
I am programming an album site...The thumbnail images are called somewhere outside http because i dont want anyone to see others photos...so i call the photos with buffered file stream
in the photostream.jsp the images are drawed explained as above with servletoutputstream...
in the album.jsp the thumbnail images are included as <img src="photostreamjsp?photo_id=xx"> and there is max 16 thumbnail images shown on album.jsp
now the problem:the photostream.jsp included as 16 times and it makes 16 database connection...is this too much..?if it is too much how can i decrease it..?is there any way to store th images in an array?
Note:think that there is 100 users online and 1600 database query?
thank you

Hello;
I am programming an album site...The thumbnail images
are called somewhere outside http because i dont want
anyone to see others photos...so i call the photos
with buffered file stream
in the photostream.jsp the images are drawed
explained as above with servletoutputstream...
in the album.jsp the thumbnail images are included as
<img src="photostreamjsp?photo_id=xx"> and there is
max 16 thumbnail images shown on album.jsp
now the problem:the photostream.jsp included as 16
times and it makes 16 database connection...is this
too much..?This is where testing comes into play. Pre-optimization may be the root of all evil, but one should aspire to send all the data with the minimum amount of transactions and minimum amount of transfer data possible.
if it is too much how can i decrease
it..?is there any way to store th images in an
array?Have you looked at all into using a sql batches ?
>
Note:think that there is 100 users online and 1600
database query?That depends on a couple of things:
1) what are the chances that all of the uses will be hitting the database at the same time ?
2) How many concurrent connections can your database handle
3) How long are you users prepared to wait under the guide of "acceptable performance time"
4) Has any load testing been done and have any metrics been decided on as to what you consider acceptable performance ?
>
thank you

Similar Messages

  • Is there any way to decrease the time of backing up your iphone to icloud

    Is there any way to decrease the back up to iCloud time for iPhone s-says backup will take 140 hours

    How slow is your Internet connection? There's no way it should take that long if you have a reasonable connection.

  • Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    Is there any way to link page number with the reference page number within text in InDesign CC and CS6?

    You should ask in InDesign
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Is there any way I can connect my iPhone to my projector to demonstrate an app?

    Is there any way I can connect my iPhone to my projector to demonstrate an app?

    Yes, there are cables in the Apple Store that will send video to an external screen, but it depends on the app....3rd party apps may need to be written to allow video out...some mirror the iPhone screen and some only use the external - it depends on how the app works, etc.
    Start by getting a compatible cable.

  • Are there any ways to get sequence number other than getting it for each re

    are there any ways to get sequence number other than getting it for each record

    CACHE is the number of values Oracle stores in memory. So the first call to NEXTVAL Oracle grabs x numbers; subsequent calls to NEXTVAL are served from memory until they're all gone and them another bunch is grabbed. The attached sql*plus output demonstrates this behaviour.
    Note that normally unused numbers in the cache are returned to the data dictionary but in exceptional circumstances (DB crash) they may be lost.
    Cheers, APC
    SQL> create sequence seq cache 3
      2  /
    Sequence created.
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              1
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             1
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              4
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             2
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              4
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             3
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              4
    SQL> select seq.nextval from dual
      2  /
       NEXTVAL
             4
    SQL> select last_number from user_sequences
      2  where sequence_name = 'SEQ'
      3  /
    LAST_NUMBER
              7
    SQL>

  • Someone had my apple id password and bought a game from the App Store. I've changed my password but is there any way to find he number it was downloaded to?

    Someone had my apple id password and bought a game from the App Store. I've changed my password but is there any way to find he number it was downloaded to?

    Contact iTunes support

  • 10.3 - any way to throttle connection attempts?

    An elderly friend has a mac running 10.3 on an ADSL link. She's seeing many thousands of ssh login attempts per day, sufficient to eat significantly into her monthly download allowance (the isp charges for traffic, whether there is a successful connection or not). I'm wondering if there is any way to throttle connection attempts back? I.e. I know it is possible to set up iptables that way, but is there any front end for this, or does one have to build the iptables by hand?

    Thanks Clea; I hadn't realised OSX didn't use iptables.
    Yes, she does need to allow ssh connections (I use ssh to maintain her machine, from a distance of about 10,000 km - not always easy). Of course, this means that I can't risk anything that might disable the ssh connection, since I then wouldn't be able to recover it.
    I need to explain that security isn't an issue - the ssh setup is secure, and no attempted breakins have succeeded (only one account is accessible by ssh, and that one has a very secure password). The problem is purely the bandwidth that is being used by the unsuccessful login attempts: I'd like to find a way to simply drop these illicit connection attempts at the firewall (which means they will cost just the 80B or so of the initial connection message) rather than, as now, refuse the ssh connection (which typically costs 2K-4K because of the handshaking that goes on). With 10K illicit connection attempts per day now becoming typical on this network, that's a very substantial bandwidth saving.
    Changing the ssh port might do the job, but it looks like a fair amount of work. I'll try it on the weekend.

  • Is there any way to limit the number of Threads running in Application(JVM)

    Hello all,
    is there any way to limit the number of Threads running in Application(JVM)?
    how to ensure that only 100 Threads are running in an Application?
    Thanks
    Mohamed Javeed

    You should definitely use a thread pool for this. You can specify maximum number of threads that can be run. Be note that the thread pool will only limit the number of threads that are submitted to it. So donot call "Thread"s start() method to start thread on your own. Submit it to the pool. To know more, study about executor service and thread pool creation. Actually it will not be more than 20 line code for a class and you might need maximum of 2 such classes, one for threadPool and other one for rejection handler (if you want).
    Just choose the queue used carefully, you just have to pass it as a parameter to the pool.
    You should use "Bounded" queue for limiting threads, but also be careful in using queues like SynchronizedQueue as the queue will execute immediately the threads submitted to it if maximum number of threads have not been running. Otherwise it will reject it and you should use rejection handler. So if your pool has a synchronized queue of size 100, if you submit 101th thread, it will be rejected and is not executed.
    If you want some kind of waiting mechanism, use something like LinkedBlockingQueue. What this will do is even if you want 100 threads, you can specify the queue's size to be 1000, so that you can submit 1000 threads, only 100 will run at a time and the remaining will wait in the queue. They will be executed when each thread already executing will complete. Rejection occurs only when the queue oveflows.

  • Any way to use connection for Ethernet if wifi not available?

    Going to place where there is only wired connection. Is there any way I can connect to Internet from my iPad?

    I use a Virgin mobile MiFi which allows upto 5 wireless connections which is basically a Sprint data access for no contract $50.00 /month fee unlimited, lower prices for limited duration/packet charges.
    A major decision when purchasing iPad mini WiFi-only vs Cell enable locked to AT&amp;T (yes I know, but have an iPhone already with them).

  • My iphone is stolen .. is there any way to know the numbe of the person going to use in the future .. I have the serial no. and every thing .. and it is registered under my name and my information with iTunes ??

    my iphone is stolen .. is there any way to know the numbe of the person going to use in the future .. I have the serial no. and every thing .. and it is registered under my name and my information with iTunes ??

    If you had find my iphone activated on the iphone itself before it was stolen, then you may be able to track it.
    Otherwise, there is nothing you can do.
    Sorry.
    Report it to the police and your wireless carrier and change your password.

  • Any way to find serial number from find my iphone

    Any way to find serial number from find my iphone?
    We have about 2 dozen or so devices out in the field but I just got notice that a new iCloud account was added to a device registered for my company. The name is unknown to any of us in IT and Find My iPhone reveals that it is at a strange location. Any way to find out WHICH device it is, besides "David's iPad"? And if you have an iPad2 would it say, "iPad 2?" or still iPad?

    Any way to find serial number from find my iphone?
    No.
    And if you have an iPad2 would it say, "iPad 2?" or still iPad?
    It would say whatever the device has been named as by the person who set it up.

  • Any way to decrease file size of imported AVCHD clips?

    Since I got my AVCHD camera I've pretty much eaten up all the space on my HD because of the way iMovie converts the files to a format that takes up like 15 times more space.
    I do have some of my lesser-used footage on an external HD, but my Time Machine backup is also starting to get full and I need to find a solution for the clips that I don't want to erase, but don't need to store in the full HD format. Is there any way to compress or otherwise decrease the file size of an imported clip? I always import in the highest quality possible to evaluate, and then choose clips I only want to keep in a lower resolution.
    Thanks in advance for suggestions.

    Your AVCHD files are highly compressed. During import to iMovie they must be expanded to an editable format (AIC) which increases the file size.
    The only way to "compress" these files is an export. An export from iMovie would "render" any effects, transitions or text making these items un-editable in the future. You could export your "raw" footage but this could also lead to problems in future imports.
    Newer external drives could be partitioned for use with iMovie storage and your Time Machine files. You can also probably connect your current external giving you even more storage.

  • Is there any way to limit the number of RFC calls from xMII to SAP R/3

    Hi All!
    I wanted to know whether the number of simultaneous RFC connections made from xMII to SAP R/3 system can be controlled in any way. Suppose we have a scenario wherein some million Sales Orders or Production Orders are to be updated in SAP R/3 from xMII in a short span of time. For all these updations to take place, multiple RFC calls will be established from xMII to SAP at the same time. This will increase the load on the SAP R/3 system and affect performance of the SAP R/3 system. Is there any check on xMII side to limit the number of RFC calls that can be made to SAP R/3 system?
    Regards
    Anupam

    Anupam,
    If you are using 11.5 just keep in mind that the JCO connection points to a single application server (based upon the SAP Server alias connection settings), but the traffic itself to make a BAPI request is effectively the same as any client user traffic.  There will obviously be limitations on performance and throughput, with network and server constraints added to the number and size of the R/3 requests, but there is no magic formula to plug-in because of all of these variables.
    If you are using 12.0 (or plan to migrate when it goes GA) then taking advantage of the JRA (java resource adapter) and the associated application server pooling that it offers on the NetWeaver side of things will greatly help you in the throughput capacity.
    If you have put some of your xMII application into either test or productive use and are running into issues then I would highly recommend entering the specifics into the customer / partner support portal so that they can help you through any associated problems.
    Regards,
    Jeremy Good

  • Is there any way to generate random number in CPO

    Requirement : -
    > I want  to generate a random number from set of 1-9 numbers .is there any way in cpo ?
    Thanks
    Siva

    I created a process that uses 3 steps, all of which happen inside the engine rather than having to span out to a script, so it runs a lot faster.
    Technically, it's pseudo-random...
    Predefine Output Variable "Random Number" as type "Numeric"
    Step 1:  Format Date
      Format string: fffffff 
        (that's seven lower-case letters "f")
      Original date: [Process.Start Time]
    Step 2: Format Date
      Format string: ff\0\0\0\0\0
      Original date: [Process Start Time]
    Step 3: Set Variable
      Variable to update: [Process.Variables.Output.Random Number]
      New value: ([Workflow.Format Date.Formatted Date]-[Workflow.Format Date (2).Formatted Date])/100000
    This returns a basically random number between 0 and 1 (so you can mulitply it by your maximum value) based on the numeric fraction of a second of the start time of the process.

  • Is there any way to limit the number of times that a PDF can be opened?

    I run a small publishing company and we want to provide exam copies of our books to professors.  At present our exam copies have the words EXAM COPY as a water mark on every page and we've also made the files so that they can't be printed or easily copied.  However, we'd like to also restrict these PDFs so that they can only be opened 5 times.  I've read about FileOpen but that approach seems a bit more complex than needed.  Is there any other way to restrict the number of times that a PDF file can be opened once it is downloaded?  Thanks in advance for any suggestions.

    DRM soltions like FileOpen are your best bet for PDFs. Others include Adobe's LiveCycle Rights Managment, LockLizard, Armjisoft PDF Security OwnerGuard, etc.
    They all work and are priced differently, but there's really nothing for what you want to do that is both simpler and secure.

Maybe you are looking for