Wednesday, December 25, 2013

I see the "End"

Countless thoughts 'r fighting in the mind,
What to pick, how to interpret, that I don't know,
Feels cold, these pijamas are too old,
Door closed, lights went off

Seconds tick, I 'm still with my pencil,
Writing random when I ll find my wisdom...

They told I 'm innocent,
But they just told so,
She told She 'll not let me alone,
But she was just like them

Seconds tick, I 'm still with my pencil,
Writing random when I ll find my wisdom...

I was happy, I was static,
I had a life, I had you,
I thought so, But I was all wrong,
It was too late when I realized,

Seconds tick, I 'm still with my pencil,
Writing random when I ll find my wisdom...

I can't cry, They say behold,
I can't cry, They say be like an adult,
I can't cry, They say I 'll loose my respect,
Amma, I want to cry, I am innocent,

Seconds tick, I 'm still with my pencil,
Writing random when I ll find my wisdom...

I see no light, my cell, it is dark,
They off my light, I 'm afraid of dark,
I see a thin light, is it the sun or the moon that I don't know,
Thaththa, Come to my room with your torch,

Seconds tick, I 'm still with my pencil,

They told it is a matter of seconds,
They told it is painless if I co-operate,
Dear God, forgive me for my sins that I never did,
Dear God, will I see them in heaven?

Writing random tomorrow I ll find my wisdom...











Friday, November 15, 2013

Lost in Life, even deeper


Persuading targets, achievements, goals,

Forgetting your favorite songs,

Passing the beaches at dawn and dark,

Ignoring your childhood heart beat,

Without knowing the 'dot' of Life...


Tie around the collar,

Rolex around wrist,

Filtering sun on eyes,

In side Mercedes,

A Life, moves fast... Leaving "The Life"  apart


Smile, A heartiest smile all need, When was the last?

Kiss, A gentle kiss she deserves, When was the last?

Call, Her Son's call she is waiting for, When was the last?

Word, The "Love" what family needs,  When was the last?

Life, A Living life among lost soles, When was the last?


Leave the bars behind, come out,

Breath till the heart beats fast,

Scream loud & dance with the waves till sun goes down,

Show the happiness of being you, letting YOU out of you,

Life goes on... moves on... Let it be always ON...


Lost in Life, even deeper with the real YOU.




Saturday, November 9, 2013

Lightning Thoughts


It was raining, I was doing a horrible dance in the rain,
naaa, I was on the bed watching the rain...

She was walking infront of us, wow she was amazing, we all wanted her,
She turned back & looked at us, ahhh you can have her machan...

Land cruiser was next to me in traffic jam, I was going to give him a race, let's see,
lights changed, never mind, with another car this is too old ne...

Tuk tuk came on to him in wrong lane, he was like I m going to thrash u with all my dirty words,
tuk tuk thrashed him instead & he smiled...

Life is about to change, I ll be a new man from tomorrow,
tomorrow morning, I cant remember yesterday...

oh yes, I will wake up @6.30 for lifting irons,
ah it is 29 & I m dreaming on getting ready, @30, 7 the next round number...

Watched Titanic & wanted to be the Jack,
days later, hell no he is an idiot...

I am going to follow all good coding standards, I ll keep my code clean oh Yes,
Prasad, can you write that logic? Yes, sure. No time for standards now...

She was drinking  රේණු, she looked at me & killed me with her smile,
I cuddled her tightly, kissed her forehead & rubbed her hair, in my dreams...

Opend my eyes in morning bed, thought I should write this down,
seconds later here I am writing those crazy worthless shitty words on My Blog, Thanks God, I finally did it...



Saturday, October 19, 2013

Saturday, June 15, 2013

Lost In Life...



Here comes the light of the day,

Day, a fresh start with many duties,

Duties,  that decides prosperity of life,

Life, no one remembers or cares till they see death,

Death, what no one wants or expects but it comes like a light,

Light, But I see lights moving fast on the roads at night,

Night, I was thinking sitting aside while relaxing, what actually we are doing on our Life,

Life, here it comes again But still no one feels except the rivalry 

Tuesday, February 28, 2012

Cast of Dynamic Server-Side Invocation

In this post it will just be a discussion on the topic mentioned.

Earlier it was simply client asks something from server and server returns it back. Only if client made a request, server processed it. This still exists in many web applications. But if consider many web applications like Facebook, Twitter & even Google apps, even without user interaction sometimes server makes notifications to user if any. 'If any' is much important otherwise constant checking on server-side update from apps in client-server architecture is not efficient as it consumes considerable system resources repeatedly and less scalable.

Few concepts and technologies for server-side invocation is listed and discussed below.

Ajax

If you intend to use ajax for server-side invocation, as a developer you have to think twice. Most occasionally think is this what you are really expecting.

Something to be alert

Ajax is a variation of java script. It dynamically pulls data from server side hiding in client side web apps. It also leverage asynchronous interaction as it runs in background without blocking client side. That is where it differs from typical java-script. Therefore be noted that AJAX does not define new kinds of HTTP requests or anything else. It just performs a HTTP request in the background by using XMLHttpRequest API.

Therefore in Ajax as it does not help to pull data to client, but just polling data  from server, in an application like web mail client, logic will be like constant checking on server-side update & poll the results. This polling approach causes an event latency which depends on the polling period. Increasing the polling rate reduces event latency. The downside of this is that frequent polling wastes system resources and scales poorly. Most of the time this result can be empty as no sense on real-time updates.

Comet

Comet (aka Comet programming) is a web application model in which a long-held HTTP request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet attempts to deliver “push” communications by maintaining a persistent connection or long-lived HTTP request (long poll) between the server and the browser. Like AJAX, Comet is build on the top of the existing HTTP protocol without modifying it.

Two things to know about HTTP
  • HTTP protocol is not designed to send unrequested responses from the server to the client.
  • A HTTP response always requires a previous HTTP request initiated by the client.
Then how comet addresses these initiative issues in HTTP.

Long Polling

As in general HTTP, client sends request to server, but server does not reply immediately. This is because of event driven process handling. Only if an event occurs in server-side, server will response including the event data. After receiving the response containing the event data, the client will send a request again, waiting for the next event. There is always a pending request which allows the server to send a response at any time.

HTTP Streaming (aka HTTP server push)

Server keeps the response message open. In contrast to long polling the HTTP response message (body) will not be closed after sending an event to the client. If an event occurs on the server-side, the server will write this event to the open response message body. The HTTP response message body represents a unidirectional event stream to the client.

Finally all these mechanisms run on top of existing HTTP. Only thing is they have been adapted to keep a live connections from server to client.

HTML5

Comet programming has been achieved in HTML5 by using Server-Sent Events (SSE). Browsers which support HTML5 & SSE open an HTTP connection for receiving data from server side push notifications. This implicitly managed by underling SSE API. Server-Sent Events includes the new HTML element EventSource as well as a new mime type text/event-stream which defines an event framing format.

var source=new EventSource("EventGen.php");
source.onmessage=function(event) {
  document.getElementById("result").innerHTML+=event.data;

};
 

The EventSource represents the client-side end point to receive events. The client opens an event stream by creating an EventSource, which takes an event source URL as its constructor argument. The onmessage event handler will be called each time new data is received. The valid header defined by SSE spec is text/event . However a valid Server-Sent Events implementation has to support the mime type text/event-stream at minimum.Therefore from server-side explicitly define header type to text/event-stream.

SSE are based on HTTP streaming. SSE has performance drawbacks with respect to some existing protocols but yet potential to be become the dominant protocol for use cases such as just a unidirectional server push channel is required. The Sever-Sent Events protocol is much simpler. No handshake protocols have to be implemented. Just send the HTTP GET request and get the event stream. Furthermore Server-Sent Events will be supported natively by all HTML5-compatible browsers.

Wednesday, December 14, 2011

MongoDB : Remote Access - Part 2

As stated in previous post on MongoDB, once installed, user can verify by opening shell & by typing mongo. It will by defualt connect with the table test (which is not a one you created obviously) like below if everything worked properly during installation.


MongoDB shell version: 1.4.3
Wed Nov 23 14:31:29 ***
connecting to: test
>


Before moving on to remote access, better to know few very basic commands to check what you really wants to know. Type show dbs which will show what are the existing databases. Then if you want to use existing one or new one type use dbname which will not create a database at the exact moment but on the fly if it does not exist. In mongodb table is considered a collection. Actually here, this is not exact same as the table in RDBMS but for clarity consider it is so. For to view all the collections in used database type show collections & to use one, type use collectionname. To view all the data inside of selected collection, type db.collectionname.find(). Here in mongodb, once you selected a database, when querying with collection you always has to use the reference of the database with query. That is why you have to use db.$what_ever_the_bla_bla next. You can find sql to mongodb mapping relationship page here. 


Now let's move to setting up a remote connection to a mongodb server.  It is better to have two terminals. One to start server & listening on incoming requests. Second to locally execute & view whether remote calls have worked (optional).

To start server

1. Create a directory structure in root
sudo mkdir -p  /data/db
2. Grant user permission to it
sudo chown `id -u` /data/db

3. Run mongo server to listen on incoming connections
mongod
You will noticed that sever is starting & saying it is listening on port as indicated in below image.
 
But If the result is like below

Then do the following.

4. Find mongodb PID & kill it.
ps -eF | grep 'mongo\|PID'

 
5. You can see in first shell image, I have executed this command & obtained the ID 1143. Next is to kill that process.
sudo kill “PID_VALUE”
Re-run the mongodb server: mongod
This is because if mongodb was installed using sudo apt get install, it will always run each time machine reboots. Therefore before server starts up, already running process has to be killed. Then server will start properly and keep on listening for incoming connections. To connect to a remote server simply type mongo remoteIPaddress after starting the mongodb server on both sides.To get mongodb execution status use sudo status mongodb


From now on there are plenty of enough resources available to continue with mongodb. Go after & enjoy the power of mongo.

Monday, December 12, 2011

MongoDB | Document Oriented, No SQL open source database - Part 1

OBJECTS. It is all about dealing with objects. That is, storing them, retrieving them back, updating them PLUS encoding, efficient indexing, replica managing etc.  Typical object can have its own as well as inherited feature sets. These can be considered as key value pairs like below.

{
    "username" : "bob",
    "address" : {
        "street" : "123 Main Street",
        "city" : "Springfield",
        "state" : "NY"
    }
}
 
Above is an example of simple nested JSON object. When remote method invocation or inter process communication happens, by using this kind of mechanism to send data can be more convenient. When received, by querying, storing data back in SQL databases is not needed if there exits a secure, storage effective  document oriented querying language. That is where MongoDB fits with BSON format. It is a cross language database system yet to come with more features. BSON helps to store JSON objects as binary objects which reduce size & increase indexing & retrieving performance.

In this post, a simple working scenario for successfully installing mongoDB on Linux based operating system (basically on Ubuntu 10.10) will be discussed.

Installation

1. Add MongoDB repository into Ubuntu assuming installed ubuntu version is 10.10
Add below line any where of source.list file.
deb http://downloads.mongodb.org/distros/ubuntu 10.10 10gen into /etc/apt/source.list.


2. Create PGP key and Install MongoDB
We need to generate key to gain access into MongoDB repository.
Use sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 to get keyserver
Then do sudo apt-get update to update your repository.


3. Do sudo apt-get install mongodb-stable to install mongoDB into your Ubuntu.
If that didnt work, use just sudo apt-get install mongodb instead of -stable
Test by run command mongo and you will get MongoDB shell version

Now we have to configure mongoDB with PHP Driver so that you can interact with mongoDB programetically via server-side scripting language.


4.  Configure MongoDB PHP Driver
Before configure mongoDB PHP driver, first need to have build-essential, php5-dev and php-pear.
To install those:
sudo apt-get install build-essential php5-dev php-pear

**remember to tick on first two updates in software updates/updates in synaptic package manager. Otherwise system will not download all the packages needed & later steps will fail.


5. Then install pecl driver for mongo (For connecting with PHP)
sudo pecl install mongo


6. Add Mongo Extension into php.ini
In the end of line, add extension=mongo.so into /etc/php5/apache2/php.ini.


7. Restart apache by
sudo service apache2 restart


8. Check with phpinfo() to see if MongoDB already installed.

From next post, How to get remote accessibility by starting mongoDB server & checking it out via remote mongoDB terminal will be discussed. 


Good Luck :)
 

Friday, October 28, 2011

J2ME, Symbian C++, QT or Android :: Why & Where?

"Once upon a time there was a language called J2ME", you will not be surprise if you hear this few years later. But it should not be forgotten that each of these languages have its own context or domain which can vary according to the needs of the customer.

Why & Where...

A well known truth about J2ME is that it is a sandbox language. I.e. It always needs to stand on top of a another language stack (OS) & hence J2ME is always restricted to access some kernel level functionalities of limited devices because of this 3rd party behavior. For instances one can not write an app which can be auto-started in device boot up without using some other party interaction like push registry. Of course by using push registry one can write an app which will auto-start but via a timer, sms or http like interaction signaled by an outsider. Therefore without any interaction auto-start in boot up is impossible in J2ME. Another scenario is accessing device key pad for locking and unlocking purposes is also impossible as J2ME is not allowed to access locking API of the device. Actually J2ME does not even has such an API for locking. One more thing to notice is that every mobile device has a settings programme which is responsible for managing installed applications. In J2ME context you can never write an app to get the control of this settings app which is silently handled as a device kernel level programme.

As mentioned the primery reason for this is J2ME is a third party language pre-configured and installed on top of another core language stack of the device. For example simply consider Nokia mobile phone which claims to support for J2ME. But the fact is Nokia has its own language stack as the core of the device called Symbian.  Symbian OS has its own rich APIs to directly interact with hardware level and other core functionalities of the device. Symbians S40, S60, Symbain 3 are examples for such Symbian OS APIs equipped with SDKs to leverage developers for developing apps. Both the carbide.C++ and the later added framework called QT C++ can be used for writing applications for Symbian OS. Above mentioned impossible scenarios in J2ME can be achieved via these two implementation frameworks.

But as J2ME hides internal complexities from developer, for developing some typical enterprise level apps, J2ME is apparently efficient and easier than using Carbide or QT. Hence language depends on requirements as always. Focusing on Android here is irrelevant because it is that big buzz word everybody talks about these days. To be it as this much of huge buzz, its complete OS stack has played an incredible role. Because of this perfect organization from ground level APIs to higher level APIs in its OS stack, developers have been able to develop apps without considering dependencies, hardware abstractions, library couplings etc. But there is an one little problem with Android. I.e. its fast growing development life cycle. Not like any other OS versions of other devices, Android does not provide long term service for once released version. They tend to grow fast and if earlier version can not tolerate with the later version, bad luck for the users those who have that earlier version of device. But generally people rarely open their mouths up on this.

Therefore Why and Where is a decision made by developers.


Sunday, October 9, 2011

Checking out and setting up QJSON for QT symbian

Generally JSON is simple data exchange format like xml but more simple and flexible than it. Specially when transferring data in XML format, it adds more weight to the actual information we want to transmit as information is overwhelmed by opening and closing tags. This can sometime be useful and sometime be an overhead. To avoid or reduce that overhead we can use JSON. It stands for Java Script Object Notations which can be used to transmit data over http as JSON object. There are many JSON related online references are availble in internet. Therefore What we are focusing is QJSON which is QT based library that maps JSON data to QVariant/QMap objects.

We will consider making qt lib and setting up the path properly via QT creator IDE.  qjson library is not implicitly available with default libraries comes with QT. Therefore you have to checkout qjson project source separately and then build it and generate a qjson lib file. One thing to notice is do not try to download qjson source from source forge because due to some reasons it is not the complete project for one to develop lib file they need easily. That source hides some essential files like .pro file etc which are useful to generate lib file directly by using QT Creator IDE.

For checking out the latest version of qjson, first you shoul have a git client installed in your machine. Git is a FOS distributed version management system that can be downloaded from official git site. qjson repository is hosted here. For checking out this as online from downloaded git client, usegit clone git://gitorious.org/qjson/qjson.git command and import complete latest qjson version to your local disk space.

Then open this qjson project via QT Creator and build it. It will create qjson.dll.a lib file under build/lib folder of qjson source. It is like your_disk_name:/qjson-0.7.1/qjson/build/lib/qjson.dll.a. Now all you have to do is to tell QMake in your .pro where is located your header files and lib file.

Ex: type as following in any where of your .pro file
INCLUDEPATH += "c:/qjson-0.7.1/include"
LIBS += "c:/qjson-0.7.1/qjson/build/lib/qjson.dll.a"
 
That's it. Enjoy qjson in QT. Some initiative code snippets on qjson for qt can be found here.


 


Sunday, October 2, 2011

Distributed Resource Management System for Business Process Management Systems

I did my final year research on Distributed Resource Management System for Business Process Management Systems. I have shared my research abstract which was published in UCSC researh symposium 2011 here with. For the purpose of research evaluation and demonstration, RESTful Distributed Resource Management System (DRMS) engine has been developed and integrated with one of FOSS BPMS.

Business Process Management (BPM) is a discipline which maps human tasks and non human tasks according to a predefined workflow in a way that technical and non technical people in the organization can administrate, monitor and communicate effectively and efficiently. Considerable amount of BPM software are available to automate business processes. When business becomes more complex and needed to be expanded or out sourced, a single BPM server may not be sufficient to tackle all these processes. This may lead to manage several BPM systems within one organization. However if those servers are not properly connected and configured, even allocating a single resource for a single BPM system can also be difficult due to the lack of information available at a glance. Apparently a mechanism should be established to enforce cooperation among homogeneous BPM systems.

DRMS for YAWL is a distributed resource management system which leverages administrative activities like monitoring, decision making and scheduling for YAWL, an open source Business Process Management System (BPMS) developed by YAWL foundation. When business is needed
to be expanded to cope with internal or external transactions, organizations should have to increase their technical servers from one to several. At this stage when each of these servers is dealing with organizational processes (business processes) instead of writing their own logic to tackle with business, they can use existing BPM engines to get efficient and effective results. While using several BPM systems within same organization, accurate coordination among each is
highly required to place correct decisions and schedules. Placing a new business process tends to be difficult if the administrator cannot deterministically come to a conclusion, in which BPM engine he should place the new process. In fact that is what DRMS is trying to solve.

DRMS uses existing resource patterns and introduces some new patterns to cope with distributed resource management. DRMS is equipped with two major perspectives called snapshot view and rule execution. In snapshot view, global synchronized view and non-synchronized view are considered. Synchronized view is what administrator can get as a real global view of all resources in BPM cluster. Non-synchronized view lets administrator to explicitly decide in which distributed BPM servers’ view he tends to view in a given time independently from other servers. Before making decisions when managing resources distributed across a cluster of servers, it is more important to analyze the current state of the cluster; thus, we came up with this idea of global view. For this, we have extended few resource patterns where more significant and important features of a state of the cluster can be extracted easily. By thoroughly analyzing, we manipulated several key factors of functions which must be available in any view, to speed up the process of making more effective decisions. The idea of granting administrators both synchronized and non-synchronized views can leverage identifying different states of the cluster before executing the correct rule set. There administrators of the organization can analyze independent views by switching among each of BPMS by standing with a single interface of DRMS. This is facilitated in non-synchronized view. Gradually when cluster expands, implicit information gathering from cluster by the system is more efficient and it is facilitated by synchronized global view.

Views help to decide on decisions that are going to be made. In fact to execute those decided decisions, there should be a distributed rule execution mechanism for DRMS which is called rule implementation. At the moment these rules can be evaluated and put in to action in the synchronized view. Distributing resources according to capabilities, roles or positions and assign administrative access levels to employees are two patterns which are implicitly available in DRMS. Distributing newly available work items (processes) among BPM cluster based on how similar kinds of processes were executed in history is an advanced solution. Mutual and union resource extraction and updating the cluster through global flooding with or without a restriction are some sub patterns that are also available in DRMS for YAWL.

DRMS also supports for load balancing up to some extent. Workflows will be deployed according to the selected load balancing algorithm. Four suggested workload routing algorithms namely random, round robin, priority and dynamic help to adjust the load of the BPM cluster as determined. At the moment DRMS has been developed to work with YAWL BPM engine through mainly communicating via its resource engine. However one of the key features of DRMS is that its implementation is completely independent from YAWL’s implementation issues. That is, DRMS calls to YAWL remote functions via RESTful service calls over HTTP and in order to facilitate this DRMS service, it would be more appropriate to have a homogenous BPM cluster. That means each and every BPM engine should be from the same vendor or otherwise must be same open source product. Apparently, in reality, it is very rare that a particular organization may use different kinds of BPM engines within their domain as it adds performance and scalability issues while integrating, controlling flow of events, associating data and handling exceptions due to different architectural implementations of each BPM systems.

Main objective of this project is to show that if managing several BPM engines, by using a mechanism which is equipped with view analyzing and rule execution by extending standard resource patterns and introducing some new resource patterns to fit with a BPM cluster, both resource and work item scheduling can be orchestrated more easily and effectively. It adds a central accessibility for all distributed engines. Hence, we suggest by applying our studies to existing BPM systems, both local and global contexts will be implicitly available for customers unlike existing BPM engines support only for resource management within its local context. Therefore, as distributed resource management among homogenous BPM engines via work flow patterns is not yet ported, we hope our research findings will be useful in coping with similar kinds of situations in future emerging extensible Service Oriented Architecture (SOA) based BPM engines.

Sunday, April 10, 2011

Inter-Servlet communication among different contexts

Suppose you have Servlet X in Web App A and Servlet Y in Web App B. You want to pass some parameters through your Web App A's JSP to your Servlet X and there that Servlet should pass those parameters again to another Servlet in difference context (i.e Web App B's Servlet Y) and then redirect back to the calling JSP in Web App A. Users may feel that they are dealing with single context but literally it will be tow difference contexts.

I will direct you to experience this by 5 steps.

1. Viewer JSP - index.jsp (User will simply click a button to pass parameters to a Servlet within the same context)

< Ex: input type="button" value="Fetch Info" name="Get_Info" onclick="location.href='ServletX?action=getParticipants&id=user&pwd=yawl'"/>

Here after you clicking the button "Fetch Info" it will call "ServletX" Servlet in the same Web App (same context) along with "getParticipants" and two other parameters.

Scenario discussed here is retrieving some info resides in another context to a jsp by invoking two Servlets.


2. Servlet X will collect parameters in its service method

String action = request.getParameter("action");
String id = request.getParameter("id");
String pwd = request.getParameter("pwd");

Then We can redirect it to another Servlet as below,

request.setAttribute("output", action );
ServletContext cont = getServletContext().getContext("/WebAppB");
RequestDispatcher dis = cont.getRequestDispatcher("/ServletY");
dis.forward( request, response );

//getServletContext().getContext("/WebAppB"); is the important part because in this way you can jump in to other contexts and by invoking the method getRequestDispatcher() you can forward messages to what ever jsp/servlet combinations as wish. But if you use getRequestDispatcher(String path) of the ServletRequest interface it cannot extend outside the current servlet context.

For more info visit the api for ServletContext.

3. Then Servlet Y in Web App B can access the parameters and apply what ever the logic has to be performed.

String action = (String) request.getAttribute("output");

//Business logic goes here

request.setAttribute("output", action);
ServletContext cont = getServletContext().getContext("/WebAppA");
RequestDispatcher dis = cont.getRequestDispatcher("/index.jsp");
dis.forward(request, response);

Here after applying what ever the logic you wants, you can switch back to WebApp A servlet's context by invoking getServletContext().getContext("/WebAppA");. Then you can redirect output variable to index jsp in WebApp A's context to view the results.

4. Therefore to receive and view the results you need to implement a code similar to this in your earlier index.jsp page.

<%--

if (request.getAttribute("output") != null) {

String suc = (String) request.getAttribute("output");
%><--input type="text" name="output" value="<%=suc%>" readonly="readonly" disabled="disabled" --/><%

}


--%>

5. Last step is very important because without setting crossContext parameter to true server will not allow to happen inter-servlet communication in two deference contexts due to security policies.

There are several ways to do this. First one is enabling in each web app's perspective and the second one is enabling in server side which affect globally for all web apps hosted.

1. In this way you have to set
crossContext parameter to true in each and every Web App's context.xml file which resides in META-INF folder of your web directory.

2. Without configuring each context.xml files, you can directly enable
crossContext parameter to true which resides in context.xml file in server's (Here it is Apache Tomcat) conf directory. Then in deployment time server will create context.xml files for each and every web apps in its host and enable crossContext parameter to true in each. These individual contexts files are located at $CATALINA_HOME/conf/[enginename]/[hostname]/ folder.

For more info regarding Tomcat's context container visit this link.
This is just a one scenario. But this can be applied in various ways to achieve communication among deference contexts in same Web Container.

Saturday, January 8, 2011

MCrazies : Keep in touch with your favourite movie theaters



MCrazies simply implies the shortened name of Movie Crazies which is a simple sms mobile application can be used to get movie details of your favorite movie theater/s purposely developed for movie crazies :). It was developed as an appzone application of Etizalat. In detailed this application provides information about on going movies in famous theaters. In some urgent situations browsing through the internet to get information on the on going movies in theaters becomes so irritate. But getting those information by sending a simple SMS sounds more easier and simpler. You don't have to spend time surfing the internet or calling friends to get these information anymore! Just type
mcraz SPACE <name of theater 1> SPACE <name of theater 2> and send to 4499 from your Etisalat phone.
Here, name of theater 2 is optional. If user wants to get details of on going movies in more than one theater, then it is possible to type several theater names by leaving a space in between each theater name (case insensitive). User will get a SMS in return with the corresponding results for his SMS.

At the moment mcraz supports eleven movie theatres including Majestic City - Bambalapitiya, Savoy1 & Savoy2 - Wallawatta, Liberty - Kollupitiya, Sigiri - Katugasthota, Ricky1 - Colombo, Eros - Wallawatta, Arena - Katugastota, Regal - Colombo, Concord - Dehiwala, Cinemax - Ja-Ela and Quinlon - Nugegoda. Here User does not need to type the location of the theater and even the exact name of the theater. Application can tackle with validity of names up to some extent like by typing mc or majestic or majesticcity or majesticsity will be considered as Majestic City and reply to the user accordingly. So do not be hesitate to use MCrazies if you are a person who wants to absorb the real enthusiasm of watching a good movie by sitting in a quality theater as soon as you was asked to or you feel to do so :).

Friday, September 10, 2010

Semantic behavior of Google Search Engine

Semantic Web...? Let's be dirty from the nutshell. Nothing to freak out. Semantic means meaning of what we mean :). Suppose you want to search a country but you can't remember the name. But of course you know some facts of social, economic and geographical backgrounds. What if you type all the information you already know on google's text area. Will it be able to give you the exact country at once or will it search through every possible combinations and grant you thousands of results in which many are useless for you. Yet google is not that much of brave enough to deal with that kind of semantic mapping procedure as a background thread.

But certainly you may have seen if you type a single word and google it, there are suggestions appears bottom of your result page. Suppose the word is "Srilanka" then you may see a result like below.
Here they have treated the word Srilanka not just as a syntax of a web page but an additional added weight to gain its meaning as it is. Search Engine has been able to identify that Srilanka is a country and hence it is suggesting you to do following related searches also if need, like "srilanka map", "srilanka news" etc. Though you see it every day, did you simply ignore it or didn't want to go further with it or thought as this is also a kind of ordinary query searching methodology.

Of course this is some what like alpha version of semantic SE and this will not appear if it is not just a single word. The issue is, google is pretty much considering about their query retrieving performance and so when it comes to several words underline process complexity goes wild and therefore time consumption gets increasingly high.

How ever there are several semantically semantic search engines. "hakia" is a one such and you can make use of it via www.hakia.com. Hopefully there will be an another rat race of semantic era.

Saturday, August 14, 2010

Sustainable Development #Energy

Today world is facing several critical problems that even the modern technology has also failed to answer perfectly. Growing population of the earth, water and air pollution, running out of fossil fuel etc. But among those most recently discussed aspects were CO2 emission and effects cause to living beans of the earth because of it. We all know co2 emission to the atmosphere increased so rapidly after the industrialization in early 70s. Since then everybody talks about it. but no one cares to take strict actions without hesitations at all.

When it comes to a country like us, of course we have several fall backs and humps towards to the ward sustainable. If I ask what is the key advantage that we have as Sri Lankan's is our position in Asian ocean. We have learnt of it heard of it since our child hoods. But literally doubts are there whether our leaders know that well when we peer in to the actions they should have decided years a go. Thing I want to focus is that we have ocean all around us. We are a tropical country. We have rain forests covering up considerable sand of our land. Wind & Sun rise is of course there. Our holy land is strength enough to grow bio crops too.

I am addressing these issues because in the sense of sustainability, We should give priority to efficient consumption of energy sources and adapt according to melting of those. That means now world is moving towards various kind of re new able energy sources rather than just staying with fossil fuels. One thing is for sure that if demand for the fossil fuel remains as now, there will be a potential risk of world to be in dark. More than 80% of our energy consumption is depending on fuel and one of the coal power station is developing to add up with it. We cant afford for nuclear power plants too. Scientists have found out and even manufactured vehicles those work on re new able energy sources like solar power, wind and even in bio crops like sugar cane. Some local people also have done researches and found out nature friendly vehicles and electronic devices. These innovative and talented creations should have been applied to development process of the country through good hands practically.

Saturday, May 8, 2010

Tips & Tricks to J2ME 3D Gaming...

Here I am going to share some experience that I had to face during my short j2me 3d gaming life. Actually I still do many mistakes while coding and consumes several hours sometimes for to catch them. So It is better for me and those who are new to this field to write down some important points which we all forget to focus or neglect to address.
**important:: you better have some considerable knowledge to understand these points because I am not going to explain them in detail.
1. After loading any image or drawing any object or font do not forget to call flushGraphic(). Otherwise No errors will come but relevant images or objects will not draw on the screen.
2. When using Gaming Canvas there are some restrictions regarding key events of the phone according to the way you call gameCanvas’s super class constructor. That means if you call in your constructor as “super (true) “it tells suppress some key events which calls from your class to it’s super class. If you want to assign events for every key then you have to call as “super (false)”. By default gameCanvas support for gaming keys only.
3. When dealing with sprites, specify their proportions correctly. That means if you are going to specify width and height for the sprite, it should be divided in to equivalent segments.
Ex: Suppose you want 10 by 10 sprites to move and total size of your image is 100 by 10. Then when specifying the width you should give 10 exactly to have 10 equal segments. Otherwise image will not load.
4. Use whatever updating code parts earlier than drawing code parts. Suppose in your game loop you first call draw method which takes care of drawing your stuff on the screen and then you call update method. Update method simply update positions of your objects, handle AI etc. If you call update after the draw function then those updates will apply in the next game loop. Actually it does not add much different to the game. But in some cases like low processing power phones it can be felt if your update method is complicated. So it is just better to use this as a best practice.
5. m3g world that you are going to load in to the phone memory can be a large one. It may contain lot of polygons. So when loading it to the screen and rendering it while in the game play, frames might not be smooth enough or game tends to be slow. So use separate m3g worlds and load them only when need. Try to reduce unwanted polygons in mesh objects as much as you can.
6. If you did load worlds as above you should definitely keep remember to null the unnecessary world objects later. Because you load those worlds and extract their objects and add them to a final one world. After that earlier world objects become use less. Otherwise it adds unwanted weight to the game and in some phones it causes to throw out of memory errors.
7. You load m3g world perfectly according to your code. But when you run it it only displays an empty screen with no errors. This is because some textures of your world might be lost or naming mistakes of images.
8. Reduce far clipping frame of your setPerspective method if you want to add some realistic view to the game such as loading distance objects when you are moving towards them. It also adds a little bit of speed to the game.
9. Use image of alphabet font in which fonts have been packed optimally. Use these fonts for menus, alerts and everything rather than using drawFont method because if you use drawFont, that font size and type may vary according to the phone and may not support as well. But if it is an image of course you can call each font separately and create your own messages.
10. Finally do not apply java’s object oriented concept much more. Because if you have written so many classes for each object then your game loop has to switch back and forth for retrieving objects and calling functions. This leads to consume some performance of the game in limited devices.