Tuesday, September 04, 2012

VirtualBox VM manager command line


C:\Program Files\Oracle\VirtualBox>VBoxManage.exe
Oracle VM VirtualBox Command Line Management Interface Version 4.1.20
(C) 2005-2012 Oracle Corporation
All rights reserved.

Usage:

VBoxManage [-v|--version]    print version number and exit
VBoxManage [-q|--nologo] ... suppress the logo

VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|
                            bridgedifs|hostonlyifs|dhcpservers|hostinfo|
                            hostcpuids|hddbackends|hdds|dvds|floppies|
                            usbhost|usbfilters|systemproperties|extpacks

VBoxManage showvminfo       | [--details]
                            [--machinereadable]
VBoxManage showvminfo       | --log

VBoxManage registervm      

VBoxManage unregistervm     | [--delete]

VBoxManage createvm         --name
                            [--ostype ]
                            [--register]
                            [--basefolder ]
                            [--uuid ]

VBoxManage modifyvm        
                            [--name ]
                            [--ostype ]
                            [--memory ]
                            [--pagefusion on|off]
                            [--vram ]
                            [--acpi on|off]
                            [--pciattach 03:04.0]
                            [--pciattach 03:04.0@02:01.0]
                            [--pcidetach 03:04.0]
                            [--ioapic on|off]
                            [--pae on|off]
                            [--hpet on|off]
                            [--hwvirtex on|off]
                            [--hwvirtexexcl on|off]
                            [--nestedpaging on|off]
                            [--largepages on|off]
                            [--vtxvpid on|off]
                            [--synthcpu on|off]
                            [--cpuidset ]
                            [--cpuidremove ]
                            [--cpuidremoveall]
                            [--hardwareuuid ]
                            [--cpus ]
                            [--cpuhotplug on|off]
                            [--plugcpu ]
                            [--unplugcpu ]
                            [--cpuexecutioncap <1 -100="-100">]
                            [--rtcuseutc on|off]
                            [--monitorcount ]
                            [--accelerate3d on|off]
                            [--accelerate2dvideo on|off]
                            [--firmware bios|efi|efi32|efi64]
                            [--chipset ich9|piix3]
                            [--bioslogofadein on|off]
                            [--bioslogofadeout on|off]
                            [--bioslogodisplaytime ]
                            [--bioslogoimagepath ]
                            [--biosbootmenu disabled|menuonly|messageandmenu]
                            [--biossystemtimeoffset ]
                            [--biospxedebug on|off]
                            [--boot<1 -4="-4"> none|floppy|dvd|disk|net>]
                            [--nic<1 -n="-n"> none|null|nat|bridged|intnet|hostonly|
                                        generic]
                            [--nictype<1 -n="-n"> Am79C970A|Am79C973|
                                            82540EM|82543GC|82545EM|
                                            virtio]
                            [--cableconnected<1 -n="-n"> on|off]
                            [--nictrace<1 -n="-n"> on|off]
                            [--nictracefile<1 -n="-n"> ]
                            [--nicproperty<1 -n="-n"> name=[value]]
                            [--nicspeed<1 -n="-n"> ]
                            [--nicbootprio<1 -n="-n"> ]
                            [--nicpromisc<1 -n="-n"> deny|allow-vms|allow-all]
                            [--nicbandwidthgroup<1 -n="-n"> none|]
                            [--bridgeadapter<1 -n="-n"> none|]
                            [--hostonlyadapter<1 -n="-n"> none|]
                            [--intnet<1 -n="-n"> ]
                            [--natnet<1 -n="-n"> |default]
                            [--nicgenericdrv<1 -n="-n">
                            [--natsettings<1 -n="-n"> [],[],
                                                [],[],
                                                []]
                            [--natpf<1 -n="-n"> [],tcp|udp,[],
                                          ,[],]
                            [--natpf<1 -n="-n"> delete ]
                            [--nattftpprefix<1 -n="-n"> ]
                            [--nattftpfile<1 -n="-n"> ]
                            [--nattftpserver<1 -n="-n"> ]
                            [--natbindip<1 -n="-n">
                            [--natdnspassdomain<1 -n="-n"> on|off]
                            [--natdnsproxy<1 -n="-n"> on|off]
                            [--natdnshostresolver<1 -n="-n"> on|off]
                            [--nataliasmode<1 -n="-n"> default|[log],[proxyonly],
                                                         [sameports]]
                            [--macaddress<1 -n="-n"> auto|]
                            [--mouse ps2|usb|usbtablet
                            [--keyboard ps2|usb
                            [--uart<1 -n="-n"> off| ]
                            [--uartmode<1 -n="-n"> disconnected|
                                             server |
                                             client |
                                             file |
                                             ]
                            [--guestmemoryballoon ]
                            [--gueststatisticsinterval ]
                            [--audio none|null|dsound]
                            [--audiocontroller ac97|hda|sb16]
                            [--clipboard disabled|hosttoguest|guesttohost|
                                         bidirectional]
                            [--vrde on|off]
                            [--vrdeextpack default|
                            [--vrdeproperty ]
                            [--vrdeport ]
                            [--vrdeaddress ]
                            [--vrdeauthtype null|external|guest]
                            [--vrdeauthlibrary default|
                            [--vrdemulticon on|off]
                            [--vrdereusecon on|off]
                            [--vrdevideochannel on|off]
                            [--vrdevideochannelquality ]
                            [--usb on|off]
                            [--usbehci on|off]
                            [--snapshotfolder default|]
                            [--teleporter on|off]
                            [--teleporterport ]
                            [--teleporteraddress

                            [--teleporterpassword ]
                            [--teleporterpasswordfile  |stdin]
                            [--usbcardreader on|off]

VBoxManage clonevm          |
                            [--snapshot |]
                            [--mode machine|machineandchildren|all]
                            [--options link|keepallmacs|keepnatmacs|
                                       keepdisknames]
                            [--name ]
                            [--basefolder ]
                            [--uuid ]
                            [--register]

VBoxManage import          
                            [--dry-run|-n]
                            [--options keepallmacs|keepnatmacs]
                            [more options]
                            (run with -n to have options displayed
                             for a particular OVF)

VBoxManage export           --output|-o
                            [--legacy09]
                            [--manifest]
                            [--vsys ]
                                    [--product ]
                                    [--producturl ]
                                    [--vendor ]
                                    [--vendorurl ]
                                    [--version ]
                                    [--eula ]
                                    [--eulafile ]

VBoxManage startvm          |...
                            [--type gui|sdl|headless]

VBoxManage controlvm        |
                            pause|resume|reset|poweroff|savestate|
                            acpipowerbutton|acpisleepbutton|
                            keyboardputscancode [ ...]|
                            setlinkstate<1 -n="-n"> on|off |
                            nic<1 -n="-n"> null|nat|bridged|intnet|hostonly|generic
                                     [] |
                            nictrace<1 -n="-n"> on|off
                            nictracefile<1 -n="-n">
                            nicproperty<1 -n="-n"> name=[value]
                            natpf<1 -n="-n"> [],tcp|udp,[],
                                          ,[],
                            natpf<1 -n="-n"> delete
                            guestmemoryballoon ]
                            gueststatisticsinterval ]
                            usbattach |
|

                            usbdetach |
|

                            vrde on|off |
                            vrdeport |
                            vrdeproperty |
                            vrdevideochannelquality
                            setvideomodehint [display] |
                            screenshotpng [display] |
                            setcredentials
                                           [--allowlocallogon ] |
                            teleport --host --port
                                   [--maxdowntime ] [--password password]
                            plugcpu
                            unplugcpu
                            cpuexecutioncap <1 -100="-100">

VBoxManage discardstate     |

VBoxManage adoptstate       |

VBoxManage snapshot         |
                            take [--description ] [--pause] |
                            delete | |
                            restore | |
                            restorecurrent |
                            edit ||--current
                                 [--name ]
                                 [--description ] |
                            list [--details|--machinereadable]
                            showvminfo |

VBoxManage closemedium      disk|dvd|floppy |
                            [--delete]

VBoxManage storageattach    
                            --storagectl
                            [--port ]
                            [--device ]
                            [--type dvddrive|hdd|fdd]
                            [--medium none|emptydrive|
                                      ||host:|iscsi]
                            [--mtype normal|writethrough|immutable|shareable|
                                     readonly|multiattach]
                            [--comment ]
                            [--setuuid ]
                            [--setparentuuid ]
                            [--passthrough on|off]
                            [--tempeject on|off]
                            [--nonrotational on|off]
                            [--bandwidthgroup ]
                            [--forceunmount]
                            [--server |]
                            [--target ]
                            [--tport ]
                            [--lun ]
                            [--encodedlun ]
                            [--username ]
                            [--password ]
                            [--intnet]

VBoxManage storagectl      
                            --name
                            [--add ide|sata|scsi|floppy|sas]
                            [--controller LSILogic|LSILogicSAS|BusLogic|
                                          IntelAHCI|PIIX3|PIIX4|ICH6|I82078]
                            [--sataideemulation<1 -4="-4"> <1 -30="-30">]
                            [--sataportcount <1 -30="-30">]
                            [--hostiocache on|off]
                            [--bootable on|off]
                            [--remove]

VBoxManage bandwidthctl    
                            --name
                            [--add disk|network]
                            [--limit
                            [--delete]

VBoxManage showhdinfo       |

VBoxManage createhd         --filename
                            --size |--sizebyte
                            [--format VDI|VMDK|VHD] (default: VDI)
                            [--variant Standard,Fixed,Split2G,Stream,ESX]

VBoxManage modifyhd         |
                            [--type normal|writethrough|immutable|shareable|
                                    readonly|multiattach]
                            [--autoreset on|off]
                            [--compact]
                            [--resize |--resizebyte ]

VBoxManage clonehd          | |
                            [--format VDI|VMDK|VHD|RAW|]
                            [--variant Standard,Fixed,Split2G,Stream,ESX]
                            [--existing]

VBoxManage convertfromraw  
                            [--format VDI|VMDK|VHD]
                            [--variant Standard,Fixed,Split2G,Stream,ESX]
                            [--uuid

VBoxManage getextradata     global||
                            |enumerate

VBoxManage setextradata     global||
                           
                            [] (no value deletes key)

VBoxManage setproperty      machinefolder default| |
                            vrdeauthlibrary default| |
                            websrvauthlibrary default|null| |
                            vrdeextpack null| |
                            loghistorycount

VBoxManage usbfilter        add
                            --target ||global
                            --name
                            --action ignore|hold (global filters only)
                            [--active yes|no] (yes)
                            [--vendorid ] (null)
                            [--productid ] (null)
                            [--revision ] (null)
                            [--manufacturer ] (null)
                            [--product ] (null)
                            [--remote yes|no] (null, VM filters only)
                            [--serialnumber ] (null)
                            [--maskedinterfaces ]

VBoxManage usbfilter        modify
                            --target ||global
                            [--name ]
                            [--action ignore|hold] (global filters only)
                            [--active yes|no]
                            [--vendorid |""]
                            [--productid |""]
                            [--revision |""]
                            [--manufacturer |""]
                            [--product |""]
                            [--remote yes|no] (null, VM filters only)
                            [--serialnumber |""]
                            [--maskedinterfaces ]

VBoxManage usbfilter        remove
                            --target ||global

VBoxManage sharedfolder     add |
                            --name --hostpath
                            [--transient] [--readonly] [--automount]

VBoxManage sharedfolder     remove |
                            --name [--transient]

VBoxManage guestproperty    get |
                            [--verbose]

VBoxManage guestproperty    set |
                            [ [--flags ]]

VBoxManage guestproperty    enumerate |
                            [--patterns ]

VBoxManage guestproperty    wait |
                            [--timeout ] [--fail-on-timeout]

VBoxManage guestcontrol     |
                            exec[ute]
                            --image
                            --username --password
                            [--dos2unix]
                            [--environment "= [=]"]
                            [--timeout ] [--unix2dos] [--verbose]
                            [--wait-exit] [--wait-stdout] [--wait-stderr]
                            [-- [] ... []]

                            copyfrom
                           
                            --username --password
                            [--dryrun] [--follow] [--recursive] [--verbose]

                            copyto|cp
                           
                            --username --password
                            [--dryrun] [--follow] [--recursive] [--verbose]

                            createdir[ectory]|mkdir|md
                           
                            --username --password
                            [--parents] [--mode ] [--verbose]

                            stat
                           
                            --username --password
                            [--verbose]

                            updateadditions
                            [--source ] [--verbose]

VBoxManage debugvm          |
                            dumpguestcore --filename |
                            info [args] |
                            injectnmi |
                            log [--release|--debug] ...|
                            logdest [--release|--debug] ...|
                            logflags [--release|--debug] ...|
                            osdetect |
                            osinfo |
                            getregisters [--cpu ] |all ... |
                            setregisters [--cpu ] = ... |
                            statistics [--reset] [--pattern ]
                            [--descriptions]

VBoxManage metrics          list [*|host| []]
                                                 (comma-separated)

VBoxManage metrics          setup
                            [--period ] (default: 1)
                            [--samples ] (default: 1)
                            [--list]
                            [*|host| []]

VBoxManage metrics          query [*|host| []]

VBoxManage metrics          enable
                            [--list]
                            [*|host| []]

VBoxManage metrics          disable
                            [--list]
                            [*|host| []]

VBoxManage metrics          collect
                            [--period ] (default: 1)
                            [--samples ] (default: 1)
                            [--list]
                            [--detach]
                            [*|host| []]

VBoxManage hostonlyif       ipconfig
                            [--dhcp |
                            --ip [--netmask (def: 255.255.255.0)] |
                            --ipv6 [--netmasklengthv6 (def: 64)]]
                            create |
                            remove

VBoxManage dhcpserver       add|modify --netname |
                                       --ifname
                            [--ip
                            --netmask
                            --lowerip
                            --upperip ]
                            [--enable | --disable]

VBoxManage dhcpserver       remove --netname |
                                   --ifname

VBoxManage extpack          install [--replace] |
                            uninstall [--force] |
                            cleanup

Tuesday, August 28, 2012

Oracle File/FTP adapter High Availability

Configure HA File/FTP adapter
http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm#BABCBIAH



  • Same physical Dir for cluster
  • Same shared control Dir
  • JCA settings:   MaxRaiseSize,  xa-set-transaction-timeout
  • Database table (SOAINFRA created)
  • eis/HAFileAdapter  for outbound connections pools
  • in/outBoundDataSource  jdbc/SOADataSource

  • Outbound Mutex:  outboundLockTypeForWrite 
    • memory  - in memory to synchronize the write
    • oracle - use DB sequence
    • db - non-Oracle Database schema, uses table (FILEADAPTER_MUTEX)_
    • user-defined: set new binding-properties to " "oracle.tip.adapter.file.mutex""
  • BPEL or mediator .jca file to use the eis/HAFileAdapter

Monday, August 27, 2012

WebLogic GridLink DataSource (10.3.5+) for RAC

WebLogic GridLink Datasource for RAC



http://docs.oracle.com/cd/E21764_01/web.1111/e13737/gridlink_datasources.htm#CHDIAGEF

Why GridLink?

  1. Fast failover leveraging ONS of RAC
  2. fast RAC disaster graceful response (planned, wait for TX finish;  non-planned, rollback)
        • manual rac shutdown 11.2- ends as non-planned
  3. runtime load-balance  
  4. one datasource configuration, no test on reserve needed
  5. SCAN address (single address for ONS and Listener, RAC nodes neutral)
  6. secure with Wallet
Configuration
  1. create GridLink Datasource
  2. connection properties:  WLS cluster style addresses for RAC
  3. configure ONS client connection
    • Fan enabled,  host:port
  4. secure with Wallet  
    • svr classpath
      • $MW_HOME/modules/com.oracle.osdt_cert_1.0.0.0.jar
      • $MW_HOME/modules/com.oracle.osdt_core_1.0.0.0.jar
      • $MW_HOME/modules/com.oracle.oraclepki_1.0.0.0.jar
    • Add wallet
  5. SDP for InfiniBand

Thursday, August 23, 2012

Install Windows 8 on virtualbox

Microsoft Windows 8 provide a modernized interface for the generation long operating system. I liked the consumer preview (CP) version. And so when the release preview (RP) is available, I tried it on the VirtualBox VM.  It was beautiful with some improvements from CP.

Overall, it is a pleasant, and provide us a sneak peek into Microsoft's mobile strategy.



Monday, March 05, 2012

Smart phone is hot, what about smart car?

Mobile is too hot to talking about next?


The mobile computing is boiling hot, white hot at this moment.  With Apple's capitalization surges over $500 billion, all the companies in technology are scramble to catch the mobile frenzy train. Products are debuting the market almost in a daily basis. It is an industry phenomenon, much like the DOT COM bubble in 2000, and house market in 2006.

Given the mobile computing is still churning under the boiling surface, then is it too early to talking about the next big thing in technology?

For mobile, there is pretty much a settled scene, with Apple leading with devices update each year. It is hard to imagine anything "revolutionary" as the iPad, iPhone, iPod trios.  It is now pretty much a routine job of Apple to renew is devices in a yearly basis, much like the PC industry does in the past 30 years. Further integration might happen in the living room, with the more advanced Apple TV like devices play within the OLED TV itself.

Other than that, where should we look for the excitement?

What's next big hit after mobile?


I saw the Car industry. For a device that people spend at least 20% or more of their  wake time, car is not as technologically advanced as it should be. At this moment, the technology within a car is very shabby, with Luxury cars carry such "boast-worthy" technology as Blue Tooth, Reverse camera, and DVD player. All these are far from integrated.

A smart car - really smart


It is time that cars getting a technology make up. With the latest mobile computing capability, it is now a non-luxury to have a car doing the following. With these functions, a car would be a killer application, and you can be assured to sell lots of cars!!

0. entertainment - sync and play my music, video etc from the car.
00. tracking where is my car from my iPhone (auto-reporting position of car)
1. up-to the minute traffic with GPS recommendations (android system?)
2. my trip information integration with Cloud and Google map
3. information of my surroundings, a wiki-like information mesh up based on where I am
4. alert of empty gas tank, together with when and where to fill the "best" tank of gas. (cheap, safe)
5. trip plan - plan ahead of my driving, and with my car monitor my plan progress.
6. car recommend to me Hotel, food, and rest areas according to my trip plan
7. alert of car maintenance
8. alert of my driving context: cross lane, too close to car, too fast, too slow, etc.
9. finger print based entry and start systems.
10. automatic settings based on driver height and stored in memory system.
11. new telecom service: 2sim -> 1phone#   integrated phone service, this requires that telecom company allow user to have more than two lines for one single phone number?



A computer with mobile OS (android?) as the Brain of the smart car
One way to make the car smart, is to install a brain to the car. This requires that the car not only has an on-board computer with the telecom service, but also that the software OS has to be retrofitted for the smart car usage.
1. wired to the steering wheel, door, entertainment system and lights
2. GPS
3. touch screen
4. telecom services
5. android based car OS
6. provide bluetooth
7. provide 802.11 links for in-car communication
8. siri or digital assistant on-board for interaction

With these features, the car will be truly smart and ready to drive!


A smart phone as the "Big Brain" of the Smart Car
Another "cheap" way is having the phone talking with the car computer, and let iPhone acting as the brain of the car.  And a car is just an app on the iPhone. There is great benefits for this.
1. take advantage of mature mobile devices technology
2. simplifying the architecture, and reduce cost to build a car.
3. the phone is mobile, so you save the potential telecom services cost, as you already paid your phone
4. conveniently locating where is my car?

The draw back is that the pairing of car and the iPhone may not have fast enough link. Nowadays, the blue-tooth speed is top at 700Kb/s. This means some application requires an extra 802.11 link on-board. Another issue is that different car may have different interface, but I am anticipating that each type of car has at least two apps available for iPhone and Android.



Tuesday, February 08, 2011

start/stop IdM components

OID / OVID / http: opmnctl startall

ODS - wls_ods1 directory services
OIdM - wls_soa1 Id manager
OAM - wls_oam1/2 access manager
OAAM - wls_oaam1/2 adaptive access manager
OIF - wls_oif1/2 id federation


Expanding the cluster?!

/u01/app/oracle/product/fmw/idm/bin/config.sh
> copy applications, set cluster/etc.

Monday, February 07, 2011

"Migrating WLS Policy and Credential Stores"


  • From IDMHOST1, start the wlst shell from the ORACLE_COMMON_HOME/common/bin directory. For example:

    ./wlst.sh 
  • Connect to the WebLogic Administration Server using the wlst connect command shown below.

    connect('AdminUser',"AdminUserPassword",t3://hostname:port') 

    For example:

    connect("weblogic,"welcome1","t3://idmhost-vip.mycompany.com:7001") 
  • Run the reassociateSecurityStore command as shown below:

    Syntax:

    reassociateSecurityStore(domain="domainName",admin="cn=orcladmin", password="orclPassword",ldapurl="ldap://LDAPHOST:LDAPPORT",servertype="OID", jpsroot="cn=jpsRootContainer")
  • Friday, January 07, 2011

    Digital media consumption and storage

    Where do store my media so I can
    1. access anywhere
    2. anytime
    3. secure
    4. share
    5. low cost
    6. speedy!
    7. easy!

    How can I consume my media scattered within Cloud so that
    1. locate
    2. search
    3. format
    4. stream
    5. seamlessly
    6. to my TV, handset, computer?

    Friday, August 27, 2010

    intuitive - future computing...

    If you think of lenovo thinkpad  or  apple products, you see that people pay premium for the last mile to gain intuitive.

    For thinkpad:  the thinkvantage is making finger-print so useful. My experience of FP with Dell is so horrible, that I almost think that it is a bad idea. Thank god that Lenovo changed the wrong perception.

    Dell:  finger-print for login only. It takes almost dozen steps before it is setup for fingerprint login. Then the whole process is so awkward, that I hate my login screen. Not mention that it takes so long to login with finger print, almost totally defeat the purpose of FP - simple, convenient and speed-up process.....

    With Lenovo, you just need to:
    1. run fingerprint from ThinkVantage (button);  done with fingerprint!!
    2. a client security solution created a hard-ware supported "password vault".
    if some 3rd party messed with your ThinkVantage, re-install TPM

    Monday, September 21, 2009

    smartphone market 5/2009

    - The iPhone OS had 8% of the smartphone market, but generated 43% of mobile Web requests and 65 percent of HTML usage.

    - The Android OS share of the smartphone market was less than 1%, but generated 3% of mobile Web requests and 9% of HTML usage.

    - The Symbian OS had 52% of the smartphone market, but generated only 36% of mobile Web usage and 7% of HTML usage.

    - Usage of mobile Web sites greatly out paces usage of HTML sites on smartphones running the Symbian and RIM Operating System (OS).

    - 24% of US requests were made over a Wi-Fi network. The top five Wi-Fi devices in terms of usage were the iPhone, iPod touch, Sony PSP, HTC Dream (G1), and HTC Dash.

    Saturday, September 19, 2009

    Bayeux protocol data structure

    /**/
    /* Bayeux protocol definition version 1.01, in language- */
    /* independent JSON form. */
    /* */
    /* GloriaJW 2008-01-03 */
    /* */
    /* This is a JSON dictionary of all Bayeux structures and their */
    /* possible values, vtypes and rtypes. */
    /* */
    /* The four value types (vtypes) are: */
    /* (1) Single Value from a Fixed list of values (SVF), */
    /* (2) Single Value which is Variable (SVV), */
    /* (3) Multiple Values from a Fixed list of values (MVF), */
    /* (4) Multiple Values which are Variable (MVV) */
    /* */
    /* These vtype fields begin with 'vtype_' and can be used as */
    /* visual aids, or assert() fixed and single/multiple value */
    /* checking. These fields are "advice" fields, not to be passed */
    /* in the bayeux protocol, but ONLY to be used for either */
    /* automated or manual evaluation of field values. */
    /* */
    /* The seven (optional) restriction types (rtypes) are: */
    /* (1) Sent from Client only (CZ) */
    /* (2) Sent from Server only (SZ) */
    /* (3) Sent from Client only, and only upon failure: (CE) */
    /* (4) Sent from Server only, and only upon failure: (SE) */
    /* (5) Sent from Client only, optional: (CO) */
    /* (6) Sent from Server only, optional: (SO) */
    /* (7) Optional in both directions: (BO) */
    /* */
    /* These rtype fields are optional, and only appear when there */
    /* is an applicable restriction on a field. They begin with */
    /* 'rtype_' and can be used as visual aids, or assert() */
    /* client/server and error checking. These fields are "advice" */
    /* fields, not to be passed in the bayeux protocol, but ONLY to */
    /* be used for either automated or manual evaluation of field */
    /* values. */
    /* */
    /**/
    {
    "handshake":{"channel":"/meta/handshake",
    "vtype_channel":"SVF",

    "version":"1.0.1",
    "vtype_version":"SVF",

    "supportedConnectionTypes":["iframe", "flash","callback-polling","long-polling"],
    "vtype_supportedConnectionTypes":"MVF",

    /* response only */
    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",
    "rtype_clientId":"SZ",

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE",

    /* optional */
    "minimumVersion":"1.0",
    "vtype_version":"SVF",
    "rtype_version":"BO",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO",

    /* optional, response only */
    "authSuccessful":["true","false"],
    "vtype_authSuccessful":"SVF",
    "rtype_authSuccessful":"SO",

    /* optional, response only */
    "advice":{"reconnect":["retry","handshake","none"],
    "vtype_reconect":"SVF",
    "rtype_reconect":"SO",

    "interval":[1000,-1000],
    "vtype_interval":"SVV",
    "rtype_interval":"SO",

    "multipleClients":["true","false"],
    "vtype_multipleClients":"SVF",
    "rtype_multipleClients":"SO",

    "hosts":["SomeHostname","192.168.1.1","localhost","127.0.0.1"],
    "vtype_hosts":"MVV"
    "rtype_hosts":"SO"

    "authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"MVF",
    "rtype_authtype":"SO"
    },

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"MVF",
    "rtype_guaranteedDelivery":"SO"

    }

    /* optional, client (initiator) only */
    "ext":{"authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"SVF",
    "rtype_authtype":"CO",

    "user":"some user id",
    "vtype_user":"SVV",
    "rtype_user":"CO",

    "password":"youch if clear text!",
    "vtype_password":"SVV",
    "rtype_password":"CO"
    },

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"SVF",
    "rtype_guaranteedDelivery":"CO"
    }
    },

    "connect":{"channel":"/meta/connect",
    "vtype_channel":"SVF",

    "connectionType":["iframe", "flash","callback-polling","long-polling"],
    "vtype_connectionType":"SVF",

    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO",

    /* optional, response only */
    "timestamp":"YYYY-MM-DD\thh:mm:ss.ss",
    "vtype_timestamp":"SVV",
    "rtype_timestamp":"SO",

    /* optional, server response only */
    "advice":{"reconnect":["retry","handshake","none"],
    "vtype_reconect":"SVF",
    "rtype_reconect":"SO",

    "interval":[1000,-1000],
    "vtype_interval":"SVV",
    "rtype_inderval":"SO",

    "multipleClients":["true","false"],
    "vtype_multipleClients":"SVF",
    "rtype_multipleClients":"SO",

    "hosts":["SomeHostname","192.168.1.1","localhost","127.0.0.1"],
    "vtype_hosts":"MVV",
    "rtype_hosts":"SO"

    "authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"MVF",
    "rtype_authtype":"SO"
    },

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"MVF",
    "rtype_guaranteedDelivery":"SO"

    }

    /* optional, client (initiator) only */
    "ext":{"authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"SVF",
    "rtype_authtype":"CO",

    "user":"some user id",
    "vtype_user":"SVV",
    "rtype_user":"CO",

    "password":"youch if clear text!",
    "vtype_password":"SVV",
    "rtype_password":"CO"
    }
    },
    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"SVF",
    "rtype_guaranteedDelivery":"CO"
    },

    "disconnect":{"channel":"/meta/disconnect",
    "vtype_channel":"SVF",

    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO"

    },

    "subscribe":{"channel":"/meta/subscribe",
    "vtype_channel":"SVF",

    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",

    "subscription":["/foo/**","/channel_b","/channel_c/x"],
    "vtype_subscription":"MVV",

    /* optional, response only */
    "timestamp":"YYYY-MM-DD\thh:mm:ss.ss",
    "vtype_timestamp":"SVV",
    "vtype_timestamp":"SO",

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO",

    /* optional, server response only */
    "advice":{"reconnect":["retry","handshake","none"],
    "vtype_reconect":"SVF",
    "rtype_reconect":"SO",

    "interval":[1000,-1000],
    "vtype_interval":"SVV",
    "rtype_interval":"SO",

    "multipleClients":["true","false"],
    "vtype_multipleClients":"SVF",
    "rtype_multipleClients":"SO",

    "hosts":["SomeHostname","192.168.1.1","localhost","127.0.0.1"],
    "vtype_hosts":"MVV",
    "rtype_hosts":"SO",


    "authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"MVF"
    "rtype_authtype":"SO"
    },

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"MVF",
    "rtype_guaranteedDelivery":"SO"
    }

    /* optional, client (initiator) only */
    "ext":{"authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"SVF",
    "rtype_authtype":"CO",

    "user":"some user id",
    "vtype_user":"SVV",
    "rtype_user":"CO",

    "password":"youch if clear text!",
    "vtype_password":"SVV",
    "rtype_password":"CO"
    }
    },
    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"SVF",
    "rtype_guaranteedDelivery":"CO"
    },

    "unsubscribe":{"channel":"/meta/unsubscribe",
    "vtype_channel":"SVF",

    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",

    "subscription":["/foo/**","/channel_b","/channel_c/x"],
    "vtype_subscription":"MVV"

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO",

    /* optional, server response only */
    "advice":{"reconnect":["retry","handshake","none"],
    "vtype_reconect":"SVF",
    "rtype_reconect":"SO",

    "interval":[1000,-1000],
    "vtype_interval":"SVV",
    "rtype_interval":"SO",

    "multipleClients":["true","false"],
    "vtype_multipleClients":"SVF",
    "rtype_multipleClients":"SO",

    "hosts":["SomeHostname","192.168.1.1","localhost","127.0.0.1"],
    "vtype_hosts":"MVV",
    "rtype_hosts":"SO",

    "authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"MVF",
    "rtype_authtype":"SO"
    },

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"MVF",
    "rtype_guaranteedDelivery":"SO"

    }

    /* optional, client (initiator) only */
    "ext":{"authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"SVF",
    "rtype_authtype":"CO",

    "user":"some user id",
    "vtype_user":"SVV",
    "rtype_user":"CO",

    "password":"youch if clear text!",
    "vtype_password":"SVV",
    "rtype_password":"CO"
    }
    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"SVF",
    "rtype_guaranteedDelivery":"CO"
    }
    },

    "publish":{"channel":"/some/channel",
    "vtype_channel":"SVV",

    "data":"some JSON dict or raw string",
    "vtype_data":"SVV",

    /* optional */
    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",
    "rtype_clientId":"BO",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO",

    /* optional */
    "ext":{"authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"SVF",
    "rtype_authtype":"BO",

    "user":"some user id",
    "vtype_user":"SVV",
    "rtype_user":"BO",

    "password":"youch if clear text!",
    "vtype_password":"SVV",
    "rtype_password":"BO"
    }

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"SVF",
    "rtype_guaranteedDelivery":"BO"
    }

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE"
    },

    "deliver":{"channel":"/some/channel",
    "vtype_channel":"SVV",

    "data":"some JSON dict or raw string",
    "vtype_data":"SVV",

    /* optional */
    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",
    "rtype_clientId":"BO",

    /* optional */
    "id":"alphanumeric1234",
    "vtype_id":"SVV",
    "rtype_id":"BO",

    /* optional */
    "advice":{"reconnect":["retry","handshake","none"],
    "vtype_reconect":"SVF",
    "rtype_reconect":"BO",

    "interval":[1000,-1000],
    "vtype_interval":"SVV",
    "rtype_interval":"BO",

    "multipleClients":["true","false"],
    "vtype_multipleClients":"SVF",
    "rtype_multipleClients":"BO",

    "hosts":["SomeHostname","192.168.1.1","localhost","127.0.0.1"],
    "vtype_hosts":"MVV",
    "rtype_hosts":"BO",


    "authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"MVF",
    "rtype_authtype":"BO"
    },

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"MVF",
    "rtype_guaranteedDelivery":"BO"
    }

    /* optional, client (initiator) only */
    "ext":{"authenticate":{"authtype":["htpasswd","OpenId"],
    "vtype_authtype":"SVF",
    "rtype_authtype":"CO",

    "user":"some user id",
    "vtype_user":"SVV",
    "rtype_user":"CO",

    "password":"youch if clear text!",
    "vtype_password":"SVV",
    "rtype_password":"CO"
    }

    "guaranteedDelivery":["true","false"],
    "vtype_guaranteedDelivery":"SVF",
    "rtype_guaranteedDelivery":"CO"
    },

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE"
    },

    "lsService":{"channel":"/service/local/ls_tmp", /* an example of a local service */
    "vtype_channel":"SVF",

    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",

    /* response only */
    "response":"some potentially long string",
    "vtype_response":"SVV",
    "rtype_response":"SZ",

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE"

    },

    "urlService":{"channel":"/service/url", /* bayeux_config file endpoints are attached here. */
    "vtype_channel":"SVF",

    "clientId":"alphanumeric1234",
    "vtype_clientId":"SVV",

    /* response only */
    "response":"some potentially long string",
    "vtype_response":"SVV",
    "rtype_response":"SZ",

    /* response only */
    "successful":["true","false"],
    "vtype_successful":"SVF",
    "rtype_successful":"SZ",

    /* failure only, response only */
    "error":[000,"optional error arguments","Some Error String"],
    "vtype_error":"MVV",
    "rtype_error":"SE"

    }
    }

    Monday, September 14, 2009

    wls pubsub server

     IT trends 2010 series (2)
    com.bea.httppubsub.BayeuxMessage

    Develop steps
    1. weblogic.xml library-ref
    2. weblogic-pubsub.xml  (weblogic-pubsub.xsd)

    3. PubSub API for publish, filter, dynamic channel (optional)
      lookup pubsub server & create local client
              publish to channel
              subscribe (listener register)
              filter chain (filter class, config chain)
      APIS:
              com.bea.httppubsub.PubSubServer
              LocalClient
              ClientManager
              MessageFilter
              DeliveredMessageListener
              BayeuxMessage

    4. Add Dojo to jsp/html for publish/subscribe msg.
      //Initialize the Dojo cometd environment
      dojo.io.cometd.init({}, "/context/cometd");
          cometd - matching default pubsub war web.xml

      //Publish a message to a channel
      dojo.io.cometd.publish("/a/channel", "message content");   //publish text msg
      dojo.io.cometd.publish("/a/channel", {"data": "content"}); // JSON object

      //Subscribe to a channe
      dojo.io.cometd.subscribe("/a/channel", null, "onUpdate");

              //JS function for call back
              function onUpdate(message) {
                if (!message.data) {
                  alert("bad message format "+message);
                    return;
                }
                // fetch the data published by other clients
                var data = message.data;
              }
    5. Deploy web-app; pubsub war library  WL_HOME/common/deployable-libraries
    6. Other aspects

      • Persistent Channelsweblogic-pubsub.xml  persistent-client-timeout-secs
      • JMS as provider for cluster support weblogic-pubsub.xml

               t3://localhost:7001
               ConnectionFactoryJNDI
               TopicJNDI
      • Requiring SSL for pub-sub Via web.xml INTEGRAL
      • AuthCookieEnabled to Access SSL resources
        _WL_AUTHCOOKIE_JSESSIONID created (cookie or URL rewrite). This is default behavior
      •  Locking Down the Pub-Sub Server (5-*)
      *Configure SSL for pub-sub.
      *Require authentication (BASIC, FORM, and so forth.)
      *Ensure auth-cookie is enabled.
      *Ensure that all the channels are constrained in the weblogic-pubsub.xml file.
      *Lock subscribe operations, which are allowed by default.

    AJAX - technology

     IT trends 2010 series (1)

    AJAX - Async-JavaScripts and XML

    Web development that uses JSON or XML for data exchange,  DOM.XMLHttpRequest for protocol access,  JavaScript for operations, and HTML/CSS for display.

    Competing technologies: Java Applet / Web start,  Flash,  ActiveX

    Technology selection:
    framework: DOJO, GWT, ADF
    push: CometD, IceFace
    server support: GWT, WLS pub/sub server


    Usability
          Use Ajax, a page can be created by tiles, and reload only the part that's changing. This and async interaction with server also enhances usability. Meanwhile, page states is maintained within js.
    1. suggestion while typing
    2. loading partial changed tile
    3. responsive - e.g: pre-factch data
    4. ajax push
    5. offline(?)
    6. visual - virtual reality

    Drawback
          There may be more frequent requests to server. Dynamic page updates causes browser bookmar, history buttons and search engine difficulties. Other issues including security and development efforts.

    • Scripting language - language augment a system/GUI to achieve automation by non-experts.
    •  Client side enabling for RIA application
    • JSON - javascript and ECMA scripts
    Ajax Push
           Push framework using Ajax, has a set of technologies supporting it. Bayeux protocol, implemented as CometD, from DOJO.
     

    Ajax Framework includes: DOJO, ADF, Google web toolkit, iceFace, MooTools/Ape, Yahoo UI library, jQuery