News for hackers. Stuff that matters.
Re:Show HN: µTT – A new faster MQTT broker by tuukkah on Thursday May 25, 2017 @05:27AM (#14416195)
If you need a demo use case, we provide an open MQTT feed of some 1500 public transport vehicles, soon once per second (plus per-stop departure prediction feeds): host mqtt.hsl.fi, port 443 and 1883, topic /hfp/#
Re:Show HN: µTT – A new faster MQTT broker by StavrosK on Thursday May 25, 2017 @07:25AM (#14416624)
That's a pretty nice use case, especially with MQTT supporting persistent messages (which are messages that "stay around" and which the client will receive immediately upon subscription, no matter how long ago they were published). That way, you can publish the messages as rarely as they come, and a client that subscribes will still get the latest time available without having to wait for the next publish.
Re:Show HN: µTT – A new faster MQTT broker by tuukkah on Thursday May 25, 2017 @07:39AM (#14416672)
In practise we can't use persistent messages for this, but you can fetch the latest messages that correspond to your subscription from a REST API that caches the messages: https://api.digitransit.fi/realtime/vehicle-positions/v1/hfp...

(The reason is that we use MQTT topics creatively: instead of one topic per vehicle, the topic changes dynamically to provide more filtering criteria such as the route and the next stop of the vehicle. Thus, most of the per-topic persistent messages would be obsolete.)

Re:Show HN: µTT – A new faster MQTT broker by problems on Thursday May 25, 2017 @11:09AM (#14417780)
That's awesome, wish my city would do something like this - you're lucky to get updates once per 2 or 3 minutes on their service.
Re:Show HN: µTT – A new faster MQTT broker by andai on Sunday May 28, 2017 @04:33PM (#14435972)
lol. i just wish mine would put departure times on the website...
Re:Show HN: µTT – A new faster MQTT broker by alexhultman on Thursday May 25, 2017 @05:32AM (#14416212)
Ah, kool. I first need to finish this up to a stable state though. Right now it just barely passes the benchmarks test.
Re:Show HN: µTT – A new faster MQTT broker by deft on Thursday May 25, 2017 @03:34PM (#14419542)
Are implementation details for this available? What's the stack?
Re:Show HN: µTT – A new faster MQTT broker by tuukkah on Friday May 26, 2017 @01:46AM (#14422220)
We try to be as open as possible nowadays. However, these backend systems are from an old proprietary contract. There's a computer with a GPS receiver and driver UI in each bus and tram sending the MQTT messages to mqtt.hsl.fi (IBM MessageSight hardware for now) over 3G cellural data connection.

The subway can't use GPS but the trains read RFID tags installed along the tracks and there's wifi coverage. The suburban trains have Raspberry Pi's listening in promiscuous mode in the maintenance Ethernet ports and relaying the vehicle data to us.

The ferries send AIS radio data that we fetch from here: https://meri.digitraffic.fi/api/v1/metadata/documentation/sw...

The REST API is part of Digitransit, which is a fully open passenger information platform and journey planner. Docs and code here: https://digitransit.fi/en

Specifically, the switchbox for realtime data is a simple NodeJS application: https://github.com/HSLdevcom/navigator-server

Re:Show HN: µTT – A new faster MQTT broker by deft on Friday May 26, 2017 @11:21AM (#14424673)
Thanks for the information, hopefully you can move the MQTT to something open in the future :)

Digitransit is very interesting, and all of this is great work!

Re:Show HN: µTT – A new faster MQTT broker by wcummings on Thursday May 25, 2017 @06:16AM (#14416370)
Out of curiosity, which vehicles/city?
Re:Show HN: µTT – A new faster MQTT broker by helb on Thursday May 25, 2017 @07:40AM (#14416676)
If you want to have a quick look at how the feed looks like, there is a web client for mqtt at http://www.hivemq.com/demos/websocket-client/. Don't leave it open for too long though, it might kill your browser (Chrome struggled a bit on my old laptop).

    {"VP":{"desi":"N","dir":"2","oper":"XXX","veh":"H9449","tst":"2017-05-25T11:31:50.000Z","tsi":1495711910,"spd":2.22,"hdg":10,"lat":60.249649,"long":25.008106,"dl":0,"oday":"2017-05-25","jrn":"XXX","line":"XXX","start":"1439","stop_index":7,"source":"sm5logger"}}
Re:Show HN: µTT – A new faster MQTT broker by tuukkah on Thursday May 25, 2017 @07:18AM (#14416595)
HSL provides the bus, tram, suburban rail, subway and ferry system in the Helsinki metropolitan area.
Re:Show HN: µTT – A new faster MQTT broker by stevekemp on Thursday May 25, 2017 @02:11PM (#14419005)
I've written a few toys that use their GraphQL API to show real-time displays of trams. Pretty neat system.
Re:Show HN: µTT – A new faster MQTT broker by tuukkah on Friday May 26, 2017 @01:19AM (#14422144)
Thanks! Waiting for your MQTT integration ;-)