namkin snacks shop like potato chips, banana chips, ...
cook food from home or small house, sell on line.
cook food from home or small house, sell on line.
babafatoosh, zomato, masala box
babafatoosh, zomato, masala box
Increase income source by business (low investment business 20k, 40k, 60k ,1lakh)
Warrent buffet suggest to increase income source.
So that if one income source fail/lost/gone. you will have other income source.
Business is one income source.
But you don't have more money to invest in business.
You can start with low investment business .
Following are low investment business.
1)Selling Ornamental Fish
small bowl with fish(fighter fish) with food cost 240rs) in aquarium shop.
My guess is that they might be earning minimum 30%(72rs) or max o 50%(120 rs) for each such combo.
Hire person for 7k to 9k to sell bowl with fish at schools, shopping malls, bus stand, super market.
one sub experiment is that you can try selling on bike
hanging thread tied plastic (oxigen filled) cover with fish
selling other fish (sparking small fish, fingerlings)
note: you can use construction worker for doing.
They might be easy to hire , can work for daily, weekly work.
But little training is need.
Add branded look (with basic website, small banner) say promotion offers.
2)Selling duckling at school, food street area
buy duckling at discounted rate of 25 rs, travel expense (10rs) on bulk purchase(50)
you need scooter, four wheell pushing cart
Hire pushing cart for testing experiment.
3)Selling momo food
moving cart with food selling in area
4)selling jilebi
5)Selling vegetable
6)small tiffin center on the street
<50k p="">
7)small beauti parlour
8)recharging station , sell sim cards
9)selling plastic, plastic plates, paper plates, paper tisuee, plastic cover to food vendor.
10)selling boque flowers
11)small kirana shop
12)meat shop
13)make food street
start with 3 small shop on street < 1 lakh
14)buy second hand auto rickshaw < 1 lakh and rent it
15)fruit seller on the streets < 40k
16)fruit, milk, curd, vegetable, meat seller for apartments as service < 20K(2 boys)50k>
17)cross selling by exisint street vendors like food selling, artificial jewellery, lace, saux, birds, bowls with fish
18)improve technoloy of street vendor fan for sweet corner frier
19)sell chicken cabab on street
20)sell mutton kabab on street
for labour use construciton workers, part time students, part time job searchers
So that if one income source fail/lost/gone. you will have other income source.
Business is one income source.
But you don't have more money to invest in business.
You can start with low investment business .
Following are low investment business.
1)Selling Ornamental Fish
small bowl with fish(fighter fish) with food cost 240rs) in aquarium shop.
My guess is that they might be earning minimum 30%(72rs) or max o 50%(120 rs) for each such combo.
Hire person for 7k to 9k to sell bowl with fish at schools, shopping malls, bus stand, super market.
one sub experiment is that you can try selling on bike
hanging thread tied plastic (oxigen filled) cover with fish
selling other fish (sparking small fish, fingerlings)
note: you can use construction worker for doing.
They might be easy to hire , can work for daily, weekly work.
But little training is need.
Add branded look (with basic website, small banner) say promotion offers.
2)Selling duckling at school, food street area
buy duckling at discounted rate of 25 rs, travel expense (10rs) on bulk purchase(50)
you need scooter, four wheell pushing cart
Hire pushing cart for testing experiment.
3)Selling momo food
moving cart with food selling in area
4)selling jilebi
5)Selling vegetable
6)small tiffin center on the street
<50k p="">
7)small beauti parlour
8)recharging station , sell sim cards
9)selling plastic, plastic plates, paper plates, paper tisuee, plastic cover to food vendor.
10)selling boque flowers
11)small kirana shop
12)meat shop
13)make food street
start with 3 small shop on street < 1 lakh
14)buy second hand auto rickshaw < 1 lakh and rent it
15)fruit seller on the streets < 40k
16)fruit, milk, curd, vegetable, meat seller for apartments as service < 20K(2 boys)50k>
17)cross selling by exisint street vendors like food selling, artificial jewellery, lace, saux, birds, bowls with fish
18)improve technoloy of street vendor fan for sweet corner frier
19)sell chicken cabab on street
20)sell mutton kabab on street
for labour use construciton workers, part time students, part time job searchers
How to access command line options similar to unix commands for your python script?
import getopt
args = "--type daily --from_date 2015-12-12 --to_date 2015-12-19".split()
optlist,args = getopt.getopt(args, "", ["type=", "from_date=", "to-date"])
Fore more: https://docs.python.org/2/library/getopt.html
args = "--type daily --from_date 2015-12-12 --to_date 2015-12-19".split()
optlist,args = getopt.getopt(args, "", ["type=", "from_date=", "to-date"])
Fore more: https://docs.python.org/2/library/getopt.html
How to access command line arguments in python?
import sys
sys.argv[1:]#will give you a list of arguments (not including the name of the python file)
how to check key exist in dictionary in python?
if key in dict:
print "key:", key, " exist in dict"
value= d.get("key", 0)
print "key:", key, " exist in dict"
value= d.get("key", 0)
How to fetch Mongo documents based on query expression /condition via python?
use pymongo library to connect to Mongodb from python
Q)How to install pymongo library via setup tools?
A)easy_install pymongo
script:
import pymongo
from pymongo import MongoClient
mghost = 'localhost'
mgport = 27017
mgdbname = 'zolo_production'
mgclient = MongoClient(mghost, mgport)
db = mgclient[mgdbname]
centers = db.centers;
center = centers.find_one({'zoloCode' : pgcode})
Q)How to install pymongo library via setup tools?
A)easy_install pymongo
script:
import pymongo
from pymongo import MongoClient
mghost = 'localhost'
mgport = 27017
mgdbname = 'zolo_production'
mgclient = MongoClient(mghost, mgport)
db = mgclient[mgdbname]
centers = db.centers;
center = centers.find_one({'zoloCode' : pgcode})
How to import class in the current directory into other python script
reference: http://stackoverflow.com/questions/4142151/python-how-to-import-the-class-within-the-same-directory-or-sub-directory
create empty file called __init__.py
with following content to load mixpanel.py(contains Mixpanel class)
Write following where you want to load the class Mixpanel in pgreport.py
from mixpanel import Mixpanel
create empty file called __init__.py
with following content to load mixpanel.py(contains Mixpanel class)
Write following where you want to load the class Mixpanel in pgreport.py
from mixpanel import Mixpanel
How to iterate dictionary in Python?
for key, value in mydict.iteritems()
print "key:", key, ",value:", value
print "key:", key, ",value:", value
Website(Service) for converting xyz facebook group to android app
Website(Service) for converting xyz facebook group to android app
similarly we can do it for facebook page to android app.
use:
Branding
don't miss the updates from the group, push notification
Remaining unwanted low priority group you can see at the facebook website/app
Similarly facebook group to website.
similarly we can do it for facebook page to android app.
use:
Branding
don't miss the updates from the group, push notification
Remaining unwanted low priority group you can see at the facebook website/app
Similarly facebook group to website.
online data collectors
Lets say you need all college in bangalore.
Lets you want all software companies in bangalore.
all startup companies in bangalore.
Collecting this information is easy , tricky, but not contain all information.
Lets you want all software companies in bangalore.
all startup companies in bangalore.
Collecting this information is easy , tricky, but not contain all information.
indian College database with name, phone, email , address, contact person details.
Create website with College database.
You can sent request to college.
Presecreeen each request automatically, manually.
Verify User sending request.
Paid user for verification.
Compulsary reply from college.
atleast one call for each call.
College schedule calendar with available slots for students, with amenties.
Helping setup event incollege, workshop, seminar, promotions
You can sent request to college.
Presecreeen each request automatically, manually.
Verify User sending request.
Paid user for verification.
Compulsary reply from college.
atleast one call for each call.
College schedule calendar with available slots for students, with amenties.
Helping setup event incollege, workshop, seminar, promotions
Teach in your free time for free in college offline
There lots of software engineer in india.
Who are bored with what to do in the weekend.
Engage software engineer with good satisfying work in the weekend.
one such activity is teaching software technologies, c, c++, java, android,html, css, angular, backbone, unity,
Some one should be there who can make appointment, schedule everything.
Follow with college in the city, select the material, topic, come with topic, discuss.
Software engineer just have to come share what they know, what they feel.
Teaching template,
How to present
Presenter group
Teaching group
Who are bored with what to do in the weekend.
Engage software engineer with good satisfying work in the weekend.
one such activity is teaching software technologies, c, c++, java, android,html, css, angular, backbone, unity,
Some one should be there who can make appointment, schedule everything.
Follow with college in the city, select the material, topic, come with topic, discuss.
Software engineer just have to come share what they know, what they feel.
Teaching template,
How to present
Presenter group
Teaching group
Grafic designer, bakend developer, front developer, android developer, marketer, product manager group, marketing person
Group of people who work on 2 product every month.
1)Marketing person
2)Grafic designer
3)Front developer
4)backend developer
5)product manager
1)Marketing person
2)Grafic designer
3)Front developer
4)backend developer
5)product manager
House wife, student, retired people telecaller work from home flexible time
Lots of small shops registered with just dial.
Whenever customer enquire with just dial, sulekha, quickr, olx.
Customer will get message with shop owner details regarding particular produt lets say big item like house inverter.
mean while shop owner will get message saying customer interested in buying product ex: house inverter
Customer call the shop owner.
or shop owner representative call the customer
Find out the customere requirement, suggest.
Price bargain,
other benefits like goodies, auxalaries
House delivery.
Installation free.
Send the installation person immediately upon confirmation.
Collect money or accept cards.
In this process there customer convincing , suggesting, acceting orders.
Available 24/7 customer care.
This can be done by house wife, student, retired peple
based on their availability.
But the problem is that these person need to know about thed product, domain,
What to talk , suggest.
English skill,hindi, kannada... is good
Whenever customer enquire with just dial, sulekha, quickr, olx.
Customer will get message with shop owner details regarding particular produt lets say big item like house inverter.
mean while shop owner will get message saying customer interested in buying product ex: house inverter
Customer call the shop owner.
or shop owner representative call the customer
Find out the customere requirement, suggest.
Price bargain,
other benefits like goodies, auxalaries
House delivery.
Installation free.
Send the installation person immediately upon confirmation.
Collect money or accept cards.
In this process there customer convincing , suggesting, acceting orders.
Available 24/7 customer care.
This can be done by house wife, student, retired peple
based on their availability.
But the problem is that these person need to know about thed product, domain,
What to talk , suggest.
English skill,hindi, kannada... is good
industrial robot automation training center
http://difacto.com/contact-us
1)
#18/1A, 23rd Main, Marenahalli,
JP Nagar 2nd phase,
Bangalore, India - 560 078
2)
#A151 & #A152, 3rd Cross 1st Stage,
Peenya Industrial Area
Bangalore, India - 560058s
india phone no:
+91 80 4212 0041, +91 80 2659 2040
1)
#18/1A, 23rd Main, Marenahalli,
JP Nagar 2nd phase,
Bangalore, India - 560 078
2)
#A151 & #A152, 3rd Cross 1st Stage,
Peenya Industrial Area
Bangalore, India - 560058s
india phone no:
+91 80 4212 0041, +91 80 2659 2040
Arraning Meeting of students fresher kids with famous old people
Arranging Meeting of students fresher kids with famous old people
So that young generation can learn how to achieve
what are the tips, suggestion.
What is worth doing.
What is worth sacrificing.
Famous old people can be
actor, director, actress, screen writer, music director, singer, artist, inventor, ceo, cto, cmo, coo, cpo,
army director, army generals,....
So that young generation can learn how to achieve
what are the tips, suggestion.
What is worth doing.
What is worth sacrificing.
Famous old people can be
actor, director, actress, screen writer, music director, singer, artist, inventor, ceo, cto, cmo, coo, cpo,
army director, army generals,....
ideas on 23 october 2015
gallery for printing companies
what they did on customer consent
online
---
give freenlance work to existing known freelancer with your friend, company
what they did on customer consent
online
---
give freenlance work to existing known freelancer with your friend, company
Junit fixed method order annontation
Junit test method you wrote don't follow the order of methods
to follow the order add @FixMethodOrder on Test class
Elastic IP
Elastic IP is
1)Static IP
2)Attached with AWS account
3)Not with ec2 instance
4)You can map elastic ip to another ec2 instance.
reference: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
reference: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
butane cylinder with nossil to burn
butane cylinder with nossil to burn
use this butane gas cylinder to heat, weld..
butane gas torch
use this butane gas cylinder to heat, weld..
butane gas torch
portable(mobile) automatic electric weighing machine
http://www.amazon.in/Digital-Kitchen-Battery-Electricity-Operated/dp/B00WK9OFLO/ref=sr_1_1?ie=UTF8&qid=1445181863&sr=8-1&keywords=electronic+weight+machine
- Capacity: 10 kg, Accuracy: 1 gm
- Works on 2 AAA pencil cells and has a power slot
- Weight conversions of g / kg / lb / oz
- Large LCD showing 5 digits and 20 mm height
- Outside calibration, auto zero tracking, auto backlight, auto shut off, tare function, overload indicator
Portable Electronic Digital LCD Weighing Scale(Colours May Vary)
199.00
- Portable Electronic Scale with Superior LCD Screen, Backlight with 2 Nos. Powercell AAA Batteries
- Suitable for Weighing Luggage, Bags, Etc. Ideal for Office, Outings, Travellers and Shopping Applications
- Automatically Adjusts Accuracy Based on Goods and Weight
- Multi-Unit Conversion Feature Converts Measurement Units Automatically
- Colours May Vary
thermal bluetooth prinnter receipt printer,
Thermal bluetooth printer
cost around 4500
charge it
portable
no need to connect through wires
use bluetooth
connect with android table/phone for even more small compact functionality
search in quickr, buy in SP road, Bangalore
you need to buy thermal roll paper for printing
link: http://bangalore.quikr.com/Thermal-POS-printer-IBM-4610-for-sale-W0QQAdIdZ226313252
but this link from quickr, may not be there forever
Elastic BeanStalk command line usage create application, create environment, deploy, terminate, git branch
Elastic BeanStalk
#create elastic bean stalk applicaiton
eb init
#create elastic bean stalk environment for current applicaiton
eb create
#push current branch the code to current default environment of current applicaiton
eb deploy
# list environment for the current application
eb list
#set default environment name for git branch
eb use
#connect to ec2 instace
eb ssh
#show slogs
eb logs
#open amazon console of elasticbean for this application
eb console
#check environment health
eb health
#sets environment variable of the current environment, current applicaton
eb setenv name="ikbhal" age=20
#print the enviroment variable of the current enviromnet, current application
eb printenv
#status of the environment
eb status
status: updating, terminating
health: Grey, Green
#terminate the environment
eb terminate
#list all the git branch
git branch
#change the git branch
git chekcout
#delete the git branch
git branch -d
note: you can not delete the current branch
#to force delte git branch
git branch -D
#merge to master
git checkout master
git merge
#create elastic bean stalk applicaiton
eb init
#create elastic bean stalk environment for current applicaiton
eb create
#push current branch the code to current default environment of current applicaiton
eb deploy
# list environment for the current application
eb list
#set default environment name for git branch
eb use
#connect to ec2 instace
eb ssh
#show slogs
eb logs
#open amazon console of elasticbean for this application
eb console
#check environment health
eb health
#sets environment variable of the current environment, current applicaton
eb setenv name="ikbhal" age=20
#print the enviroment variable of the current enviromnet, current application
eb printenv
#status of the environment
eb status
status: updating, terminating
health: Grey, Green
#terminate the environment
eb terminate
#list all the git branch
git branch
#change the git branch
git chekcout
#delete the git branch
git branch -d
note: you can not delete the current branch
#to force delte git branch
git branch -D
#merge
git checkout master
git merge
Labels:
application,
aws,
cli,
console,
create,
deploy,
eb,
environment,
health,
init,
list,
logs,
merge,
printenv,
setenv,
ssh,
status
How to create controller in yeoman and push to aws elastic bean stalk
yo angular
yo angular:controller testController
..add some directives / views etc..
grunt server -- serves up pages correctly on port 9000
grunt -- which creates the dist folder
reference: http://stackoverflow.com/questions/18325510/how-to-deploy-a-yeoman-build-to-aws-node-js
aws cli configure with aws access key id, secret access key
aws configure
enter access key ID
enter Secret Access Key
Default regio name: ap-southeast-1 #for singpore
Default output format [none]: #nothing
enter access key ID
enter Secret Access Key
Default regio name: ap-southeast-1 #for singpore
Default output format [none]: #nothing
Install AWS cli(command line) on mac?
reference: http://docs.aws.amazon.com/cli/latest/userguide/installing.html#install-bundle-other-os
Requirement:
2.6.5+ or 3.3+
sudo pip install awscli
to upgrade
suod pip install --upgrade awscli
Requirement:
2.6.5+ or 3.3+
sudo pip install awscli
to upgrade
suod pip install --upgrade awscli
start the node js server
#install node
#npm instal if not exist
#install bower on elastic bean stalk
npm install -g bower
bower install
grunt serve
localhost:9000
#npm instal if not exist
#install bower on elastic bean stalk
npm install -g bower
bower install
grunt serve
localhost:9000
How to create AWS instance profile via command line?
1)Create instance profile
aws iam create-instance-profile
2)Attach role to instance profile
aws iam add-role-to-instance-profile
# Create the role and attach the trust policy that enables EC2 to assume this role.
aws iam create-role --role-name Test-Role-for-EC2 --assume-role-policy-document file://C:\policies\trustpolicyforec2.json
# Embed the permissions policy (in this example an inline policy) to the role to specify what it is allowed to do.
aws iam put-role-policy --role-name Test-Role-for-EC2 --policy-name Permissions-Policy-For-Ec2 --policy-document file://c:\policies\permissionspolicyforec2.json
# Create the instance profile required by EC2 to contain the role
aws iam create-instance-profile --instance-profile-name EC2-ListBucket-S3
# Finally, add the role to the instance profile
aws iam add-role-to-instance-profile --instance-profile-name EC2-ListBucket-S3 --role-name Test-Role-for-EC2
What is Amazon instance profile?
if you are using AWS ec2 or AWS serive that uses AWS ec2 then
you have to store role in intance profile
end
instance profile is container that store role
will attach to AWS ec2.
you have to store role in intance profile
end
instance profile is container that store role
will attach to AWS ec2.
Create role for AWS service via command line
1)Create role
aws iam create-role
2)attch policy to role
2.1)Attach managed poilicy to role
aws iam attach-role-plicy
or
2.2)Attach inline policy
aws iam put-role-plicy
aws iam create-role
2)attch policy to role
2.1)Attach managed poilicy to role
aws iam attach-role-plicy
or
2.2)Attach inline policy
aws iam put-role-plicy
What is service role in AWS?
Service is role is AWS Role
this is for AWS Service
Through which we grant permission to service.
Services like: AWS ec2, AWS data pipeline, AWS ops work, AWS elastic Bean Stalk.
These resources will access AWS resources.
You can create role to determine what the services is allowed to do with these resources.
Assign the policy to role
This policy can be AWS managed policy
or custom policy
or policy base from AWS Managed policy.
this is for AWS Service
Through which we grant permission to service.
Services like: AWS ec2, AWS data pipeline, AWS ops work, AWS elastic Bean Stalk.
These resources will access AWS resources.
You can create role to determine what the services is allowed to do with these resources.
Assign the policy to role
This policy can be AWS managed policy
or custom policy
or policy base from AWS Managed policy.
Amazon ec2 instanct type c3.large
c3.large
| 1-YEAR TERM | |||||
|---|---|---|---|---|---|
| Payment Option | Upfront | Monthly* | Effective Hourly** | Savings over On-Demand | On-Demand Hourly |
| No Upfront | $0 | $71.54 | $0.098 | 26% | $0.132 per Hour |
| Partial Upfront | $356 | $32.12 | $0.0846 | 36% | |
| All Upfront | $726 | $0 | $0.0829 | 37% | |
Create zip from only the files in the folder not the top level forlder , include hiiden files
zip ../mapp.zip -r * .[^.]*
How to delete all documents in collection in Mongo db?
Lets you collection name is dummy
db.dummy.remove({})
db.dummy.remove({})
How to start mongo db server ?
On mac
sudo mongod
If you want to change the db storage locaiton
sudo mongod --dbpath
sudo mongod
If you want to change the db storage locaiton
sudo mongod --dbpath
How to change play.http.router parameter in playframework java
referernce : http://stackoverflow.com/questions/31509026/play-2-4-how-do-i-disable-routes-file-loading-during-unit-tests
ex: javauides.tests.routes files map to javaguide.tests.Routes class
ex: javauides.tests.routes files map to javaguide.tests.Routes class
Play's route compiler task compiles all files in
conf folder ending with .routes as well as the default routes file. Generated class name is always Routes, but the package name depends on the file name. If the file name is routes (the default routes file), compiled class is placed in router package, so the fully qualified class name is router.Routes (which is the default value for play.http.router).
For all other route files, RouteCompiler derives the package name by dropping the
.routes from the file name. So for my.test.routes, play.http.router value should be my.test.Routes.
Here is the base class for my tests, with custom router and db configuration elements.
public class MyTestBase extends WithApplication {
@Override
protected Application provideApplication() {
Application application = new GuiceApplicationBuilder()
.configure("db.default.driver", "org.h2.Driver")
.configure("db.default.url", "jdbc:h2:mem:play")
.configure("play.http.router", "my.test.Routes")
.build();
return application;
}
}
What is scala twirl
Twirl is play framework scala based template engine.
https://github.com/spray/twirl
https://github.com/spray/twirl
How to write class in Scala
class Point(xc:Int, yc:Int){
var x: Int = xc
var y: Int = yc
def move(dx:Int, dy:Int){
x = x+ dx
y = y+dy
}
override def toString():String = "(" + x + "," + y + ")";
}
var x: Int = xc
var y: Int = yc
def move(dx:Int, dy:Int){
x = x+ dx
y = y+dy
}
override def toString():String = "(" + x + "," + y + ")";
}
android-arsenal find ui components, libraries for android
https://android-arsenal.com/
android-arsenal find ui components, libraries for android
android-arsenal find ui components, libraries for android
Android material design tutorial
Android material design tutorial
reference:
https://developer.android.com/training/material/index.html
http://www.raywenderlich.com/103367/material-design
reference:
https://developer.android.com/training/material/index.html
http://www.raywenderlich.com/103367/material-design
Coffee tea making machine
Branded coffee tea making machine.
Sell them, you make what you want, use your own materials.
coffee tea making machine branded for small business
Sell them, you make what you want, use your own materials.
coffee tea making machine branded for small business
Group people of different talent work under product, provide branding, support, calcenter support, operation support, marketing support
Group people of different talent work under product, provide branding, support, calcenter support, operation support, marketing support
Even this support can be any group member.
Even this support can be any group member.
Chai boy branded franchise network
chai boy will come to your place give chai.
Branded chai
Quality maintained
even takes app, website.
No hassle for chai boy for money collection, record keeping.
no need of company registration for chai boy wala
Just maintain quality.
You don't know about how to make good quality.
We give good chai, you just deliver.
You collect money.
Branded chai
Quality maintained
even takes app, website.
No hassle for chai boy for money collection, record keeping.
no need of company registration for chai boy wala
Just maintain quality.
You don't know about how to make good quality.
We give good chai, you just deliver.
You collect money.
Improve small business man power vehcile 3 cycle by using electricity battery , add design sense, even network them
Improve small business man power vehcile 3 cycle by using electricity battery , add design sense, even network them
collect points for sharing selected item you buy on your social network site
collect points for sharing selected item you buy on your social network site
Mobile Coffeeday machines with battery, solar panels
Coffeeday machine on mobile via battery, UPS, solar power on streets, movable cart
monkey runner android testing
android testing your app
do all the events
http://developer.android.com/tools/help/monkeyrunner_concepts.html
do all the events
http://developer.android.com/tools/help/monkeyrunner_concepts.html
What is QSR companies
fast food companies like McDonald, Subway, ..
They have franchise, supplied matrial franchisers, they sell, collect money from franchiser
Market the product on tv, internet
offers
technology
app, website
They have franchise, supplied matrial franchisers, they sell, collect money from franchiser
Market the product on tv, internet
offers
technology
app, website
Yum brands
Yum! Brands, which operates KFC, Pizza Hut, and Taco Bell in India,” says Gaurav. For KFC, ColdEx manages daily pickups from 80 vendors and delivers frozen goods to six Yum! Brands distribution centres in a -18°C environment.
Promote your product with Working marketing executive as part time
You have good product/servie(website/app/anything)
You need market help, leverage part time marketing exeutive who working in other comapnies.
Even leverage their contact
If you like in future, you can onboard them as full employee.
If he is super talent make him part of founding team
ex: marketing exective in wipro, logistics
You need market help, leverage part time marketing exeutive who working in other comapnies.
Even leverage their contact
If you like in future, you can onboard them as full employee.
If he is super talent make him part of founding team
ex: marketing exective in wipro, logistics
monitor tools online for ruby on rails, angular, android
monitoring Sentry after any release. It seems to be a great tool in case of Rails and okayish in case of Angular.
For Android, we will be using SplunkMint
AWS Dynamo DB operations
package com.amazonaws.codesamples.datamodeling;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBAttribute;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBHashKey;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapper;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperConfig;
import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable;
public class ObjectPersistenceCRUDExample {
static AmazonDynamoDBClient client = new AmazonDynamoDBClient(new ProfileCredentialsProvider());
public static void main(String[] args) throws IOException {
testCRUDOperations();
System.out.println("Example complete!");
}
@DynamoDBTable(tableName="ProductCatalog")
public static class CatalogItem {
private Integer id;
private String title;
private String ISBN;
private Set bookAuthors;
@DynamoDBHashKey(attributeName="Id")
public Integer getId() { return id; }
public void setId(Integer id) { this.id = id; }
@DynamoDBAttribute(attributeName="Title")
public String getTitle() { return title; }
public void setTitle(String title) { this.title = title; }
@DynamoDBAttribute(attributeName="ISBN")
public String getISBN() { return ISBN; }
public void setISBN(String ISBN) { this.ISBN = ISBN;}
@DynamoDBAttribute(attributeName = "Authors")
public Set getBookAuthors() { return bookAuthors; }
public void setBookAuthors(Set bookAuthors) { this.bookAuthors = bookAuthors; }
@Override
public String toString() {
return "Book [ISBN=" + ISBN + ", bookAuthors=" + bookAuthors
+ ", id=" + id + ", title=" + title + "]";
}
}
private static void testCRUDOperations() {
CatalogItem item = new CatalogItem();
item.setId(601);
item.setTitle("Book 601");
item.setISBN("611-1111111111");
item.setBookAuthors(new HashSet(Arrays.asList("Author1", "Author2")));
// Save the item (book).
DynamoDBMapper mapper = new DynamoDBMapper(client);
mapper.save(item);
// Retrieve the item.
CatalogItem itemRetrieved = mapper.load(CatalogItem.class, 601);
System.out.println("Item retrieved:");
System.out.println(itemRetrieved);
// Update the item.
itemRetrieved.setISBN("622-2222222222");
itemRetrieved.setBookAuthors(new HashSet(Arrays.asList("Author1", "Author3")));
mapper.save(itemRetrieved);
System.out.println("Item updated:");
System.out.println(itemRetrieved);
// Retrieve the updated item.
DynamoDBMapperConfig config = new DynamoDBMapperConfig(DynamoDBMapperConfig.ConsistentReads.CONSISTENT);
CatalogItem updatedItem = mapper.load(CatalogItem.class, 601, config);
System.out.println("Retrieved the previously updated item:");
System.out.println(updatedItem);
// Delete the item.
mapper.delete(updatedItem);
// Try to retrieve deleted item.
CatalogItem deletedItem = mapper.load(CatalogItem.class, updatedItem.getId(), config);
if (deletedItem == null) {
System.out.println("Done - Sample item is deleted.");
}
}
}
Singapore Dynamo db pricing
- Write Throughput: $0.0074 per hour for every 10 units of Write Capacity
(enough capacity to do up to 36,000 writes per hour)* - Read Throughput: $0.0074 per hour for every 50 units of Read Capacity
(enough capacity to do up to 180,000 strongly consistent reads, or 360,000 eventually consistent reads, per hour)*
Dynamo db free quota details
Free Tier*
As part of AWS’s Free Tier, AWS customers can get started with Amazon DynamoDB for free. DynamoDB customers get 25 GB of free storage, as well as up to 25 write capacity units and 25 read capacity units of ongoing throughput capacity (enough throughput to handle up to 200 million requests per month) and 2.5 million read requests from DynamoDB Streams for free.
Migrating from Mongodb to Dynamo db
referernce: https://www.codementor.io/devops/tutorial/handling-date-and-datetime-in-dynamodb
Dynamo Db does not support multiple indexes
It supports only Hash key, hash key + range key only
Does not support native date, DateTime object
Advantage:
No worries of scaling, monitoring, security updates.
average good response.
Use unix time stamp, store as Number
Combine multiple mongo db key if required
Database denormalization
Based on query patter, create schema
Dynamo DB is NO SQL db
Queries are slow
GetItem call as fast
Terminology
Table , Item, Attribute, Primary Key, hash attribute value, hash and range attribute values
secondary index on non key attibute value
Start the dynamo db locally
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -help
Dynamo db port: 8000
Create table
var params = {
TableName : "Music",
KeySchema:[
{AttributeName:"Artist", KeyType:"Hash"},
{AttributeName:"SongTitle", KeyType:"Range"}
],
AttributeDefinitions:[
{AttibuteName:"Artist", AttibuteType:"S"},
{AttibuteName:"SongTitle", AttibuteType:"S"},
],
ProvisionedThroughput:{
ReadCapacityUnits:1,
WriteCapacityUnits: 1
}
};
dynamodb.createTable(params, function(err, data){
});
TableStatus is should be Active
2)
var params = { TableName: "Music" }; dynamodb.describeTable(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
3)
var params = {}; dynamodb.listTables(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
4)
var params = { TableName: "Music", Item: { "Artist":"No One You Know", "SongTitle":"Call Me Today", "AlbumTitle":"Somewhat Famous", "Year": 2015, "Price": 2.14, "Genre": "Country", "Tags": { "Composers": [ "Smith", "Jones", "Davis" ], "LengthInSeconds": 214 } } }; dynamodb.putItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
primarykey is must, remaining attribute are optional
5)Condition Expressoin
var params = { TableName: "Music", Item: { "Artist":"No One You Know", "SongTitle":"Call Me Today", "AlbumTitle":"Somewhat Famous", "Year": 2015, "Price": 2.14, "Genre": "Country", "Tags": { "Composers": [ "Smith", "Jones", "Davis" ], "LengthInSeconds": 214 } }, "ConditionExpression": "attribute_not_exists(Artist) and attribute_not_exists(SongTitle)" };
6)Batch insert
var params = { RequestItems: { "Music": [ { PutRequest: { Item: { "Artist": "No One You Know", "SongTitle": "My Dog Spot", "AlbumTitle":"Hey Now", "Price": 1.98, "Genre": "Country", "CriticRating": 8.4 } } }, { PutRequest: { Item: { "Artist": "No One You Know", "SongTitle": "Somewhere Down The Road", "AlbumTitle":"Somewhat Famous", "Genre": "Country", "CriticRating": 8.4, "Year": 1984 } } }
]}
7)Dynamo db data types
String, number, float, map, list
8)
var params = { TableName: "Music", Key: { "Artist": "No One You Know", "SongTitle": "Call Me Today" } }; dynamodb.getItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
9)
var params = { TableName: "Music", Key: { "Artist": "No One You Know", "SongTitle": "Call Me Today" }, ProjectionExpression: "AlbumTitle" };
10)
var params = { TableName: "Music", KeyConditionExpression: "Artist = :artist", ExpressionAttributeValues: { ":artist": "No One You Know" } }; dynamodb.query(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
12)
var params = { TableName: "Music", AttributeDefinitions:[ {AttributeName: "Genre", AttributeType: "S"}, {AttributeName: "Price", AttributeType: "N"} ], GlobalSecondaryIndexUpdates: [ { Create: { IndexName: "GenreAndPriceIndex", KeySchema: [ {AttributeName: "Genre", KeyType: "HASH"}, {AttributeName: "Price", KeyType: "RANGE"}, ], Projection: { "ProjectionType": "ALL" }, ProvisionedThroughput: { "ReadCapacityUnits": 1,"WriteCapacityUnits": 1 } } } ] }; dynamodb.updateTable(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
13)
var params = { TableName: "Music", Key: { "Artist":"No One You Know", "SongTitle":"Call Me Today" }, UpdateExpression: "SET RecordLabel = :label", ExpressionAttributeValues: { ":label": "Global Records" }, ReturnValues: "ALL_NEW" }; dynamodb.updateItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
15)Automatic counter
15)
var params = { TableName: "Music", Key: { Artist: "The Acme Band", SongTitle: "Look Out, World" } }; dynamodb.deleteItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/BestPractices.html
refernce: http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/GettingStarted.Java.html
Dynamo Db does not support multiple indexes
It supports only Hash key, hash key + range key only
Does not support native date, DateTime object
Advantage:
No worries of scaling, monitoring, security updates.
average good response.
Use unix time stamp, store as Number
Combine multiple mongo db key if required
Database denormalization
Based on query patter, create schema
Dynamo DB is NO SQL db
Queries are slow
GetItem call as fast
Terminology
Table , Item, Attribute, Primary Key, hash attribute value, hash and range attribute values
secondary index on non key attibute value
Start the dynamo db locally
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -help
Dynamo db port: 8000
Create table
var params = {
TableName : "Music",
KeySchema:[
{AttributeName:"Artist", KeyType:"Hash"},
{AttributeName:"SongTitle", KeyType:"Range"}
],
AttributeDefinitions:[
{AttibuteName:"Artist", AttibuteType:"S"},
{AttibuteName:"SongTitle", AttibuteType:"S"},
],
ProvisionedThroughput:{
ReadCapacityUnits:1,
WriteCapacityUnits: 1
}
};
dynamodb.createTable(params, function(err, data){
});
TableStatus is should be Active
2)
var params = { TableName: "Music" }; dynamodb.describeTable(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
3)
var params = {}; dynamodb.listTables(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
4)
var params = { TableName: "Music", Item: { "Artist":"No One You Know", "SongTitle":"Call Me Today", "AlbumTitle":"Somewhat Famous", "Year": 2015, "Price": 2.14, "Genre": "Country", "Tags": { "Composers": [ "Smith", "Jones", "Davis" ], "LengthInSeconds": 214 } } }; dynamodb.putItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
primarykey is must, remaining attribute are optional
5)Condition Expressoin
var params = { TableName: "Music", Item: { "Artist":"No One You Know", "SongTitle":"Call Me Today", "AlbumTitle":"Somewhat Famous", "Year": 2015, "Price": 2.14, "Genre": "Country", "Tags": { "Composers": [ "Smith", "Jones", "Davis" ], "LengthInSeconds": 214 } }, "ConditionExpression": "attribute_not_exists(Artist) and attribute_not_exists(SongTitle)" };
6)Batch insert
var params = { RequestItems: { "Music": [ { PutRequest: { Item: { "Artist": "No One You Know", "SongTitle": "My Dog Spot", "AlbumTitle":"Hey Now", "Price": 1.98, "Genre": "Country", "CriticRating": 8.4 } } }, { PutRequest: { Item: { "Artist": "No One You Know", "SongTitle": "Somewhere Down The Road", "AlbumTitle":"Somewhat Famous", "Genre": "Country", "CriticRating": 8.4, "Year": 1984 } } }
]}
7)Dynamo db data types
String, number, float, map, list
8)
var params = { TableName: "Music", Key: { "Artist": "No One You Know", "SongTitle": "Call Me Today" } }; dynamodb.getItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
9)
var params = { TableName: "Music", Key: { "Artist": "No One You Know", "SongTitle": "Call Me Today" }, ProjectionExpression: "AlbumTitle" };
10)
var params = { TableName: "Music", KeyConditionExpression: "Artist = :artist", ExpressionAttributeValues: { ":artist": "No One You Know" } }; dynamodb.query(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
11)
var params = {
TableName: "Music"
};
dynamodb.scan(params, function(err, data) {
if (err)
console.log(JSON.stringify(err, null, 2));
else
console.log(JSON.stringify(data, null, 2));
});
Operations12)
var params = { TableName: "Music", AttributeDefinitions:[ {AttributeName: "Genre", AttributeType: "S"}, {AttributeName: "Price", AttributeType: "N"} ], GlobalSecondaryIndexUpdates: [ { Create: { IndexName: "GenreAndPriceIndex", KeySchema: [ {AttributeName: "Genre", KeyType: "HASH"}, {AttributeName: "Price", KeyType: "RANGE"}, ], Projection: { "ProjectionType": "ALL" }, ProvisionedThroughput: { "ReadCapacityUnits": 1,"WriteCapacityUnits": 1 } } } ] }; dynamodb.updateTable(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
13)
var params = { TableName: "Music", Key: { "Artist":"No One You Know", "SongTitle":"Call Me Today" }, UpdateExpression: "SET RecordLabel = :label", ExpressionAttributeValues: { ":label": "Global Records" }, ReturnValues: "ALL_NEW" }; dynamodb.updateItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
15)Automatic counter
15)
var params = { TableName: "Music", Key: { Artist: "The Acme Band", SongTitle: "Look Out, World" } }; dynamodb.deleteItem(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); });
refernce: http://docs.aws.amazon.com/amazondynamodb/latest/gettingstartedguide/GettingStarted.Java.html
Subscribe to:
Posts (Atom)