Which is better sockets/socketchannel why

which is better java.io.Socket / java.nio.channel.SocketChannel

Better for what? They both work. Sockets are simple but only support blocking operations. SocketChannels are about ten times as complex to use but they support non-blocking and multiplexed I/O and also various types of direct and mapped buffering so they can also imply less data movement.

Similar Messages

  • Which is better for User Managed Hot backup - running in cron or oracle scheduler

    We are taking hot backup in our environment by using sql script of just begin backup, host copy and end backup
    Can we use this script to be put in cron for weekly two times or to use oracle scheduler .
    Which is better option and why?

    The answer to your question depens on your condition. Do you have more experienced Unix admin or DBA?
    From my point of view cron is better becuase all you need is SQL*Plus utility and shell script:
    export ORACLE_SID=...
    sqlplus <username>/<password> as sysdba <<EOF
    ALTER TABLESPACE .. BEGIN BACKUP;
    host copy ..
    ALTER TABLESPACE .. END BACKUP;
    EXIT
    EOF

  • Which is better and why: Safari or Firefox?

    Which is better and why: Safari or Firefox?

    Thx, I've been using FF on my MacBook, as I did with PowerMacs before that. I used to work in the industry and stay up on current trends; but, I'm just a regular user with a new MacAir now and hate to bother my SF/SJ peeps with trivial questions.
    As I start to load up the Air, I'm just a bit overwhelmed with the volume of bookmarks I've collected and organzied in FF on my MB.

  • Why assertion instead of if statement ?  Which is better to use ?

    Why assertion instead of if statement ? Which is better to use ?

    Never assertion instead of if statement. The two have fundamentally different intents. Using assert to control program flow is a bad idea

  • Which is better and why a = new String("AA") or a = "AA"

    Hi,
    Which is better and why
    String a = new String("AA") or
    String a = "AA"
    Does invoking a construtor waste memory? Please explain in detail.
    Thanks in advance
    Deepak

    > So in case "AA" not there in string pool,
    That is not correct.
    does new creates "AA" on string pool as well as heap memory?Yes. The literal "AA" points to a pooled String object. The new operator creates a new String object with the same character sequence ("AA"). You can verify this with a little code...
    String s = new String("AA");
    assert s != "AA";
    assert s.equals("AA");
    assert s.intern() == "AA";~

  • In and EXISTS??which is better and why

    hi...
    Performance wise which is better IN or EXISTS and why..

    user8469486 wrote:
    hi...
    Performance wise which is better IN or EXISTS and why..DomBrooks pointed out that it may not matter due to query optimization rewrites.
    In theory it depends on circumstances.
    Correlated EXISTS subqueries tend to be efficient if the lookup is properly indexed. If the list of values is very small (especially if you only get one value) an IN subquery might be more efficient.

  • Hi friends , in mapping program ,which is better one.why? explain me.

    1)In mapping program ,which is better one.why? explain me.

    Actually the sequence is
    Graphical
    Java
    XSLT
    ABAP
    graphical mapping can prove to be the simplest of all mappings and easy to so also as u have a mapping editor and standard functions available.
    when this becomes too complex v generally opt for java / xslt mappings.
    when u are much comfortable with abap u may also opt for abap mapping.
    still the choice depends on scenario. performance wise graphical and java mappings have
    good results (also depends on ur code in java mapping).
    refer this:
    Comparing performance of mapping programs:
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs

  • In session and call tansaction methods, which is better . why?

    hi
    in session and call tansaction methods, which is better . why?

    see the link:
    <a href="http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/">batch inpunt VS call transaction</a>
    "The most important aspects of the session interface are:
    <b>Asynchronous processing</b>
    Transfer data for multiple transactions
    Synchronous database update. During processing, no transaction is started until the previous transaction has been written to the database.
    A batch input processing log is generated for each session
    Sessions cannot be generated in parallel. The batch input program must not open a session until it has closed the preceding session.
    The most important features of CALL TRANSACTION USING are:
    <b>Synchronous processing</b>
    Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called
    You can update the database both synchronously and asynchronously. The program specifies the update type.
    Separate LUW (Logical Units of Work) for the transaction. The system executes a database commit immediately before and after the CALL TRANSACTION USING statement.
    No batch input processing log"
    I hope I have been able to help you.
    cordial greetings.

  • Which is better? Photoshop CS6 or Elements? And why?

    Wife is an avid photographer and likes to be able to fix photos, make collages.  Confused on which is better, Photoshop CS6 (and what is Extended?) or Elements? What are the pros and cons of each? Thank you for your time.

    The Photoshop & Elements users hang out in those software forums.  You should post there.  This area is for MBP technical problems. 

  • Which is better for gaming and why?

    Hi,
    I was researching budget gaming laptops(around $1000, INR 55000) and came up with two choices.....
    1)HP Pavilion g6z-1d00 Notebook PC
    http://shopping2.hp.com/en_US/home-office/-/products/Laptops/HP-Pavilion/A2B39AV?HP-Pavilion-g6z-1d0...
    2)HP Envy 14-2130nr Notebook PC
    http://shopping2.hp.com/en_US/home-office/-/products/Laptops/HP-ENVY/QE295UA?HP-ENVY-14-2130nr-Noteb...
    Could anybody please tell me which is better for gaming (main purpose and best performance)?
    The HP Envy looks great but I don't know much about AMD Quad Core.....
    Also, is it possible to upgrade the graphics card on the HP Envy ( AMD Radeon 6630 to a better one) via a HP centre?
    It seems to run most games quite well, but I need it to be able to play new games for at least 4 years more (college), while not factoring in the costs for any possible graphics card upgrade....
    Please help!!

    Thanks Huffer _ very useful.
     I wasn't aware that there was a heat problem with the i7 processors, my dv8 runs at around 42 to 52 degrees, mind you I don't really put it under much load. I use it to play Blu-ray ISO files on my projector and for photo editing (Adobe CS4), it's an 820QM.
     I have also changed the thermal compound to ICDiamond and drilled holes in the speaker cover to improve air flow, that made a difference too.
     @ abhishekmaha
     Don't take my comment to seriously, although I think it has some truth to it, it was meant to poke a bit of fun at you. 
     Heat has always been one of the biggest factors when it comes to any computer, designers try to make them thinner, lighter and cheaper and those types don't work for gaming very well. They're OK for the occasional one, but not on a regular basis. I believe that if you game on any machine that was not meant for it, you will not get 4 years out of it _ 2 years.
     I wish I could tell you different, but I am not going to lie to you.
     Heat basically affects 3 things on a laptop, the solder that holds the components on the motherboard, any mechanical moving parts, eg the hard drive, fan _ and the battery. You can remove the battery to prolong its life when gaming.
     Heat breaks down the solder over time and the mother board simply stops working as far as the hard drive, it stops spinning because the tiny bearing(s) in there dry out and seize up.
     If you don't want to use a cooling mat then prop up the back of the laptop, hanging it over the edge of the table will expose the fan intake, but will block off other vents.
     60 degrees is a bit warm too, 50 is better or rather, the cooler the better. What ever machine you get, make a note of what the temps are when you first boot up and when it's hot. The idea is to get an average so you can judge when it is dangerously getting hot.
     P.S. Be sure and give Huffer a kudos too.

  • LDOM on ZFS - ZVOL or mkfile ... which is better ?

    Curious which approach is better for using LDOMs on ZFS ... Using a ZVOL specific to each LDOM or a mkfile in a ZFS file system specific to each LDOM ?
    Both can be snapped but curious which is the better approach and why.

    Hi all,
    I have searched everywhere and a lot of what I have seen helped men move forward piece by piece.
    I have a test LDom, that I have created replicating all the commands from the LDoms - Beginners Guide - http://www.sun.com/blueprints/0207/820-0832.pdf
    with the exception that I am using zfs in stead of ufs.
    I have setup the Jumpstart as follows:
    # zfs list
    NAME USED AVAIL REFER MOUNTPOINT
    ldpool 15.4G 90.9G 5.38G /ld
    ldpool/test 18K 90.9G 18K /ld/test
    # more net172_sun4v
    install_type initial_install
    system_type server
    client_arch sun4v
    pool test auto auto auto mirror C0d0s0
    When I do a: boot vnet1 - install, I get the following:
    {0} ok boot vnet1 - install
    Boot device: /virtual-devices@100/channel-devices@200/network@0 File and args:
    - install
    Requesting Internet Address for 0:14:4f:f8:e4:a0
    ++++++++++++
    It is just not going anywhere from there...
    Netstat on the jumpstart server shows a connection...
    Local Address Remote Address Swind Send-Q Rwind Recv-Q State
    svrk-unixadm01.nfsd test01.printer 50680 2399 49232 0 ESTABLISHED
    Active UNIX domain sockets
    Address Type Vnode Conn Local Addr Remote Addr
    600191b7ac0 stream-ord 60019977340 00000000 /var/run/zones/svruxtst-ecxcefe01.co
    nsole_sock
    600191b7c88 stream-ord 60019116d00 00000000 /var/run/.inetd.uds
    But this is just going on for ever....

  • Which is better??????

    which is better?Dam really confused which speaker to buy??
    i currently have a creative m2600.but am not getting enough performance or that feel while watching movies like avatar,step up 3 etc......so am planning to buy a 5.1.......not planning but i have decided to buy a 5.1....so..
    which is better? the 6160 or 6060 or 6100.
    which of these will provide me relly great exprience while playing games and most importantly while whatching hd movies and while listening to music.......
    and other than this what i have to ask is...what is this "db" in speakers. i mean while looking at a speaker specs we can see it..like 65db,85db,75db..etc........
    and when i compared specs of the three speakers i mentioned above i saw that the 6160 has low "db"........why is that?

    The specs is just a guide, you won't be able to tell the slight difference in db using just your ears. Besides, it is just a comparison between the level of a music to the level of background noise, it does not necessary mean which speaker sounds better. If possible, please make a trip to your local electronics store and try out the speakers system yourself.

  • Which is better software for brochures and PDF forms ? Photoshop or InDesign ?

    Which is better software for brochures and PDF forms ? Photoshop or InDesign ? and why ?

    If you are going to be making a lot of brochures, with photos, you probably want both. Photoshop to edit the photos, and InDesign to assemble and layout images with text.

  • Which is Better Mac or Windows?

    Which is Better Mac or Windows?
    I got told that Windows is better than Mac.
    I need to know:
    1. How long an iMac lasts and how long a Windows computer last till they die and not work. (Prediction will do)
    2. Why lots of people hate Mac and say that Mac's are crap.
    3. Is a iMac worth the cost?
    4. Is an iMac harder to use than a Windows computer?
    Thank You
    From Apple is The Best!!!!!!!

    The case of Apple v. Windows is a subjective argument. Both systems have their merits, both have some aspects that some users don't like. Much depends on what you actually want to use them for.
    Here is some reading material for you!
    A Customer Experience Index report from Forrester Research came to the conclusion after studying almost 4,600 computer users' experiences from 2008 and asking them to score the ease of use of their computers, how enjoyable the experience is and whether or not the systems fulfill their owners' needs.
    http://www.appleinsider.com/articles/09/04/17/apple_trumps_windows_pc_makers_in_ customer_experience_study.html
    PC World (December 2010) has also found Apple products and after-sales service the most reliable:
    http://www.pcworld.com/article/211074/the_tech_brands_you_can_trust.html
    Switching from Windows to Mac:
    http://support.apple.com/kb/HT2514?viewlocale=en_US
    and
    http://support.apple.com/kb/HT2518?viewlocale=en_US

  • Which is better at 3G

    Which is better 3g? at&t or verison

    "which is better, if, at school, 3G is non existant, and GPS is not an issue as all my cars have navigation?"
    Why not pay a consultant to answer your question then rather than relying on a 'free-bee' <g> or 'freebie' from good folk who sometimes and for some people really can't be bothered to help people when they can't put in the effort to help themselves (being polite and British and all, otherwise I might be prompted to say "I don't give a flying f* for your inability to sort things out for yourself").
    FYI, all apps work on 2.1 that worked on 1.0....
    Good luck (you might need it through life)!

Maybe you are looking for

  • I can no longer save illustrator files, please HELP?

    I have work saved on my mac that for some reason can no longer be saved as a illustrator file, to be honest there is quite a bit. I can save it a EPS or PDF but not Ai. Does anyone one have a solution for my problem? Or can i just save all work as EP

  • Enterprise Manager 11g

    Having a sporadic and unpredictable problem logging into OEM via web browser.The database is up and running not the problem, it's that sometime I can go to the OEM and login and sometimes I can't. I enter username and password and it will just sit th

  • Crawler - Refreshing Previously Imported Documents

    I checked the box in red below and it updated the MetaData for a pdf that the customer said was not updating. I then re-ran teh crawl. The document updated the meta data BUT IT ALSOso marked all the documents as updatedLWill this checkbox always caus

  • Can  Lock object  be created individually for any Database table?

    hi , On which tables can we crete lock objects? Please explain.

  • My buddy list wont show my buddies

    my buddy list will not show my buddies. I have no clue what happened because i was on ichat the other day and it was perfectly fine but today it has problems. Any answers to this?Thanks.