Posts

Showing posts from 2014

AWS Oracle RDS - increasing tablespace maxsize

Oracle RDS Maintenance  Check table space and file sizes select tablespace_name, file_name ,AUTOEXTENSIBLE,MAXBYTES,INCREMENT_BY from dba_data_files order by 1,2; Check available space and space used select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb from  (select tablespace_name, round(sum(bytes)/1024/1024 ,2) as free_space        from dba_free_space        group by tablespace_name) a,       (select tablespace_name, sum(bytes)/1024/1024 as tbs_size        from dba_data_files        group by tablespace_name) b where a.tablespace_name(+)=b.tablespace_name; Set autoextend table space  The Oracle RDS in AWS uses a different command as follows, Bigfile Type Tablespaces versus Smallfile Type http://www.databasejournal.com/features/oracle/article.php/3646226/Bigfile-Type-Tablespaces-versus-Smallfile-Type.htm -- checking the sizes of your datafiles...

DB Connection Pooling

If you are using DriverManagerDataSource then note: That this class is not an actual connection pool; it does not actually pool Connections. It just serves as simple replacement for a full-blown connection pool, implementing the same standard interface, but creating new Connections on every call. So change the class to:  com.mchange.v2.c3p0.ComboPooledDataSource c3p0 is an easy-to-use library for making traditional JDBC drivers "enterprise-ready" by augmenting them with functionality defined by the jdbc3 spec and the optional extensions to jdbc2. http://www.mchange.com/projects/c3p0/#quickstart You need to include the dependency in your pom.xml as follows,                                <dependency>                               ...

AWS Beanstalk custom configuration

AWS Beanstalk custom configuration for httpd re-route include in your war file a folder named '.ebextensions' in the folder include a file with extension ".config"  eg: myapp.config myapp.config will contain container_commands:     01_setup_rewrite:         command: "cp .ebextensions/httpd-proxy.conf /etc/httpd/conf.d/httpd-proxy.conf"     02_apache_restart:         command: /etc/init.d/httpd restart This in essence copies the file included in the .ebextnsions folder (httpd-proxy.conf) to the /etc/httpd/conf.d folder. And restarts httpd if you look at httpd.conf file it contains an "Include /conf.d/* so anything put on conf.d folder will be included in httpd.conf so essentially you don't need to modify httpd.conf file. What I do here is redirect all request that comes to the server with  /rrrrrr to S3 bucket I configure with the same name as the server. KeepAlive On MaxKeepAliveRequests 100 Keep...

Javascript Libraries

Dropzone.js           to handle drop and select files Date time picker - JQuery  http://xdsoft.net/jqplugins/datetimepicker/ MicroPlugin -           A lightweight plugin / dependency system for javascript libraries.           npm install microplugin   https://npmjs.org/package/micropluginz Sifter             A library for textually searching arrays and hashes of objects by property (or multiple properties).                 Designed specifically for autocomplete.             npm install sifter https://npmjs.org/package/sifter Selective           Selectize is the hybrid of a textbox and <select> box. It's jQuery-based and it's useful for tagging,                 contact lists, country selectors, an...

API design best practices

API Design summary 1. Use two base URLs per resource 2. Keep verbs out of your base URLs 3. Use HTTP verbs to operate on the collections and elements 4. Be consistent either use plural nouns or singular nouns 5. Use concreate names rather than abstract names     An intuitive API uses plural rather than singular nouns, and concrete rather than abstract names 6. keep your API intuitive by simplifying the associations between resources, and sweeping parameters and other complexities under the rug of the HTTP question mark. Handling errors Errors boil down to Everything worked - ok The application did something wrong – client error The API did something wrong – server error In summary, be verbose and use plain language descriptions. Add as many hints as your API team can think of about what's causing an error. eg: HTTP Status Code: 401 {"status" : "401", "message":"Authenticate","code": 20003, "...

SCEA Exam

Details on Sun Site http://www.sun.com/training/certification/java/java_archj2ee.html http://www.sun.com/training/catalog/courses/CX-310-051.xml Link to Whiz Labs Has good information about the Exams, and simulators. http://www.whizlabs.com/scea/scea.html Sun Developer Network Tutorials for J2EE http://java.sun.com/j2ee/learning/tutorial/index.html Java Ranch post contains some good information This is summarization of notes so better study and read this http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=26&t=000441 Has Links to Other Sites EJB and Java http://www.freeprogrammingresources.com/javabean.html

Design Patterns

Basic Design Patterns (23)  in Software Development: Design Patterns are recurring solutions to design problems encountred in software development. In elobarating further design patterns are like blue prints or already modeled solutions which may fit into a problem and provide a better solution. but it should be noted the implementation will vary depending on the problem scenario and context.       1. Creational Patterns (5) - Creates objects for you       2. Structural Patterns (7) - Puts together Larger structures       3. Behavioural Patterns (11) - Help control communication and flow between objects There are certain suggestions that need to be adopted when using design patterns Program to an interface and not to an implementation Favor object composition over inheritance 1. Creational Patterns -   Factory - Provides a simple decsion making class that returns one of several possible  ...

PHP Frame works - Intro

The following are few of the best PHP frame works available Kohana  - Kohana is a PHP 5 framework that uses the Model View Controller architectural pattern. It aims to be secure, lightweight, and easy to use Zend  - ZendFramework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase Symfony  - Symfony is a full-stack framework, a library of cohesive classes written in PHP Cake PHP  - CakePHP enables PHP users at all levels to rapidly develop robust web applications. Qcodo  - Qcodo Development Framework is an open-source PHP 5 framework that focuses on freeing developers from unnecessary tedious, mundane coding.