Thursday, September 26, 2013

In The Lab...

I'm in my 20's and I'm living my life like an experiment.

Lately, I've been filling my head with the fundamentals of several concepts: Idealism, Socialism, Capitalism, and all the "-ism's", and it feels quite sad to realize that I haven't yet consciously aligned myself to any, or a combination of any. I think that, somehow, if we are going to make a difference in this life, we need to know and understand the path which we have chosen to take -- or which we have threaded so far.

How do people live according to an ideal? Maybe they stumble into it mistakenly and it worked for them; maybe they studied all and applied the best one (or best combination) they could relate with; or maybe still, religious inclination, experiences, etc chose one for most people. But many people I've read of played around with this sort of things in their late teens and early twenties. I'm halfway into my twenties and I'm still messing around with it. I feel late to the game, yet I feel it's better than sleep-walking through the rest of my life. So I'm experimenting. My 20's is an experiment, a search for what ideal the rest of my life would be lived by.

So pardon me if tomorrow I act differently than today, I'm an experiment in the lab of life, but some things are established: I'm a software geek, an entrepreneur, a reader and a thinker.

P.S.
  1. Even though in 2009, I blogged about not taking-up paid employment, I eventually had to do so. It was imperative because I have to run my life. So last week, I accepted a job offer with InterSwitch and so far, aside from the fact that I now have to manage a lot of Java EE (which I haven't done for a while), I think it's quite nice. The people there are nice and happy, which is good. I'm still trying to strike-out a personal balance though.
  2. I met two really nice guys last weekend, one of them an up-and-coming artiste, who's getting a lot of airplay for two singles which he just released. We had a long chat on Tuesday evening -- at the beautiful poolside of Eko Hotel, with toothpick-figured models rehearsing some moves around us -- and I feel like they are going to influence my life in some really interesting ways, so I look forward to it.
  3. I cut my hair, so no dreadlocks for me again for some time... :(
P.P.S.
Happy birthday Yosola!

Saturday, September 7, 2013

Iska: Light-weight session handler for .NET

I read a very interesting novel this week. The title is Iska and it was written by late Cyprian Ekwensi, published in 1981. It tells the story of Filia, a simple young lady who after losing her husband, came down to Lagos and got caught-up in the enigma surrounding the State of Excellence. The story ends tragically when Filia loses her life as a result of activities of ritualists. Though it was sudden twist in the story, it wasn't unexpected because her mum had suspected her to be an Ogbanje. More details here: http://www.goodreads.com/book/show/3778168-iska

I like the simplicity of the writing style and, being a Lagosian, the story was something I could relate to. So I stole the name of the book, Iska, for my Open-source .NET session management library.

Light-weight session handler for .NET
When I wrote this post: http://ezeokoyecelestine.blogspot.com/2013/02/stateless-services.html, I talked about my (unnecessary) over-emphasis on the statelessness of web services, and about stopping it by putting an extra authentication and authorization step with web service invocation. While trying to do this, I tried ASP.NET sessions (I built my web service on .NET, hosted on Azure) and discovered that it depended strongly on cookies deposited on users' browsers. This meant that if my web service was going to be invoked by a non-browser (say a mobile app), the session wouldn't be maintained.

To solve this problem, I created a very simple session manager, easy to initialize and use. Since first writing it, I've used it on a number projects. I use it for the simple purposes of authentication and authorisation -- which are the only states I maintain on the RAM. I thought it might be useful for someone else, so I cleaned it up and put it on my BitBucket.

Benefits
  1. Easy to initialize and use.
  2. Automatically cleans-up your sessions periodically, at a duration you specify.
  3. Persist your session data periodically to any storage of your choice: file system, Windows Azure blob, database, etc. This prevents the loss of session on hardware/RAM crash. If you don't want to persist your sessions, it still works just fine.
The library is available here: https://bitbucket.org/celestocalculus/iska. Download it, add the DLL to your project and use it.

Possible improvements
If you want to go through the codes and work on it, please feel free to branch it and do whatever you like with it. I've identified some ways which it can be improved.
  1. The multithreading still seem quite tacky and could be improved on.
  2. It could do better with some generic type system introduced into the codes.
Please download, use and improve/extend it. Again, it can be found here: https://bitbucket.org/celestocalculus/iska. For how to use it, get codes for the sample console application I created: https://bitbucket.org/celestocalculus/tryisca.

UPDATE
It has been moved to my GitHub. The repository URL is https://github.com/celestocalculus/isca