Thursday, July 28, 2011
Free Domain Name Providers
Friday, July 22, 2011
MySQL Basic II
Monday, July 11, 2011
SQL database
Basic MySQL info:
Path for my.cnf file:
ji@ji-cada:/etc/mysql$ cat my.cnf
mysql -u root -p
ID root
PS root
quit or exit to end.
Any command ends with ;
Table name is case sensitive, but column name, value in query are not case sensitive.
User name and password is case sensitive.
MySQL Query Browser
to start:
Mobile Web Dev
Here is the platform and testing play ground.
Apache
CSS, Javascript
iPhone 4
http://viva.wranga.com.au/
FTP command:
basic
http://www.cs.colostate.edu/helpdocs/ftp.html
detail
http://www.nsftools.com/tips/RawFTP.htm
http://linux.about.com/od/commands/l/blcmdl1_ftp.htm
Certainly need more experience about Javascript, the whole logic to store data and UI are based on Javascript.
Tuesday, April 29, 2008
Data Model
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm#i1004087
PL/SQL DATE CONVERT TO NUMBER
http://www.unix.org.ua/orelly/oracle/prog2/ch14_01.htm
http://www.unix.org.ua/orelly/oracle/prog2/ch14_02.htm
eg.
number_date := TO_NUMBER(TO_CHAR(date, 'j'));
Function-Based Indexes
http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_indexing.htm#sthref597
Any top-level or package-level PL/SQL functions that are used in the index expression must be declared as DETERMINISTIC. That is, they always return the same result given the same input, for example, the UPPER function. You must ensure that the subprogram really is deterministic, because Oracle Database does not check that the assertion is true.
If you change the semantics of a DETERMINISTIC function and recompile it, then existing function-based indexes and materialized views report results for the prior version of the function. Thus, if you change the semantics of a function, you must manually rebuild any dependent function-based indexes and materialized views.
Tuesday, April 01, 2008
Relatioal Database Fundamental
http://perleybrook.umfk.maine.edu/slides/spring%202007/Cos346/Using%20Visio%202003%20to%20create%20ER%20Diagrams.htm
Non trivial functional dependencies:
http://forums.devshed.com/database-management-46/non-trivial-functional-dependencies-350204.html
Thursday, January 17, 2008
One efficient side of Gen2
So the length of these two commonly using commands becomes critical in performance when doing time measurement.
Gen2 does very well in shortening their length:
QueryRep >> command type(2 bits) + Session (2 bits) = 4 bits
QueryAdjust >> command type(4 bits) + Session (2 bits) + Up or Down (3 bits) = 9 bits
There is only two 2 bits long command types, one is QueryRep, as it uses every time to order tags to downcounter by 1. Base on performance of Gen2, averagely, every tag needs 3 query rounds to be identified. So if there is 1000 tags, QueryRep is sent 3000 times roughly.
QueryAdjust is used to change the value of Q in the Q-algorithm. Instead of telling the value of Q directly in its command, it only tells how to change its value, as Q is changed step by step, one by one.
This efficient side of Gen2 compensates the upper limit performance of Aloha algorithm. These two succinct command lines reduce huge time in the whole process.
Wednesday, December 19, 2007
Slot Aloha Limit Throughput
Max Throughput = 1 / e = 36.79%
Simulator generates the result around 34% (above 1000 tags)
Now the concentrates are on:
Reduce Q parameter update frequency: as far as we know, Q parameter decreases as the detection process going. Fluctuating Q causes redundant data in transmission.
Find an out of box method to break the slot Aloha throughput limit.
Friday, December 14, 2007
Slot-count(Q) selection algorithm
Thursday, December 13, 2007
EPC Gen2 Pseudo Code
I use Java to implement this algorithm. This can simulate the communication between tags and reader, and statistics can be collected in each cycle or slot.
It is still unclear about when to update tag's Q parameter. This algorithm assumes it updating each collision or some empty cycles.
The performance is mentioned in previous blog entry. Basically, three cycles for identifying one tag.
Wednesday, December 12, 2007
Made the First simulation
Crucial Issues:
How frequent to update Q parameter using that official algorithm?
Every queryRep queryAdjust or follow other rule
The rule, or the way to adjust the gap (the C parameter) in each update of Q parameter.
Brief Performance Summary:
Tags Number * 3 = Query Number (20 - 5000 tags)
Three query messages needed to identify one tag
Wednesday, December 05, 2007
Detail in Class 1 and Implement Gen2
5.2. Reader-Tag Half-Duplex Communication
As specified in Section 6, the Reader-to-Tag and Tag-to-Reader communication occurs in a half-duplex manner. The Reader initiates communication by modulating a complete command. The Reader then transmits an unmodulated continuous wave (CW) signal. The Tag modulates its reflection of the CW signal (backscatter communication).
5.3. Reader-to-Tag Communication Signals
A Reader may emit no signals at any frequency, may emit a CW signal at a single frequency, or may emit a modulated signal at a single frequency.
5.3.1. Reader-to-Tag Signal Modulation Depth
The Reader communicates with tags using Amplitude Shift Keying (ASK) with a minimum modulation depth of 30% and a maximum modulation depth of 100%. Modulation shape, depth and rate of modulation are variable within the limits described below. Compliant Tags will adjust their timing over a range of modulation rates to lock to reader transmissions automatically during the [CLKSYNC] period of a Reader command.
Have read Class 1 Gen2 specification, draft the pesudo-code framework using Java. Thinking about a whether a discrete simulation is necessary, and the means of performance measurement.
In implement simulation of Gen2, a simplification is made in message transmission, like ACK and Session selection etc., which have no influence in the anti-collision measurement so far.
Session selection deals with Reader-to-Reader collision.
ACK is reliable transmission and for further processing in tag.
Thursday, November 29, 2007
Benchmark Protocol
To my knowledge, two stream algorithms both have its own pros and cons, which mostly depends on the environment they are working in, or tasks they are dealing with. Environment like number of tags can exist is a typical consideration in choosing which algorithm to use. Different tasks like detect the existing of tags or monitor tags existing constantly are to be concerned. So it is hard to say one kind of or specific one algorithm is much better others. My point is it depends on the practical situation in our application.
Example, a system to check out in a supermarket may only detect the existing of an item once, whereas, a system to monitor goods in a fridge may sense the same item many time. First scenario mostly has different items in every sensing, but the later one may sensing mostly the same item constantly. Unfortunately, current algorithms only deal one scenario well, or good at one scenario comparing to the other algorithms.
The trend is class 1 Gen2 those days. I will implement Class 1 first, and then extend to Gen2. These two algorithms have been already standarized, and implemented in industry.
An explanation of EPCGlobal class 0, class 1, class 1 Gen2
http://www.enigmatic-consulting.com/Communications_articles/RFID/RFID_protocols.html
Official website for documentation of these protocols:
http://www.epcglobalinc.org/standards/
Wednesday, November 28, 2007
Research on Current Technique
Weakness of Passive Tag:
Tag collisions is problematic as a tag has limited power and functionality. A passive tag can only transmit data by reflecting the reader transmitted electromagneticwaves, and hence, cannot detect nor communicate with the neighboring tags. The energy received by a tag is usually less than 100μW. Accordingly, CSMA-related methods are not practical anti-collision algorithms for the passive tags.
ISO 14443-3
Type A bit collision detection
Type B series of command sequence
ISO 15693
More detail about ISO, they are not just anti-collision protocols.
http://rfidwizards.com/index.php?option=com_content&task=view&id=242&Itemid=174
After review some anti-collision articles, I find out there are two main streams of anti-collision algorithm: ALOHA based and tree based. First one is probabilistic and the last one is deterministic.
After one weak research, I finished the first step in reviewing current papers about those proposed algorithms, and have better understanding the constrains existed in development process. I will concentrate on the most common scenario: passive tags with one reader sharing one channel, to consider the algorithm. Next step is brainstorming.
Friday, November 23, 2007
Understanding what have been achieved so far
i. Lack of internal power source in the passive tags. This requires the tag reader to powerupthese tags whenever it needs to communicate with them.
ii. Total number of tags is unknown.
iii. Tags cannot communicate with each other. Hence collision resolution needs to be doneat the tag reader.
iv. Limited memory and computational capabilities at the tag. Thus the resolution protocolmust be simple and incur minimum overhead from the tag’s perspective.
Measurement in RFID anti-collision performance:
a. Minimal Delay: Time taken for identification of all the tags should be low. From a userpoint of view, this should not be perceptible.
b. Power consumption: Due to the absence of an internal power source, power consumedby the tags should be minimal. The amount of power consumed is influenced by the totalnumber of replies sent by each of the tags. An efficient protocol will minimize themessages between the tag and tag reader.
c. Reliability and Completeness: All the tags in the range of the tag reader should getidentified correctly.
d. Line-of-sight Independence: The object attached with the tag can be located anywhereas long as they are in the range of the tag reading device.
e. Robustness: The protocol should work irrespective of environmental conditions.
f. Scalability: The protocol should be scalable to accommodate an increase in the numberof tags.
Four basic algorithms in RFID:
- Splitting or Tree Search, use coin flipping or tag ID, needs feedback from reader, and counter
- Memoryless or Query Tree, maximum number of tag assumed, prefix p, feedback each cycle, no counter. This algorithm sometimes is refered as Binary Tree in many literatures
- I-Code or frame-slotted Aloha, not 100% detection of tag, need experimental measurement in refining protocol, particular in estimating number of tags
- Contactless, special modulation: 00ZZ->0, ZZ00-> 1
Source:
C. Abraham, V. Ahuja, A.K. Ghosh, P. Pakanati, InventoryManagement using Passive RFID Tags: A Survey, Department ofComputer Science, The University of Texas at Dallas, Richardson,Texas, pp. 1–16, October, 2002.
This is a very good paper, which is almost the first part of
Taxonomy and survey of RFID anti-collision protocols DH Shih, PLSun, DC Yen, SM Huang - Computer Communications, 2006
Standard Protocols:
EPCglobal Bit-based Avg. : 200 tags/sCLASS 0 Binary tree Max. : 800 tags/s(UHF) (Deterministic)
EPCglobal Binary tree Not specifiedCLASS 1 (Bin slot)(UHF) (Probabilistic)
ISO 18000-6 Dynamic Avg. : 100 tags/sTYPE - A Framed ALOHA(UHF) (Probabilistic)
ISO 18000-6 Binary Tree Avg. : 100 tags/sTYPE - B (Probabilistic)(UHF)
Binary Tree and Dynamic Frame-Slot Aloha(DFSA) are two commonly implemented algorithms. Grouping is a major investigating area in improving DFSA.
SSim - a Simple Discrete-Event Simulation Library:
First Day Research, deciding which path to go
Search the existed RFID simulator. Most of them are not on MAC level, but on application level, to help software programmer develop RFID application in real business case.
About Simulator:
NS-2 needs C++ and OTcl. After brief reading of the NS2 manual, I found out C++ must be used to customize the protocol. It seems not enough time to build the project upon this simulator. Lots of project built up based on performance measurement by this simulator, which is the benefit in using this tool.
J-Sim is out of date, not enough reference can be a problem.
Next Step
As to get familiar with simulator cost too much time, next step is to search the material in NS2 simulation, if these materials are insufficient in shortening the developing time, I may consider to build my own simulator, like the one we use in COMP5416
Thursday, November 22, 2007
Design of a RFID anti-collision protocol for RFID Tag-Reader Communications
Due to the receding cost of manufacturing, Radio Frequency Identification (RFID) systems are used in a variety of applications to tag and track physical objects. A typical RFID system operation involves numerous tags to be present simultaneously in the interrogation zone of a single reader. Any responses from the tags can collide, leading to retransmission of tag information that results in increase in the access delay. Besides, readers physically located near one another may interfere each other. Such reader collision must be minimized. In this project, we will design a procedure to deal with tag and reader problems, while taking environmental effects into account.
===========RFID====ERA=============
Thursday, October 18, 2007
Integrate our components into Sakai
This week we start to integrate all our components. Actually four components are working till now in our group. What we do is put these four components as four tools together under one site.
This is actually a group work, then I tried to put two guys tools in Sakai in my desktop environment, finally I got one worked but another one didn't. The problem mostly from setup database.
I use HSQLDB, some guys use MySQL. So I have to configure my computer to provide MySQL service. After that, I have to create table and insert data using some function provided by each component, which is various. So I think documentation in how to localize a component into a computer is very important. Example like most components specify a local path in connecting database. By the way, I write a Readme.txt for my group member for instruction.
It is almost to the end of this course. I learnt lots of new things through this course, and start to know what is software engineering. It is not very interesting as I thought before, especially we use some tool like Sakai. It is not properly documented and not well supported by large community. Another thing I dislike is debug. Debug is normal in programming, but 3/4 of the time taken up by debug is not exciting isn't it? Luckily, we have Junit, and Ant, Maven to support in developing. Those are very handy tools. Otherwise, 99% is debug time.
Bugs are caused by different reasons.
The common one is rush programming, or trial programming. Since all those frameworks are new to me, there are different ways to fulfill a task or a function, most case I implement some logic and see whether they will work. This should belong to normal programming process, trial and debug.
Another reason is version uncompatible. Most of the time, I follow the literature, but found out I use an old version of Jar or a too new version of Jar. Then I have to give up following the example and search for other example code. A very good case is Hibernate2 and 3. They use different import path, which means once you change the version, you must change your code. And thing can be more complex. When you use Spring, it support Hibernate, but you should figure out which version it supports. When you find out a good example from Spring2, and want to use it, maybe you have to change your hibernate code in deploy to Spring 2. Then later you find out Sakai doesn't support Spring 2, then you will have to change all things back manually.
Other reason can be not proper test of code. The software provider doesn't test their code properly then release the version. The case is Mevenide in Linux, which is a rubbish plug-in, don't try to use this like Ant in your Eclipse.
The course
This course gives you pressure to learn more than teach you things. It schedules project and ask you to know, to figure out tones of problem. It is OK, since this is a practical way to understand software development.
But the group project comes out not much like cooperating work. As our components are not integratable practically when we start individually. And it is beyond the initial idea of cooperated work by using Trac and SVN. (they are not good tools, at least what we are using are bad) A little bit disappointed about the misleading at the beginning.
Monday, October 08, 2007
My Project into Sakai
Follow the instruction in the doc, download sakai.bibliography example, put the weg/ file to maven/repository/, be sure to add a dependency in project.xml of the sakai-tool-filter-1.0.jar
My problem is:
My welcome page is a static page, rather than a redirect page. When it first shows the welcome page, it can't link to those jsp page under jsp/. Then after an hour test, I start to redirect this page to a page under jsp/. Now it is working well. After redirect to a jsp page, you still can link back to that static page, the interesting thing is, now this static page starts to work.
Refer to the sakai.bibliography example, I add a header to my page, and some format, which makes my pages looked very nice. You can have the whole page in the screen, instead scrolling the bar. The thing to control these format is under include.jsp file and a sakai.jsp related.
I should say Sakai is lack of documentation as what we usually do in our program development.




