Sunday, September 1, 2013

OpenShift and JBoss

After trying and failing to port a complex system written in C# into Python (mainly due to the time constraints) I find myself again at the mercy of Java, albeit at a rather advanced level.

In this article, I will give a small introduction as to how to get your environment configured for the development tasks. 

Objective

A game-server written in C#.NET must be ported into a 'hostable' application. I will not start with my usual, hippie-ranting about how C# should be banished from the face of the earth for just being not free and open-sourced (discounting Mono of course!), but I should mention that if you are using C# for a server application, your options are limited on the Cloud ! With this in mind, I wanted to exploit the free-tiers of a Platform-as-a-Service for a 'Custom' program rather than a web-site.

Technologies Used

OpenShift

The Platform-as-a-Service I have used is OpenShift. I chose this due to many advantages including but not limited to the ease of deployment, wide range of supported technologies , good community support as well as a substantial free-tier.  Adding a special note about the wide-range-of-technologies, at the worst case if you don't find something useful in the offered 'cartridges', you can start-up a DIY (Do-it-yourself) Cartridge and begin with a fresh Red-hat Linux Installation and use SSH to get your freak on! I tried it out with installing Python (along with pip) and included several modules for the purpose and turns out it works like a charm. I have yet to try and install a command-line torrent client (I doubt it will work). But I have managed to overcome one of the commonly faced difficulties due to servers that do not support range-retrieval of large files. All in all, OpenShift is an interesting platform to be used in app deployment.

But of course there are some drawbacks. One of them being- the confusing load-balancing , DMZ and proxy mechanisms. This is one of the reasons that I am being forced into working with websockets (may or may not work! I'll leave that for later!!). This takes away the simplicity that you can have in a simple client-server app with bidirectional data-transfer. I have yet to conclude whether it was worthy a trade-off!

JBOSS

JBoss is, simply put, an Application Server written in Java. Without claiming to be much of an expert on the subject, I'll just encourage you to google for it. Our interests lie with the fact that it is one of the best supported Cartridges in OpenShift.

For instance, you can download an Eclipse Plugin and deploy your application in the remote server from end to end (if you are lucky). However, there are some common issues with authentication and credential validation of OpenShift accounts in  the Eclipse Plugin for OpenShift+JBOSS support. You can skim through the forums and discussions only to be let down. But despair not! Because we have the JBOSS Development Studio by RedHat.

Deployment


The JBOSS development studio is based on the eclipse SDK so it's not a completely novel experience for a nOOb. You just have to
1. Code in the IDE
2. Commit to the local repo
3. Push to the remote origin
4. Witness the Magic!

I will add more details on the installation and setting up as I have time (that was the idea behind the article). Meanwhile, feel free to ask for any clarification if you can't wait for the next edit! 


Saturday, June 22, 2013

Wikipedia Ontology Extraction- An introduction

After going through various phases of trying to find my-self in all the wrong places, I guess I might have finally stumbled across into a position where I 'might be looking in a possibly-right place'. This time, I have begun to collaborate in a research project of one of our most beloved lecturers in the department, Mr. Nisansa de Silva. I will only publish on this blog which he has already publicly posted in his website as well as minimal information so as to avoid disclosing any sensitive materials opposing his will. 

I am one of the collaborators of this project, along with my friend Tharindu Amila Perera. 

The project idea, in a nutshell, is to extract concept ontological relations based on Wikipedia articles. Now what the hell is that?

Ontology

Ontology is a branch of philosophy, where we study the 'entities' for their reality, existence, being and becoming, as well as categorize them and study the relationships among those entities. Now that sentence was a bunch of big words but a simple example would do to get the gist of it. Imagine a classroom. There are various entities such as teacher, student, blackboard, desks, chairs, pencils, chalk, dusters, lockers etc. Now all of these entities on their own make little sense. But we can categorize them. For example "Living" and "Non-Living" entities. In which case they would give a rough 'concept-map' as is shown by the following lazy, crude, MS PAINT diagram.

Now I must say that this rough diagram does not provide a good premise of a good ontology. But it is one nonetheless. The black connecting lines means that they are generalizations/specifications. That means "Teacher is-a Living Entity" can be inferred from the diagram. The green lines show aggregations or ownership. For instance, "Student has-a pencil".  This is but one of many ontological representations possible given the premise. I'm sure you get the picture.

Ontological relations in Wikipedia

If you take any article in Wikipedia, you will get something out of its title. A trivial example that pops to mind is if you search "Sri Lankan Cuisine" in Wikipedia, the next thing that pops into your head may be "Chilli" or "Pepper" or "Spices" or "Kiribath" (or even the contemporary internet meme, "Papadam" ). And most likely, you will find hyperlinks to some of those things (for examples, 'spices' will definitely be in an article about 'Sri Lankan Cuisine").


So the basic idea of this research project, is to exploit the fact that those articles are connected through hyperlinks in the domain containing their titles as a premise.

For now, I guess I have bored you enough on this. I will keep you guys updated as I go.

Ciao...

Tuesday, March 26, 2013

CSE News Letter is out now

After a long while of radio silence, just came to blogger to post this. Because this really is big news... After much ado, it is finally out...
Yep.. the title gives it away.. It's nothing but the CSE News Letter  . Enjoy.. :)