Monthly Archives: July 2013

Windows Azure Websites: -1

You should have by now – but if you haven’t – do try Windows Azure Websites. It is almost as usable as AppHarbor. Just register and start setting up your websites. For small blogs and wikis you can get away with internal storage and spend no money at all. No need for hosting ever again.

If you, as you should be, are writing your own web apps, you can connect your Bitbucket free private repo, or indeed your almost free GitHub private repo, or indeed a public repo directly to an azure website, so that you get CI whenever a commit is made in that repo. You can differentiate on branches so that the master branch triggers deploys to “production” and the staging branch, for instance, triggers deploys to the staging site. The possibilities are if not endless pretty huge.

The thing is, it works, although I’ve manage to upset the system by trying to do naughty things with weird Silverlight apps, but if auto deploy doesn’t work, manual deployment from Visual Studio still does. Even if auto deploy does work –  having CD from Git to the test site and VS -> Publish to your production site may not be such a bad idea, if you want to find a middle ground. Of course you are free to spend money if you like, but it is not necessary.

www.windowsazure.com

More on groupware

I have been thinking some more about a simple email + calendar service for Linux. I have tried a couple of ready-made groupware solutions but they seem not QUITE right FOR me. I want to rip off the ideas that GMail has shown to be successful. Also, let’s not ignore the Not-invented-here syndrome.

To start with the GMail experience is one of simplicity. Compare and contrast with Outlook Web Access which is essentially a fat client Windows app shoehorned into a website.

Users

User accounts will have to be managed in an LDAP server, but if not in version 1, very soon after, the users and rights management will have to be done in the website for the Simplicity goal to be fulfilled. The LDAP database needs to be complete enough to be meaningful as a source for existing Linux phonebook management clients as well as access control for websites and e-mail.

Calendar

What I want is a simple calendar view, with a possibility to launch a few forms to add and update entries. Here I’d have to find something suitable online, but the issue here mostly is the backend. I’d need to find an iCal compatible server that has a database format that I can figure out and live with.  From here I have to export files to each user’s directory so that they can be indexed as needed.

Email

The e-mail site can be extremely “flattering” to GMail, if imitation is the greatest form of flattery, with folders on the left and the list of e-mails front and center.

Wiki/Intranet

For it to be a solution fit for a smallish company you also need the ability to create content pages and publish them in the system somehow. A Wiki, for sure and also maybe a blog and a general CMS. Orchard or some other .NET CMS should be quite able to handle this, the major issues are to get either of them running on Mono and how to set up a default configuration 

Search

Search has to actually work. This means I will have to find a way to index web content, e-mail and appointments and parse queries and submit them to Lucene or SolR to actually provide great results fast. My whole bitterness against the proliferation of everybody’s personal data is that GMail has removed such large sections of brain that are no longer necessary. Almost whatever it is you have been up to in life you can find it using GMail search as you were bound to have written or received an e-mail about it – and if that didn’t happen you probably wrote an e-mail to yourself about it on purpose in order for it to be retrievable using the GMail search. It is a wonderful way of life, except when you have just handed strangers that same ease of access.

Conclusion

So, I’m thinking:

  • OpenLDAP
  • OpenSSH
  • Dovecot
  • Postfix
  • iCal compatible calendar server, there are several.
  • Solr
  • Mono 3.0.11
  • nginx
  • Jetty (for SolR)
  • PostGreSQL (?)
  • Orchard CMS or DNN or Umbraco. Orchard preferred.
  • My code / stuff
    • Wrapper website that hosts settings, e-mail, calendar and CMS views. Handles sessions and the almighty search bar.
    • Search results view
    • E-mail listing
    • E-mail compose  
    • Calendar view (week, month, days – need to find component that does the rendering.
    • Appointment view
    • Account management – against LDAP
    • Account management – with SSH/certificates
    • External POP3 and SMTP accounts
    • E-mail indexer
    • Calendar indexer
    • Packaging
      • Packaging my code
      • Packaging config of other packages

Mail server and collaborative calendar

I was thinking, in light of the fact that all our data, including this blog, is being scrutinized by foreign (to me and most internet users) powers, that maybe one should try to replace Google Apps and Outlook.com, well Google Apps really. The problem is that Google Apps is pretty damn useful.

So what does one need? I have no money to spend, so it has to be free.

One needs a full featured SMTP server, a good web interface with simple design that also renders well on mobile in which you can search through (and find!) email and appointments. Some would argue that you need chat and video conferencing as well, and I guess one where neither Chinese nor US military is also on the call would be preferable, but I can live without it.

I cannot, however, live without civilized charset support. As in, working iso-8859-1 or something proper that can display the letters of honor and might, aka åäö. It would also not seem like a grown-up solution if it wasn’t trivial to add encryption and/or signing of e-mails.

You also need shared calendars and the option of reserving common resources. Not perhaps in the home, but the very first thing you do when you use shared calendars in a company is that you start booking things, such as conference rooms, portable projectors et c.

The user catalog needs to be easily managed. You need folders/labels of some kind and filters to manage the flow of e-mail.

I also, probably, need a way to access my e-mail via IMAP.

So the question is, how much of this do I have to build? How much exists in Linux? Does it look decent or does it look Linuxy? By decent I mean Web 2.0-ish, as opposed to linuxy or Windowsy, such as outlook web access.

I’d like any suggestion. I am prepared to code, albeit in C#/mono, but I would love to use as much Linux OSS available as I probably suck at writing this kind of stuff compared to those who have already done so.

So far I have found the following:
http://www.howtoforge.com/perfect-server-ubuntu-13.04-nginx-bind-dovecot-ispconfig-3
But instead of an ISP tool a custom website? Perhaps solr or lucene indexing each user’s maildir. But what about a calendar?

Why not just install Citadel?
This requires testing.

.NET 4.5.1

To continue the last post about the //BUILD/ Conference, what else is new? What should you look at now? A few things stand out and I will go through them in order.

See Function Return values in debugger

For F# or any functional language, return values of functions are pretty crucial to be able to see when you debug your code or else you are sort of robbed of the idea of a debugger. Of course, you do have less code and fewer bugs per user story in functional languages vs imperative languages in general, so debugging probably isn’t as important, but the fact that you had to change your code to be able to double check return values must have been a huge pain. The point is, now in VS2013 Preview, when you step past a return statement, you will see the return value in the Autos window as well as being able to access it in the Immediate windows as $ReturnValue. I know I missed it in C#, it must have been super annoying for our functional friends. The takeaways are YAY and  – try F# (still near the top of my to-do list).

64-bit Edit & Continue

ORLY? I will be happy to see the 64-bit dialog box go but would have been happy to just have the debugging stop immediately when somebody tries to type in a code window. That probably indicates that the programmer knows what’s wrong and needs to make changes, not that they would like to go full VB3. To me it’s just embarrassing to see VS handle 64-bit as if it was magic. There should be no difference for a real programmer how you handle 64 or 32 bit (beyond the obvious, but that’s a five minute conversation among stakeholders over coffee) and the fact that the segregation remained is a bit of an embarassment.

ADO.NET Connection Resiliency

EF/ADO.NET Connection resiliency. When you use SQL Database in Windows Azure, you will notice that you only get a brief window of connectivity so as to not waste server resources. This is brilliant and should have been the default on your vanilla SQL Server back in the nineties as well, it would have given us less sucky client / server apps back in the day, but the point is the folks over at ADO.NET now gave us connection resiliency, which means your connection autoresumes when you remember to access your database again. This means simpler code in your app and the database abstraction layer also abstracts connection failures, the way $HigherPower intended.

Hosting and Runtime Features

IIS App Suspension – Another Azure-derived feature is that they will allow web apps to run, but to be suspended in its current state when it has been idle for a while. This feature is available in IIS 8.5, Windows Server 2012 R2 Preview.

Large Object Heap compaction – the Large Object Heap can be now compacted as part of the 2nd generation GC run, as in a full stop-the-world GC, so use carefully. You will need to use a separate API to invoke this feature, but if you are having problems with the Large Object Heap not being compacted, you are probably aware of that and are prepared to add a line of code.

New runtime features that will affect you without you doing anything include automatic multi-core support to make app startup time faster and ASP.NET apps and also the fact that you will get Windows Updates of the .NET framework with precompiled native images. In previous versions of Windows your .NET apps will JIT mscorlib.dll et c as you run them when the dllis different from the cached binary installed with Windows, VS or a service pack.

Cadence – pleasing both camps

A huge deal is that the .NET Framework will go full Ubuntu style versioning, with many small incremental changes, with big bang Long Term Support versions made for the enterprise. They wouldn’t call it “ubuntu style versioning”, so I did it for them. They have implemented this by deploying new features as NuGet packages continuously, while they collate mature features and include them in big releases. This is pretty significant and a great decision.