Real-time train movements

It’s been a month since I last updated you all on the plans for the future… so where are we?

First, good news – I have real-time train movements working in the development environment. This has taken several weeks of solid effort, writing test plans, writing code, fixing code and committing it. There’s reporting for the vast majority of trains, and cancellations, reinstatements and short-tripped trains are all handled well.

The bad news is that, when testing the system in an environment similar to production, it runs too slowly. There’s around a 4-5 minute lag through most of the day, which is unacceptable and I can’t release code in this state. There are two options – either upgrade the production server (which is expensive), or rewrite the code to be more efficient. I’ve opted for the latter.

Rest assured that real-time movements are still very much on the cards, along with a bunch of other features that I’ll write about next week.

Posted in Ramblings | 3 Comments

Springtime Review

Thank you to the vast number of you who have taken the "How Do You Use OpenTrainTimes?" Survey. It’s open for the next three weeks, so if you haven’t responded yet, please do so. The results are interesting, useful and in some cases, quite surprising – and they’re shaping plans for the future.

One of the most requested features is real-time train movement data. I’ve been working in the background for the past couple of months on getting this up and running, and I’ve made excellent progress in the past two weeks. Assuming I continue at this pace, I’m estimating releasing OpenTrainTimes 2.2 with real-time train movements in three weeks.

Something else I’ve been working on is producing timetable data for Great Britain in GTFS format. After chatting to a few people at the FutureEverything Innovation Challenge this weekend, I realised that there are 587 transit agencies providing GTFS data, and seemingly nobody in Great Britain.

What do I normally do when there’s a gaping hole in a domain that I understand and care about? I fix it, and I’ve created data.opentraintimes.com which will have a daily-updated GTFS-format snapshot of GB timetable data. There are just two more bugs to fix relating to trains which run overnight, but I’m anticipating fixing these early this week.

On to this week’s updates – as I’ve been so busy doing other things, there are only a few minor bugs which I’ve fixed:

  • The London Waterloo – Earlsfield/Chiswick/North Sheen map had platform numbers at Barnes and Putney labelled incorrectly. Note that due to caching, you might still see the old map for a couple of hours)
  • When using Internet Explorer 9, the Feedback link was rotated incorrectly
  • Trains at Stratford Parkway (STY) weren’t showing
  • Times on the homepage were an hour behind reality

Expect a period of relative quiet over the next couple of weeks whilst I get real-time data up and running – but please, as always, keep your feedback coming!

// Peter

Posted in Ramblings | Leave a comment

What’s new – 1st April

Happy Easter to those of you who celebrate it!

Before I get in to this week’s release, there are two things I’d like to say.

First, I’d really appreciate a couple of minutes of your time to complete the How do you use OpenTrainTimes? survey. The 50 or so responses I’ve had already are somewhat surprising and have shown me that you’re all using the site differently to how I anticipated.

Second, and of reasonable importance to anyone looking at OpenTrainTimes from an Open Data perspective – I’m working on a GTFS feed of train schedules. There are a couple of first attempts up at http://data.opentraintimes.com/, and I’m hoping to get a fully-validating set of data up in the next week or so.

Right, here we go with the new bits this week – just two of them:

And several bugs have been fixed too:

  • Accommodation is no longer shown for non-passenger trains, so freight trains and ECS moves will no longer have 1st and Standard class seating
  • The departures-only pages were accidentally showing GBTT arrival times in place of GBTT departures – this is fixed
  • A few minor fixes to the King’s Langley – Wolverton and the Wolverton, Northampton, Rugby and Shilton maps

VSTP schedules are nearly ready to go live – there are a few remaining problems with the code that handles it, so I’ve held off releasing it this week.

Enjoy!

Posted in Ramblings | 1 Comment

What’s new – 20th March

In some ways, this is a minor update, but in others (especially if you like maps!), more major. Whatever you want to call it, here’s what’s in the mid-week release:

  • The Wolverton – Rugby map has been extended up to Shilton and the fringe with the West Midlands Signalling Centre on the lines up to Coventry. A couple of other miniscule bugs with missing routes have been fixed.
  • URLs in the format http://www.opentraintimes.com/location/XXX/to/YYY now work and will show all trains between XXX and YYY on the current date and time
  • The Feedback link now works – apologies, a previous update managed to break it!
  • Differential speeds in TSRs now match the same format as the Weekly Operating Notice
  • Some Javascript libraries have been updated to improve compatibility with certain browsers

There’s other cool stuff in the pipeline which I’ll be working on over the next few days. I’m also at the FutureEverything Innovation Challenge in Manchester this weekend – if you’re there, come say hello!

Posted in Ramblings | Leave a comment

What’s new – 17th March

It’s Sunday, which means I’m at the end of several hours of coding. OpenTrainTimes 2.1.3 has been unleashed with one new feature and several bug-fixes:

  • The Schedule Validity calendar has returned – when you’re looking at a schedule, click the ‘Functions’ button and select ‘Show validity calendar’
  • Trains that call more than once (for example, where a train calls at Barnes, runs via Hounslow and calls at Barnes again later) now appear correctly in a location page
  • TSR information has been updated and now looks more like the data in the Weekly Operating Notice
  • TOC codes are now shown in Working Timetable (WTT) mode when showing only arrivals or departures
  • Castle Yard (Northampton) is now included on the Wolverton – Rugby map
Posted in Ramblings | Leave a comment

What’s new – 13th March

I’ve taken the opportunity to fix a couple of things mid-week, and also launch a surprise new map:

  • Sharnbrook Junction is now correctly drawn on the Bedford – Kentish Town map
  • New signalling diagram – there’s a new map of Bletchley – Bedford (Marston Vale), complete with level crossings, signal aspects and routes
  • Internet Explorer 10 compatibility has been improved slightly and the feedback button has been fixed on IE10
  • Ledburn Junction and Bourne End Junction on the Kings Langley – Wolverton map had some berths accidentally removed – these have now been put back
  • Minor updates – the TD Status page now shows the train describers at Glasgow and Thrumpton
  • Willesden Junction now has two berths on platform 4, as trains can reverse there

Enjoy!

Posted in Ramblings | 1 Comment

What’s new – 10th March

It seems like ages since I last posted here, but I’ve not been sitting idle.

OpenTrainTimes 2.1.1 went live a few minutes ago, and here are the changes:

  • From/To filtering – you can now search for trains that have come from, or go to, another location. Click the "Trains" link at the top of the page, then click "By location, date and time"
  • The Bedford – Kentish Town map now extends up to the fringe with Leicester and include Sharnbrook Junction
  • Allowances for trains are now shown correctly where half-minutes are involved
  • Facility icons are now shown in schedule pages – you can see Sleeper trains, catering and reservation statuses
  • West Coast Mainline maps have been extended up past Rugby and several bugs have been fixed thanks to a few eagle-eyed people – thank you!
  • VSTP schedules will be appearing soon – there’s a lot of work that’s gone in to integrating the functionality for them in to the site, and I’m hoping to make another minor release before the end of the week

Until next time – enjoy :-)

Posted in Ramblings | 3 Comments

OpenTrainTimes 2.1 is here

It’s been a long time coming, but OpenTrainTimes 2.1 is here.

The biggest change, and the one that’s taken weeks of effort, is that the timetable database is faster, and I’ve been able to introduce some new features surrounding it:

  • You can search for arrivals, departures or all trains at a location
  • The Functions link on a location page will allow selection of a 24-hour time window
  • Train schedule pages have been reworked in Working Timetable (WTT) mode

Whilst it’s not quite as fast as I’d like it to be, I am working on making it even faster.

There are a few things that are currently missing, as I haven’t been able to re-implement them in time – namely the route maps for trains and the facilities and technical tabs – but I am working on these now and hope to have them back in a few days, along with several more features (including real-time data) in the coming weeks.

As always (and I say this every time) – thank you to everyone for your feedback and suggestions. Please try out the new site and let me know your comments and suggestions.

Posted in Ramblings | 4 Comments

Where we are, and where we’re going

Freight trains are now on the site, albeit with the headcode masked out in schedules, and with a scrambled placeholder on the real-time maps.

As I predicted, this resulted in a massive spike in traffic to the site which has all but disappeared as most people are using other sites such as www.realtimetrains.co.uk. Although it doesn’t have all the polish of OpenTrainTimes, it real-time information and is fast.

So why isn’t OpenTrainTimes as fast as RealTimeTrains?

There are two reasons.

First, the database format I use is robust and mature, but isn’t as fast as I want it to be. I’m in the process of re-engineering the database to be much quicker – something I hoped to launch today, but as I have a full-time consultancy job and an awesome lady in my life, I don’t have much time during the week to sit down and write code. I also underestimated the amount of time it would take to convert the existing database, so I’m running a bit behind schedule.

The new database format is denormalised – something that makes it quick to read, but slightly more difficult to update unless you’ve architected your system properly. Whilst testing, I found I could bring up all the trains at Clapham Junction in a single day in around 2 seconds. It takes more than 30 seconds to do this in the current system. Good news!

I’m hoping to launch the restructured, quicker database, some time this week (possibly next Sunday) once I’ve made sure everything works better than it currently does.

The second reason is that the amount of money I spend on hosting the site is small. The reason www.realtimetrains.co.uk is lightning fast is due, in part, to the fact it’s running on a system that is many times more powerful than I have at my disposal.

I could throw money at the problem, but I have rent, bills and savings. I could introduce adverts on to the site, but given the user base, few people are likely to click them and they’d make the site look ugly – something I’ve tried to avoid. Or I could ask people to donate, or subscribe – but this changes the game entirely and means that I’m obliged to provide a certain level of service.

What’re you going to do?

I’m pinning my hopes on the restructured database making things faster – which means I can work on putting more real-time data on the site. However, if it doesn’t speed things up, then I’m considering throwing in the towel and just showing statistics and real-time track maps. There’s not much point in having the largest and most visibile part of the site being the slowest and most resource intensive!

What else are you planning

After the new database is in place, and if it’s fast enough, I’ll be able to launch a bunch of new features such as email and instant message alerting, tracking trains in real-time and being able to click on the signalling maps to bring up schedule information. Just about everything I want to do relies on having a fast timetable database underneath the site, so it’s a critical thing to get right.

I’ve also got some other ideas up my sleeve which aren’t ready for the public eye yet, as they involve data which isn’t yet open and available to the public.

So – fingers crossed and let’s everything goes to plan!

Posted in Ramblings | 9 Comments

What’s New – 27th January

Hello, Sunday – it’s time to launch the changes, fixes and improvements!

This week’s highlights:

  • Signalling diagrams now include Kings Cross (in beta). From around 11am on Monday 28th January, the Hatch End – Kings Langley, Kings Langley – Wolverton, Wolverton – Rugby and Acton Wells Junction – Stratford maps will be showing signal aspects and routes set from signals.
  • Freight schedules will be back on the site from Tuesday 29th January, although train reporting numbers (headcodes) won’t be available for reasons of confidentiality. Freight movements will also appear on the signalling maps, with an anonymous placeholder to replace the headcode.
  • RTPPM statistics, as pointed out by a couple of people, were incorrect and were counting late trains twice. This is now fixed.

Looking forwards, updates to the site will be every fortnight for the foreseeable future – a week isn’t quite long enough to get everything done. To whet your appetite, here’s what’s on the cards:

  • Signalling diagrams – I’m hoping to extend the WCML maps up to Coventry and Nuneaton, as well as adding Kings Cross and parts of the ECML, and Waterloo
  • Faster timetable lookups – at the moment, I’m putting a lot of work in to making timetable and schedule lookups faster. It’s a big job, but one that underpins several other things I have planned
  • Real-time train information – discussions are under-way to get predictions and actual arrival/departures on the site.

That’s it for now – the next update to the site will be on Sunday 10th February!

Posted in Ramblings | 9 Comments