$ thought | blog

Place to serialize my thoughts…

Archive for the ‘Personal’ Category

DNS-323, PS3 and UPnP

without comments

I recently bought Dlink DNS-323. I am using this in RAID 1 mode to copy my data and archive images.

Dlink DNS-323

I am also using it as media server (UPnP) for streaming video / audio and image content to PS3. The whole setup is very easy and lot of fun! I copied entire catalog of movies / audio and digital image archive and realized the setup is not working properly. I kept getting error while movie streaming on PS3.

"This content cannot be played (800288D8)"

I was very frustrated by the error message. Earlier I thought this is happening due to lack of processing power at DNS-323 end. After careful examination that possibility faded. DNS-323 has Marvell 500 Mhz processor, 64 Mb RAM, 1000 Mbps Ethernet connectivity. There are two Samsung Spinpoint 1 TB each HDD placed inside. I wasn't expecting any bottlenecks for couple of users.

I was about to return the unit and then I came across this fantastic online resource. I installed Mediatomb as UPnP server and disabled in-built application. This allowed me to have seamless access to my video content without any issues! I will recommend you to install this on your DNS-323 so that you can enjoy secure storage and media server. :)

This setup is good for -

  • Archive of all of your files. No more nightmares of hard-drive failure!
  • Cheap and abundant storage.
  • Media serving capabilities at home.
  • Expose firewall-enabled FTP server over internet.

Don't expect miraculous speeds though. 3-4.5 MBps is average transfer speeds for me. This is enough for me to backup and access stored data. For faster access, I prefer firewire or USB 2.0 drive. Figure out yourself about your requirements. Ciao!

Written by Sachin

July 20th, 2010 at 9:20 am

Posted in Personal

Tagged with , , , ,

Delete My Account

with 3 comments

I have few questions for you -

  • For how many years, are you using Internet?
  • Can you remember all the sites where you created an account or shared your personal information? (Email, Phone number, Birth date etc.)
  • Although you can remember all the websites you registered, can you keep those accounts active forever?

Whenever I ask these questions to myself, I get uncomfortable. There are probably 50 websites, who have my online account and personal information. It might be more in most probability. Considering this might be similar situation for most of us, how to make sure that you can delete your account? Most of the websites like Google / Yahoo allows you to delete the account completely. Although few of my readers will love to debate about its actual process. :)

Considering our faith in these online services, I am not quite sure what does complete account removal means for these online websites (Facebook / Gmail / Yahoo etc). Even if it is not complete removal at least I have an option to go and remove my online account information. For most of the websites this option is not available at all!

I will love to make this as public awareness that we should have account removal as standard feature on all the websites who allow users to sign-up. It should be complete removal of account (including all personal information) and not limited to just un-subscribing user from their mailing list.

This will make lot of users much more comfortable to create online account.

Written by Sachin

May 3rd, 2010 at 7:50 pm

Posted in Personal

Tagged with

Alfresco: Workflow managed by JavaScript

with 5 comments

If you are a regular reader of this blog, you might have figured out that I am currently working on a project involving alfresco at the center and it's a content management system. Earlier I have worked with Content repository (Apache Jackrabbit) and that was a good experience. Alfresco is next step of a content repository which extends it into a full blown content management system and much more. I was working on a problem where we defined a custom (Advanced workflow) to be precise in Alfresco lingo. This workflow was needed to be monitored, managed and accessed only via a webscript as we have used webscripts to do almost everything in our project. I was very pleased to see this, but that is only available in 2.9 labs release (as of now). We are using alfresco 2.2.0 version for our development and that is production stable version, so I have very little choice but go with production version. Alfresco has very limited JavaScript API support for workflow manipulation and that was difficult job for manage. There was no other option than writing custom JavaScript API which allows to manage workflow in Alfresco. We did that and it was very powerful and easy! :) I wanted following features for JavaScript API -

  • Easy to extend
  • Can handle any workflows
  • Provides easy ways to retrieve tasks, definitions, paths etc.
  • Provides as much functionality possible which is available in Alfresco Workflow Console.

Alfresco workflow console is command line interaction component which allows you to manipulate, get information about workflows using simple commands and I wanted to do all that using JavaScript. I started exploring the source code and found a class 'org.alfresco.service.cmr.workflow.WorkflowService'. This class has generic API which allows you to do all the operations possible through workflow console. This bean is used for workflow console operations. So all I needed was expose this bean in JavaScript as root object and start using it. That simple! I wrote a simple java class to expose the bean as follows:

package com.xxxx.yyyy.workflow;
 
import java.util.List;
 
import org.alfresco.repo.processor.BaseProcessorExtension;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.workflow.WorkflowService;
 
public class WorkflowManager extends BaseProcessorExtension {
	private ServiceRegistry services;
 
	public void setServiceRegistry(ServiceRegistry serviceRegistry) {
		this.services = serviceRegistry;
	}
 
	public WorkflowService getWorkflowService(){
		return services.getWorkflowService();
	}
}

The method getWorkflowService() exposes the workflow service to the JavaScript calls. To expose the Workflow Manager as root object in JavaScript create WEB-INF/classes/alfresco/extension/custom-script-context.xml and you will be good! (If you don't know how to do that, read this) Now, you can get the handle of workflow service in JavaScript code. Yet, we need to write a small component which will allow us to retrieve the active workflows, tasks etc. To do so, I wrote a small JavaScript object which provides those functionality to the user.

var workflowService = workflow.getWorkflowService();
 
var W = {
	transitions: function(noderef){
		var task = W._currentTask(noderef);
		var trans = [];
		try{
		var tasks = task && task.path.node.transitions;
		for(var index=0; index < tasks.length; index++){
			trans[trans.length] = tasks[index].id;
		}
		}catch(error){
			// Ignore error
		}
		return trans;
	},
 
	move: function(noderef, command){
		workflowService.endTask(W._currentTask(noderef).id
                , command);
	},
 
	_workflowPath: function(noderef){
		var workFlows = workflow.getWorkflows
                      ("workspace://SpacesStore/" + noderef, true);
		if(workFlows.size()>0){
			return workFlows.get(0).id + "-@";
		}
		return "";
	},
 
	_currentTask: function(noderef){
		var curTask;
		var tasks;
		try{
		tasks = workflowService.getTasksForWorkflowPath
                           (W._workflowPath(noderef));
		if(tasks.size() > 0)
		      curTask = tasks.get(0);
		} catch(Error){
			// Ignore error
		}
		return curTask;
	}
}
 
function initWorkflow(noderef)
{
	var wflow = actions.create("start-workflow");
	wflow.parameters.workflowName
             = "jbpm$xxxxyyyy:abc"; // your workflow name
	wflow.parameters["bpm:assignee"]
             = person.properties.userName;
	wflow.parameters["bpm:workflowDescription"]
             = "Put your description";
	wflow.execute(noderef_for_which_workflow_will_associate);
}

Thats it! The initiate workflow method is used to apply a workflow to a node. Once that is done, the W object can be used to do operations like retrieving the active tasks, ending the workflow and making the workflow transition. Hope that helps. If you need more workflow related information and reading material you can visit following places:

  • JBPM jPDL Documentation (here)
  • Alfresco workflow wiki (here)
  • ECMArchitect Advance Workflow Guide (here)

Written by Sachin

May 29th, 2008 at 10:35 am

Bollywood is Bollywood!

with 4 comments

Today, after watching 'Shootout at Lokhandwala' (SAL), I realized that there is huge difference in the quality of movies produced in Hollywood and Bollywood. Directors like Quentin Tarantino, Woody Allen and Steven Spielberg make movies which has lots of research and study. Not only the shot but the finest detail of shot gets enough attention. Movies which are having based on past events are shot with great precision to make sure that they don't have any present day detail.

In SaL I found few blunt mistakes which could have been fixed while shooting or at least at the editing time. On the top of mind few things come are -

  • Tata Indigo! - The movie is shot in 1989-1992 timeframe. When Sunil Shetty makes a blank call to his wife, I could see a white colored Tata Indigo car passing by. Its impossible to see that car in 1991! The car was launched in India in year 2002. Strange to see that car in 1991. :)
  • AA Group posters! - In the song 'Ganpat' when group of people are dancing on the top of a bus, we could easily see 'Anil Dhirubhai Ambani' Group advertisements on the light poles. This group was founded in 2005 after division of Ambani group of companies. I thought roots of this group were founded in 1992 :)

In addition to that, there are other small mistakes too. Which you can easily find like the bikes which were not present in movie time line etc.

Looks like Indian directors have to put little more efforts in research and analysis to make movie more authentic and real. Movies like Hollywood ending, Schindler's List were based on past events. They were so real that you will believe those were produced from original footage which was conceived in the movie timeline.

Off to see Shrek 3! :)

Written by Sachin

June 2nd, 2007 at 8:51 pm

Posted in Personal

Tagged with , , ,

“I don’t agree with you! How about that?”

with 4 comments

I recently completed my one month in my new company. I hold my temptation to express my first impression of company for more than three weeks. I believe, to be fair you should spend at least a month before writing about new company. I was new to concepts of “Flat Organization”, “Agile Practices”, “Stand-ups” and “Sign-ups”. I was hoping to spend a fair amount of time in learning this process and be a part of it. Surprisingly I found it very easy to learn basics of that. Practicing them was even easier because of “Pair Programming” and other similar approaches.
I am not Odd man standing out anymore. I am a thoughtworker! (Somebody at my work will ‘disagree’ with that! :) )
ThoughtWorks, is amazingly different than other organizations I have seen, visited or been. Following are the things which come on top of mind when I compare ThoughtWorks with any other companies.

  1. No cubicles! – This is a blessing! Everyone sits around tables which mostly look like dining tables. All of your team members, are at a proximity where you can directly call him and have a discussion across tables! This increases a little noise in office but it’s worth it. I learned to work in that now.
  2. Very energetic team which is very rare to see. In a technical discussion we always run out of time because of overwhelming ideas to discuss on table.
  3. Agile at its core which is practiced very religiously!
  4. Resources availability. Company which provides high-end latitudes to everybody for personal use. There are virtually not restrictions for personal / technical growth.
  5. Every ThoughtWorker is passionate about what he/she is doing!

Comparing ThoughtWorks with any other company is like comparing apples and oranges! Their fundamental structure is different.
I met few of very interesting people in new workplace. I had lots of technical discussions. The very strange thing was, in ThoughtWorks one of my friends opens and closes the discussions with only single phrase –

“Hey, I don’t agree with you! How about that?”

Written by Sachin

February 20th, 2007 at 4:28 pm

Posted in Personal

Tagged with , ,