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















Wednesday, August 20, 2014

Startup Lesson - the power of famous

Lesson Learnt:
1.  The more famous your startup are, the more users you will tract to use your product.
2.  In order to gain more users, you need to become famous.

Powerful Platforms:
1.  Media
2.  User base


Founder - Good Habits

Good Habits:
1.  Watch the news, and chase latest and newest
2.  Look for new in-mature market
3.  Stay away from old, mature market.
4.  Focus on learning



Startup Hypothese - Chase Latest and Newest to conquer niche market

Goals of Startup
In Scope:
1.  To get a small niche market with high speed.
2.  Test new business model
3.  Watch the market for latest and newest.

Out of Scope:
1.  To build a perfect product for all the customers.

Technology Choice:
1.  Use latest and newest features in an in-mature market, full of bugs, issues, and problems.
2.  Forget about the factors which big corporation relies.

Latest Technology:
Objective-C

Cost:
1.  Time to learn latest and newest technology
2.

Failure Lessons:
1.  To do startup, you always have to pay the cost of time and energy. Spending time to learn the things which will fail, is not better than spending time to learn things which may have a chance to succeed.

How to learn and adopt technology for Startup

Overall Guidance:
1.  In big corporations, a developer doesn't have to learn the latest technology, but in startup, developers have to learn the latest and newest to survive in the market. It is harder to survive in startup, then in big corporations.
2.  Typically, the big corporations will use the technology about 1 year late than successful startups.
3.  Don't try to use technologies learnt in big corporations to apply in startups. It will never succeed.
4.  Successful startup is always built on un-mature market with no standards, guidance, full of problems, etc.


What matters to big corporations:
1.  Enterprise Architecture
2.  Best Practice
3.  Stability
4.  Performance
5.  Investment Compatibility


What matters to startups:
1.  Latest and Newest Features, which no-one used before
2.  Time To Market
3.  Rough, Uncertain
4.  In-mature, Hacking

Questions:
1.  What is the roadmap ?
2.  

Best Technology Stack for Big Corporations:
AngularJS, Big Data, HTML5, CSS, JS, Twitter Bootstrap


Best Technology Stack for Startups:
Objective-C
Latest and Newest Features
API

References:
https://www.facebook.com/notes/facebook-engineering/under-the-hood-rebuilding-facebook-for-ios/10151036091753920


Objective-C vs PhoneGap/HTML5

Overall Guidance:
1.  To develop a mobile application, there are many ways. You can use Objective-C, or PhoneGap/HTML5.

Objective-C:
Benefits:
1.  Can use native features from IPhone, have more native features.
2.  Have better performance.

Drawbacks:
1.  Don't support Android, and browsers


PhoneGap/HTML5:
Benefits:
1.  Develop once, you can run it in browser, Mobile browser, Native app in IPhone/Android,etc.
2.  Code lots of CSS to develop look and feel like native app.

Drawbacks:
1.  Have few months old and 1 year old technology and features. It may be a little of out-of-dated. Depending on the features.
2.

Recommendations:
1.  If you use cutting-edge technology, you shall use Objective-C. If you just translate a web application to mobile application, you can use PhoneGap/HTML5.

References:
1.  http://stackoverflow.com/questions/7026786/objective-c-vs-phonegap
2.  http://stackoverflow.com/questions/7026786/objective-c-vs-phonegap
3.  http://roadfiresoftware.com/2014/04/when-to-use-phonegap-versus-developing-a-native-ios-app/
4.  http://davidrs.com/wp/should-you-build-phonegap-or-native/





Tuesday, August 19, 2014

Common Startup Failure Traps - Marketing

Overall Guidance:
1. It is very important to do marketing for your product or beta. A full lifecycle will include marketing, which distribute your product to the customers.

Trap1: Don't do marketing.
A full lifecycle starts from an idea, and ends with users usage and feedback.  Marketing is the process to bring the product to customers, sell it to them, and ask their feedback, and also create more demand from customers.

Trap 2: Can't adjust the feedback from potential users.
Anyone can be a user, and also anyone may not be a user. The founder needs to be careful about the feedback from users. For some of the feedback, the founder shall listen. Some of the feedback, the founder needs to understand why they say so. Is it really a pain for user, or is it just an opinion from this person.

Trap 3: Once they get idea, they didn't talk with potential customers to validate the idea
They may be too busy on their staff. They may not have the connection or habit to do it. They may not like talking to people, and so don't want to do it.



Common Startup Failure Traps - Product

Overall Guidance:
When the founders develop a product, you need to be aware of few things.

Trap 1: Don't develop a full product first, and then reach to customers.
Don't spend months to develop a product, and then try to convince to customers. This will not work. Customers may not need the features, which you spend weeks implemented.
Advice: Do develop one feature, and then reach out to customers and ask if they like it and want to use it. If the answer is yes, then continue the development lifecycle. If not, don't develop the 2nd feature. If you can't find one user to use your first feature. Your 2nd feature will not help.

Trap 2: Develop a bad UX, and then ask customers to use it.
Even it is a prototype or one feature app, you shall make the UX good. Bad UX will turn customers away.  Do develop a good UX even with one feature.




Common Startup Failure Traps - Founder

Overall Guidance:
Many people failed to do startup because of many reasons. Here are some common mistakes people make.

Failure Practice:
Trap 1: Don't have time for business.
Startup needs lots of time. If don't have time for any excuse, then the startup is doomed to fail.
Trap 2: Too many Excuses for failure
Excuse is not acceptable in startup.
Trap 3: Spend too much time on product, and don't spend time on promoting the product.
Many people from IT background like to develop product, but once it is done, they may lose the faith of the product, and don't promote the product.
Trap 4: Don't know what to do.
Startup is like adventure. It is uncertain and full of wonder. Many time, people will get lost about they shall do.
Advice: Have a weekly plan, execute the plan and try to get users.
Trap 5: Look for success, instead of users.
Success is a long goal for a startup. It may take years to come true, and many startup will fail in the middle. Founders shall not use success as self-evaluation criteria, because it is like a star you don't know if you will get it. But users are short term goals which you can try to get if you work hard enough.
Trap 6: Do market research first, and then try to find best idea.
The founder is one-man or two-men army. You don't have time to do the market research first, and then try to find the best idea. This will not work. As founder, you shall analyze and observe your surrounding living experience and life experience, and see what problems you face, and can we identify it as an opportunity. Observation of the life shall be the source of idea innovation.
Trap 7: Location is not good.
Location is critical. In good location, you will see many people like you, and you can easily find cofounders, and there are many social events available, and many good opportunities for you to learn. In normal location, there is not many things going on. People are late back, and don't want to do business.
Trap 8: Give up idea, when other people say no.
You need to find the right potential customers, and ask if the product solves their problem. Wrong customers will say no to good product. So it is important to find right customers and ask them if they can use your product.
Trap 9: Lose the faith of your idea.
As long as the problem exists and people feel pain about it, then your idea has value. No one can tell you it is a good idea or bad idea. You have to test it, and have belief about it.
Trap 10: Don't have good advisor
Many people start from a poor family, didn't have right education to do startup. But they want to do startup. Once they try, they will fail. Good education can help avoid many mistakes. So it is important to find an advisor and can help you whenever you need.
Trap 11: Do startup by yourself
Startup has lots of work. One man can't be enough to do a business. The goal of startup is to start a business from idea, and hire and grow team to build the startup.  It takes a team to do startup, not just one man person.
Trap 12: Didn't do research after getting an idea before prototype.
After you have an idea, you shall start to do market research for this idea, and see if this is a growing market, dying market, or new market. See if anyone has already had a proposal to solve this problem, and what is your competition. Many people found out that there is already a strong competitor or a stable solution, which many customers like to use.











Thursday, August 14, 2014

How to design IPhone Icon

Overall Guidance:
1. If you only want to develop some nice icons and splash images for iphone app,  you can use the online tools below.


Tools:
http://makeappicon.com/
http://appicontemplate.com/
http://www.appiconsizes.com/


References:
http://ivomynttinen.com/blog/the-ios-7-design-cheat-sheet/
http://taybenlor.com/2013/05/21/designing-for-ios.html

Tools:
http://www.quirco.com/iPhoneIcon/


Size:
640*1136
2048*1536
1024*768
1536*2048
768*1024
640*960
320*480


Sunday, August 10, 2014

How to define MVP

Overall Guidance:
1. MVP is full of bugs and issues. That is ok. As long as MVP can meet the goal, it is good.

Knowledge Sharing:
1. The motivation for building an MVP is to verify any assumptions you might have about customers’ problems and your ability to solve them.
2. By its minimal nature, an MVP will never cover the needs of a mass market, not even multiple groups of early adopters. Hence, a key discriminator between the beta and the MVP is a clear notion of a customer segment: A set of people who experience the problem you are trying to solve to a degree that makes them interested in buying a minimal, immature, change-prone product.
3. My driver here, which is basically anything but the learning part, will almost certainly make me design an MVP which is far from minimal, but still cannot be stripped down further once everybody had their say.
4. The difference is how the development teams focus their work. Focusing on a single change for a limited segment of users, and building from there will have a much higher probability of really helping someone, compared to going out wide and generic, usually motivated by fighting of fierce competition, taking maximum advantage of resources and other pre-mature economy of scale factors.
5. So, if you’re currently building an MVP, I would like to encourage asking some randomly chosen team members the following: Who will experience a change because of what we are making? If you don’t hear a consistent answer, you might want to reiterate your MVP strategy.
6. Maybe it’s just internal communication. Most likely, however, you’re not minimal enough. You don’t have a minimum viable product, and you probably don’t have a minimum market segment and a clear notion of how to impact it.
7. 7. MVP is the version of a new product which allows a team to collect the maximum amount of validated learning about customers with the least effort.
8. there is no business without revenue which also tends to be one of the riskier parts of the business model.
9. This is why whenever your users are also your customers, I am a strong advocate of capturing back some of that value which is just a fancy way of saying “charge from day one and get paid”.
10. 


Goals of MVP:
1. Spend less time to develop a MVP to demo the a customer about how the product can solve their product and get feadback.
2. Develop it in a week.

It is ok:
1. Have bad UI
2. Have missing features
3. I am shamed of the product.

Stage of MVP:
0. Biz Idea
1. Product Concept/Feature List
2. Architecture
3. POC for new technology
4. Prototype
5. Beta Release
6. Release

====================================
Idea: (User: Concept)
- Identify a problem, and a solution proposal to solve the problem for 1%.


POC: (User: Myself)
1. Technology Adoption
Team: Myself


Prototype: (User: Wife, In-Person users from Starbucks/Friends)
1. Core business logic
Team: Myself


Beta Release: (User: Invitated Remote Users)
1. Security
2. Session Timeout and Management
3. User Management
Team: Myself


Public Availability: (User: Public People, Investors)
Team: Myself and Team

Mistakes:
1. Don't try to use MVP to learn new technology. Very big mistake. Try to save time if possible in startup activities.
2. Don't spend too much time in job to learn new technology, hopefully one day it will help startup. Dreaming, Hypothetical, Unrealistic, etc.

References:
http://blog.iterate.no/2012/12/05/dont-substitute-mvp-for-beta/






What is the right process to launch startup

Overall Guidance:
1.  Startup launch process is very critical. It is very important to do each step right. If one step failed in the middle, the founder shall come back, and start over again. It takes a long journey to start a successful startup. So it is very critical to make correction in the early stage, instead of waiting until the last moment.
2. Startup is about evaluating founder's hypthesis.
3. Forgot about the process learnt in big corporation and textbooks. For startup, founders shall go down to earth and learn directly from startups.


Process to launch startup
0. Recognized a problem myself in life and felt the pain and suffering of the problem.
1.  Innovate idea/proposal/hypothesis to solve the painful life problems
     - outcome: documented one sentence idea.
2. Research potential customers by talking to them to see if they have the pain.
3. Analyze consumer feadbacks
4. Adjust product and plan
5. Develop MVP
6. Demo MVP to consumers for feadbacks
7. Analyze consumer feadbacks
8. Share MVP to family and friends
9. Repeat steps from 6 to 8 until success.


Lesson Learnt in the failure process:
1.  Remove business plan
2.  Don’t design the complete product
3.  Only implement a MVP
4.  Define metrics to evaluate the progress, and validated learning.

Learning Source:
1. Research about startups
2. Discuss with other founders

Not Good Source:
1. Founders' Hypothesis
2. Process in Big Corporations
3. Text Books for jobs in big corporations.


Wrong Process:
1.  Don’t spend one months to write business plan
2.  Don’t develop the complete product; Only develop a MVP to test user bahavior.
3.  


Old Failure Process:
1.  Innovate Idea
2.  Evaluate Idea
3.  Write business plan
4.  Review business plan
5.  Design the product interface and features
6.  Implement the complete interface and features
7.  Promote the product to the users
8.  Do production support, and add new features
9.  Go dead

Mistakes:
1. After getting one idea, the team spends 6 months to develop a product, and then try to sell it to customers. Many people make the same mistake.
2. Engineering mindset is also very harmful for launching business, because the engineers try to solve business problems with engineers' mindsets.
3. Startup is unique. Big corporation and education books are not suite for startup. Doing startup is a unique category, which we shall directly learn from startups, instead of trying to apply concepts from big corporation and education books to startups.
4. Don't try to spend many time on documentation, communication, which are important to big companies, not startups.
5. The way to learn doing startup is to learn by doing it, and share with other founders.
6. Don't write a business plan, like big corporations, etc.
7.

Bad Mistakes:
1.  Engineers try to use startup opportunity to learn new technology, and end up spending months to develop a feature which customers don't want.
2.  Engineers shall have the ability to develop MVP in a short time, but they shall not do it until the time comes.

Wrong Process:


Lesson Learnt:
1.  Failure is the best lesson to teach startup.
2.

Other Topics:
1. How to define MVP
2. How to research customers





How to do market research in startup

Objectives:
Researching consumers is one of the most critical skills in startup.

Process:
1. Get an idea
2. Analyze the potential customers
3. Find potential customers
4. Tell the ideas to potential customers
5. Get feedback from potential customers

Why people don't do it ?
1. They choose the work they like most to do it, for example, developing a beautiful product by spending month, instead of choosing the work which is needed most, or which is most undesirable for them, etc.
2.

Tips:
1. Be sure to also conduct your own primary research to get information specific to your particular, unique business and the sub-set of consumers you hope to attract. A few research tools to consider include interviews, surveys, questionnaires, and focus groups, which can identify critical information about the importance of price and certain features as well as the strengths and weaknesses of competitors.
2. Don't try to real the market research report. It won't help.
3. It is better to also learn from the failure of other founders, instead of oneself.

Tools:
http://www.sba.gov/tools/sizeup
Interviews
Surveys
Questionnaires
Focus Groups

References:
http://www.forbes.com/sites/shawnoconnor/2013/04/23/step-3-for-a-successful-startup-the-importance-of-market-research/
http://steveblank.com/2009/11/30/customer-development-is-not-a-focus-group/









Wednesday, August 6, 2014

how to expose REST services with JAX RS and Apache CXF

Framework:
1. Spring MVC
2. Maven
3. Jackson

SpringMVC vs Apache CXF:
http://architects.dzone.com/articles/apache-cxf-vs-apache-axis-vs

Chosen Framework:
Apache CXF, JAX-RS

Steps:
1. Download Apache CXF Release
2. Check the sample project bundled in CXF

Principles:
1. For POST, use json as request body to send data.
2. For GET, use uri path or parameter to send request data.

Sample Code in Github:
https://github.com/dzhou10/cxf-helloworld

Github Example:
https://github.com/dzhou10/RestDemo/tree/master/RestDemo

Monday, August 4, 2014

How to improve work efficiency in life

Objective:
The goal of this document is to improve the work efficiency in life, so you have more time to do business.


Problem Analysis:
1. It is very time consuming to handle the automatic phone redirection system to talk to the right people.  The customer service doesn’t work sometimes. It redirect to different people. For BCBS, it is worse. It took 2 hours to speak one person.
2. For aaa, it is slow. It have so many choices and ask people to choose the right option.


Solution:
1. Use headphone always
2. Try to avoid contacting their customer service
3. Try to see if I can do by myself
4. If their service is bad, cancel their service.