Showing posts with label Career. Show all posts
Showing posts with label Career. Show all posts

Friday, August 22, 2014

LDAP Data Model Design

Requirements:
1.  Have flexible schema
2.  Satisfy all the organization model
3.  Multi-Tenant
4.  Support evolvement and
5.  Define a good LDAP Schema

Research:
1.  LDAP is designed to solve this organization problem, and is used in mainstream

Protocols:
1.  X.500

Technologies:
LDAP
Active Directory
Apache Directory
WSO2
LDAP Java Client

Knowledge Sharing:
1.  LDAP directories are structured as a tree of entries, where each entry consists of a set of attribute-value pairs describing one object. The objects are often people, organisations, and departments, but can be anything at all. Schema is the term used to describe the shape of the directory and the rules that govern its content.
2.  A hypothetical organisation is described, with requirements for “white pages” directory service as well as a wide range of authentication, authorisation, and application-specific directory needs.
3.  A plan is proposed for the layout of the directory tree, with particular emphasis on avoiding the need to re-organise it later. This involves careful separation of the data describing people, departments, groups, and application-specific objects. A simple approach to entry design is shown, based on the use of locally-defined auxiliary object classes.
4.  LDAP can be used to access information describing people, organisations, roles, services, and many other sorts of entity. It is a standard and widely-implemented protocol, which makes it extremely valuable for integrating multiple applications that need to share common data.
5.  LDAP is a protocol - the Lightweight Directory Access Protocol. It isnot a database or even a directory although the term LDAP directory is often used to describe a directory service that is accessed using the LDAP protocol.
6.  An LDAP Directory stores information in a tree structure known as the Directory Information Tree (DIT). The nodes in the tree are directory entries, and each entry contains information in attribute-value form.
7.  Some attributes may have multiple values; others are restricted to a single value. The set of attributes that may be present in an entry is determined by the objectClass attribute,which is always present. objectClass is a multi-valued attribute and each value defines a set of mandatory and/or optional attributes.
8.  Each node in the DIT has a name called the Relative Distinguished Name (RDN) which is unique among the peer nodes under its parent. It also has a globally-unique name called the Distinguished Name (DN) made up from the name of the node itself plus the names of all its superior nodes up to the root of the DIT.
9.  Most current LDAP deployments are limited to operation within a single organisation, so although data replication is commonly used, the other features of the distributed service model do not get so much exercise.
10. When considering an LDAP deployment that is to serve more than one application, it is important to get the widest possible view of the host organisation and its future needs. This is because it is easy to change the shape of the DIT at the design stage but very hard once data has been loaded and applications are running.
11.  The usual solution to this problem is to list all people under a single node in the DIT.
12.  Most organisations have fuzzy edges, as the exact distinctions between “staff”, “contractors”, “suppliers”, “business partners”, “customers”, “visitors”, etc are not rigid or constant. It therefore makes sense to group all types of person into one place and to make any necessary distinctions by adding attributes to individual entries, or by using group objects.
14.  There should be one arc of the DIT for each application. The management of these subtrees can be delegated to the application managers. The LDAP service itself is a network application, so it should have a subtree in which to store groups used for access control etc.
15.  All information within a directory entry is stored as attribute-value pairs. The set of attributes that can appear in a given entry is set by its objectClass. Some of the attributes are mandatory, but most are optional. New attributes can be defined if necessary, and new object classes can also be added to permit the new attributes to appear in entries.
16.  it would be possible to add more permitted attributes to this object class and they would automatically become available in all the entries that use it. 
17.  Another useful trick is to avoid deleting entries when people leave: just set an attribute to say they are inactive. This can be useful where an audit trail is required but does introduce more complexity in ACLs.
18.  LDAP servers can be optimised for different forms of query by adjusting indexing and caching parameters, and in a large installation it is critical to get this right. 
19.  When building an LDAP directory it is important to consider all requirements and to plan carefully at the start, as re-organising the Directory Information Tree later is very difficult.
20.  

LDAP Design Principles:
1.  Once an object has been created in an LDAP directory it is likely that the name of that object will get stored in other objects, or even outside the directory entirely. This suggests that objects should never be renamed, which in turn restricts the choice of how they should be named in the first place.
2.   I recommend that all entries representing people or other entities that might change name should be given RDNs containing only the uniqueIdentifier attribute: the value can be a simple serial number, which does not have to mean anything outside the directory.
3.  It is thus a good idea to include displayName in every directory entry.
4.  Groups are normally represented by LDAP objects with the groupOfNames class. In these objects, group members are represented by member attributes, whose values are the DNs of the members themselves. The member attribute can obviously have multiple values. This is a simple scheme, but it does have two significant problems
5.  The initial loading and ongoing management of directory data is too big a subject to cover here. However, it is important to note that the directory schema may have to be extended to hold “foreign keys” so that entries can be correlated against other databases.
6.  

Vocabulary:
  • CN = Common Name
  • OU = Organizational Unit
  • DC = Domain Component

Questions:
1.  What is an organization ?
2.  How to map the business requirements to LDAP Schemas ?
3.  

References:
http://www.skills-1st.co.uk/papers/ldap-schema-design-feb-2005/ldap-schema-design-feb-2005.html
http://en.wikipedia.org/wiki/X.500
http://stackoverflow.com/questions/18756688/what-is-cn-ou-dc-in-ldap-search















Thursday, June 5, 2014

What is best tool to document API


Comparison:
rackspace
netflix api
go-grid
aws api
https://www.twilio.com/docs/api/rest
https://developers.google.com/+/api/

Good:
https://developers.facebook.com/
https://www.twilio.com/docs
https://developers.facebook.com/docs/
http://developers.soundcloud.com/
https://www.layar.com/documentation/browser/
https://dev.twitter.com/docs/streaming-apis


Best Practice:
1.

Lesson Learnt:
1.  ProgrammableWeb is a catalog which has all the APIs.
2.  



Best Practices:
1. Good documentation is important in encouraging and keeping developers interested in your platform as well as reducing support costs. Ideally, documentation should cover four areas, as shown in the figure above: overview, getting started, sample code, and references. In addition, this article describes best practices specifically for Web API documentation.
2.

Auto-generate Documentation

In order to minimize the amount of work in writing API documentation, it's useful to see how much of the documentation you can create automatically


Include Sample Code

More than anything, developers like to have sample code that they can learn with and start as a base for their own work. One of Web APIs strengths is that they are independent of platform and programming language. Unfortunately, this results in extra work when creating documentation. You should be able to make API calls in Python, Ruby, Java, C#, PHP, and so on.

Show Example Requests and Responses

In addition to sample code, having HTTP, XML, and JSON samples of your request and response is important. However, samples only are not sufficient. In addition, you need a description that explains the purpose of the call and you need a table that explains each element. We recommend a table with columns for Name, Type, Description, and Remarks.

Explain Authentication and Error Handling

Authentication is often required for Web APIs, so you will need to document how to get credentials and how those credentials are passed to the Web server. You may need step-by-step instructions on how to obtain API keys. Sample code is often useful showing developers how the keys work.

You'll need to explain how errors are handled as well. For example, an HTTP call may request data using unauthorized credentials, or it may request an action using data that does not exist. Right now there is no standard way to pass error information back, so developers need to understand how you are passing back error information, why an error occurs, and how to fix the problem.
Finally, remember that Web APIs are built on top of HTTP, which contains its own data. So you may have HTTP-related information that requires documentation as well. This can include caching, content type, and status codes.

Examples to Look At

If you talk to people in the Web API industry, one example often comes up as documentation that's done well. That's Twilio, which delivers cloud-based telephony and has excellent documentation.

What have they done right? First, they've got all of the pieces that a developer could ask for: tutorials, sample code, overviews, references, and an error and warning dictionary. Their reference material is well-organized, breaking information down into the Base URI, a table of properties, and HTTP methods (GET, POST, PUT, and DELETE, each with XML examples and description). In addition, they've got nice formatting that matches the look and feel of their overall website, and they have a good navigation system.

References:
http://www.programmableweb.com/news/web-api-documentation-best-practices/2010/08/12
http://bocoup.com/weblog/documenting-your-api/
https://www.braintreepayments.com/blog/api-where-to-begin
http://www.jpsoftwaretech.com/documentation-best-practices-for-web-apis/
 [Very Good]
http://www.slideshare.net/NathalieSteinmetz/web-apis-best-practices
http://www.slideshare.net/ibmapimgmt/recommended-practices-for-designing-a-web-api

Taxonomy: - Walked through the API Catalog of following APIs
https://www.twilio.com/docs/api/rest
http://docs.rackspace.com/



Monday, June 2, 2014

Research about SMS Capability


Terminologies:
SMS, GMS,

Supporting Frameworks:

JSMPP
1.  Support SMPP
2.  2 or 3 people
3.  https://code.google.com/p/jsmpp/
4.  Started from 2007
Status: Not good for GE

Java SMS SDK,  - No

Ozeki Java SMS SDK,  
1.  It is an Ozeki NG SMS Gateway
2.  Not Free
3.  http://www.ozekisms.com/


SMSLib 
1.  Need GSM modems and/or bulk sms operators.
2.  License: Apache
3.  - Too simple
4.  - Very few members

LOGICA SMPP Java API

Open Market SMS
Open Market SMS

Twilio Java SDK
1.  Commercial
2.  Support SMS, MMS

References:
About SMS Providers
Comparision of SMS Gateway
Send SMS Message from Email
2014 Best Text Message Marketing Service Comparisons and Reviews
How to text a cell phone from email?








How to negotiate better salary


Overall  Guidance:
1. Negotiating salary is one of the most important skills during the job hunting.
2. Because less negotiation skills, people made less money than what I worth.
3.

Practice:
1. Overcome fear
2. Overcome execusing the offered salary
3. Overcome humility
4. Overcome low self-esteem
5. Overcome lack of confidence
6. Overcome apathy
7. Overcome strange notions

Steps:
1. Overcome any reticence about asking for a higher salary
2. Steel yourself to ask
3. Build your case by pinpointing exactly what it is that your employer should take into account when determining whether to increase the salary offer.
4. Do your research about ideal salary
5. Practice pitch
6. Start negotiating. Know the lowest salary you'll accept and the highest amount you'd like (see next step for reasonableness). Then, always start with a figure higher than what you really want––this means knowing in advance what your bottom line is. This provides leeway to negotiate down and reach a "compromise". If you're lucky, it'll be right where you really wanted it.
7. Be realistic and reasonable - If you've done your research and judged that it's appropriate to do so, you can make suggestions of compromise during a negotiation that open up the possibility of different types of reward, such as additional leave, time off to volunteer, annual bonuses or stocks, a larger office, flights home if you're working interstate, a personal development course, membership to a club, a car park space, etc. In many cases, the company may have leeway on non-monetary recompense that they'll be happy to add to your package.
8. Be prepared for "no" as another possibility
9. End the request on a positive note, however it has been received by your future employer.
   -Don't gush and thank them for considering it with oodles of superlatives. It sounds desperate
   - Never turn a "no" into a backlash, such as pointing out you know that everyone else in the new firm is getting paid heaps more than you, blah, blah. This is an invitation to withdrawing the job offer!
10. Get the offer in writing.

Pinpoints to negotiate:
1. your level and extent of experience in the field
2. your educational background, including ongoing education and expected future education
3. your ability to draw new clients or use your contacts/network
4. your level of knowledge about your new employer, along with knowledge of competitors and how to take advantage of this knowledge for your new employer's sake.

Research about ideal salary:
1. Check salary guides (many exist online but ask at the local library if in doubt)
2. Talk to your mentors and former bosses
3. Talk to colleagues to see if they can point out skills that really stand out for them in their experience and ask who has demonstrated these skills in the past
4. Talk with clients if relevant and get their feedback on your value
5. Look into what the company has traditionally paid employees in your role.
6. It's recommended that you reach a reasonable figure to give as a suggestion to your future employer. It's harder to say no to a specified, thoughtful and fair figure than to an unknown and possibly "sky's the limit" request.

References:
http://www.wikihow.com/Negotiate-a-Higher-Starting-Salary

Friday, May 30, 2014

Best API Documentation Tool

Options:
APIGEE SmartDocs
Swagger
turnapi
Custom Website

3Scale.net - Active Docs (Use Swagger as Specification) [Out]
   https://support.3scale.net/howtos/api-configuration#active-docs


Not Candidates:
Docco
Dexy

Tools:
Doxygen

Best API Platform:
1. WSO2 API Management
2. APIGEE
3. Mashery
4. Layer 7
5. 3scale
6. Mulesoft

Evaluation Considerations:
1. Out-of-the box developer Tool
2. UI Experience
3. Language Agnostic
4. Code Level Documentation
5. Support JSON and XML
6. Support WADL
7. Demo/Documentation
8. Modify documentation directly on the system, instead of code.
9. Customers
10. Google Trends
11. Open Source
12. Sync with Git
13. Swagger-based documentation
14. Scalability to support chosen API Management Platform
15. Compatible with different REST publishing Framework - JAX-RS

Directions/Principles:
1. Choose the API Doc tool which can work with corresponding API Management Platform.
2.

API Platform:
APIGEE
Mashery

Directoins:
1. I would lean towords using API Docs with APIGEE
2.

Learnt:
1. Docco is not good for API Documentation
2. SOA strategies mostly target internal users; open Web APIs target mostly external partners. So API management requires developer portals, key management, and metering and billing facilities that SOA
management never provided.
3. API management platforms deliver important additional capabilities: developer portals, key management and approval, and metering and billing. Most companies don’t support these requirements in their existing SOA governance strategies.
4. Examples of vendors with API-native solutions are 3scale and Mashery
5. Examples of vendors with SOA-native solutions are IBM, Layer 7, and Vordel
6. Another solution vendor that began in this market segment but is now targeting API management is Apigee, formerly Sonoa Systems. Apigee’s API management platform bears some resemblance to Mashery’s cloud-based developer portal.
7.

Knowledge Sharing:
1. It does, however, require the capabilities of the service be described in the structure of the Swagger Specification. Not all services can be described by Swagger--this specification is not intended to cover every possible use-case of a REST-ful API. Swagger does not define a specific development process such as design-first or code-first. It does facilitate either technique by establishing clear interactions with a REST API.

API Platform Comparision:
http://www.ca.com/us/~/media/Files/IndustryAnalystReports/The-Forrester-Wave-API%20Management-Q1-2013.pdf

References:
http://mestachs.wordpress.com/2012/08/06/rest-api-documentation/




Tuesday, April 8, 2014

Master API Management


At the highest level, an API management solution needs to include a –
  • Developer Portal for developers to discover APIs, understand usage and sign up for access
  • API Gateway that secures and mediates the traffic between your APIs and its consumers
  • API Lifecycle Management to manage the process of designing, developing, deploying, versioning and retiring API
API Management

There are many marketing terms.

Vendors:
Vordel
Apigee

Some of the marketing terms are helping people understand technology offering from high level.
Levels: Marketing Message -> Feature Themes -> Features Lists -> Detailed Capability.

Terms:
1.  API Lifecycle Management
2.  

Monday, January 20, 2014

Research about Data Structures


Research Findings:
1.  A tuple is a finite ordered list of elements. In mathematics, an n-tuple is a sequence (or ordered list) of n elements, where n is a non-negative integer.
2.

Overview about Data Structure and Algorithms
A data structure is an arrangement of data in a computer's memory or even disk storage. An example of several common data structures are arrays, linked lists, queues, stacks, binary trees, and hash tables. Algorithms, on the other hand, are used to manipulate the data contained in these data structures as in searching and sorting.





Algorithms Types:
Insert a new data item
Search a specified item
Delete a specified item
Iterate through all item
Sorting
Recursion

Algorithms:
1.  Is it correct?
2.  What is the invariant ?
3.  What is the efficiency ?



Fibonacci


Use Cases:
Array vs Ordered Array:
Ordered arrays are therefore useful in situations in which searches are frequent, but insertions and deletions are not. An ordered array might be appropriate for a data- base of company employees, for example. Hiring new employees and laying off existing ones would probably be infrequent occurrences compared with accessing an existing employee’s record for information, or updating it to reflect changes in salary, address, and so on.

A retail store inventory, on the other hand, would not be a good candidate for an ordered array because the frequent insertions and deletions, as items arrived in the store and were sold, would run slowly.

Evaluate the performance of algorithms:
1. What you need is a comparison that tells how an algorithm’s speed is related to the number of items.
2. The time is proportional to the base 2 logarithm of N
3. When comparing algorithms, you don’t really care about the particular microprocessor chip or compiler; all you want to compare is how T changes for different values of N, not what the actual numbers are. Therefore, the constant isn’t needed.

Goal of Algorithms:
1.  To use the algorithms to solve real problems. We don't need to memory all the data structure and algorithms.
2.

Algorithms:
Bubble Sort - Swap close two items. In the first iteration, get tallest one on the right with n-1 swap, and then repeat the whole process. O(N2)
Selection Sort - Select the shortest, O(N2)
Insertion Sort - O(N2)

Understanding:
In many algorithms there are conditions that remain unchanged as the algorithm proceeds. These conditions are called invariants.

Stack:
Stack has pop, push, peek, empty method.

A stack can be used to check whether parentheses, braces, and brackets are balanced in a computer program source file. At the end of this chapter, we’ll see a stack playing a vital role in parsing (analyzing) arithmetic expressions such as 3*(4+5).

Most microprocessors use a stack-based architecture. When a method is called, its return address and arguments are pushed onto a stack, and when it returns, they’re popped off. The stack operations are built into the microprocessor.

Queue:
Queue is also used to model real-world situ- ations such as people waiting in line at a bank, airplanes waiting to take off, or data packets waiting to be transmitted over the Internet.

There’s a printer queue where print jobs wait for theprinter to be available. A queue also stores keystroke data as you type at the keyboard. This way, if you’re using a word processor but the computer is briefly doing something else when you hit a key, the keystroke won’t be lost; it waits in the queue until the word processor has time to read it. Using a queue guarantees the keystrokes stay in order until they can be processed.

Priority Queue:
In a preemptive multitasking operating system, for example, programs may be placed in a priority queue so the highest-priority program is the next one to receive a time-slice that allows it to execute.

Linked List:
Self-Referencial

Binary Search Tree:
1.  Use recursion and InOrder to traverse the tree.
2.  Prefix, Infix, Postfix notation.

Red Black Tree:
1.  In a red-black tree, balance is achieved during insertion
2.

Red Black Rules:
1. Every node is either red or black.
2. The root is always black.
3. If a node is red, its children must be black (although the converse isn’t necessarily true).
4. Every path from the root to a leaf, or to a null child, must contain the same number of black nodes.

2-3-4 Trees:
1. 2-3-4 Trees are Multiway Trees that can have up to four children and three data items per node, are balanced, multiway tree of order 4.
2. A leaf node, by contrast, has no children, but it can nevertheless contain one, two, or three data items. Empty nodes are not allowed. 2-node, 3-node, 4-node.
3. Trees have different rules, especially for Binary Tree, Red-Black Tree, and 2-3-4 Trees. The rules are compliant, when we insert the data nodes.
4. The 2-3-4 tree’s self-balancing capability results from the way new data items are inserted, as we’ll see in a moment.
5. In short, a non-leaf node must always have one more child than it has data items.

External Storage:
1. For this reason, and to simplify the drive control mechanism, data is stored on the disk in chunks called blocks, pages, allocation units, or some other name, depending on the system. We’ll call them blocks.

B Trees:
1. Strictly speaking, 2-3 trees and 2-3-4 trees are B-trees of order 3 and 4, respec- tively, but the term B-tree is often taken to mean many more children per node.


Hash Table:
1. If you don’t need to visit items in order, and you can predict in advance the size of your database, hash tables are unparalleled in speed and convenience.
2. This is an example of a hash function. It hashes (converts) a number in a large range into a number in a smaller range. This smaller range corresponds to the index numbers in an array. An array into which data is inserted using a hash function is called a hash table.
3.  In this array we expect that, on the average, there will be one word for every two cells. Some cells will have no words; and others, more than one.
4.  Open Address(Linear Probing, Quadratic Probing, Double Probing), filled sequence, clustering, rehashing,
5.  The more full the array is, the worse clustering becomes. It’s not usually a problem when the array is half full, and still not too bad when it’s two-thirds full. Beyond this, however, performance degrades seriously as the clusters grow larger and larger. For this reason it’s critical when designing a hash table to ensure that it never becomes more than half, or at the most two-thirds, full.

Challenges:
1.  There are many data structures and algorithms
2.  Need to understand their pros, cons, performance.
3.  Need to apply them and solve problems.

References:
http://www.idevelopment.info/data/Programming/data_structures/overview/Data_Structures_Algorithms_Introduction.shtml#Abstract Data Types
http://www.learnalgorithms.in/
https://hbfs.wordpress.com/2008/12/23/the-10-classes-of-algorithms-every-programmer-must-know-about/