News for hackers. Stuff that matters.
Re:Show HN: A Clojure-based on-demand delivery routing system by elwell on Thursday January 03, 2019 @05:38PM (#18820026)
Backstory:

We did our last delivery back in late Spring of 2017, though we had experienced a decent amount of traction. The economics of on-demand gas delivery are difficult. B2B (e.g., delivery to car dealerships) seems to be profitable, but it is tough to achieve a price point high enough to warrant B2C sales (though perhaps in some ZIP codes it is possible (e.g., 90210)).

It was a fun ride, especially getting to use Clojure. I was the founding engineer (converted from an independent contract), so had plenty of room to make tech decisions.

Besides Clojure, there's a mobile app at that link as well, using Sencha Touch Framework. At the time we closed up shop, I had been experimenting with React Native + CLJS.

You'll also find an repo called opt that contains some interesting routing optimization algorithms that I did not write (warning, it's one long Java file).

On a related note, I'm currently looking for Clojure job opportunities.

Re:Show HN: A Clojure-based on-demand delivery routing system by joeATkira on Friday January 04, 2019 @09:04AM (#18824078)
Hi elwell, Kira Systems is a Clojure shop and we are always looking for individuals with a desire to try new things and build something great. We're based in Canada but have people working remotely. If you're interested, don't hesitate to reach out. You can find more information here: https://www.kirasystems.com/careers/?gh_jid=4122223002
Re:Show HN: A Clojure-based on-demand delivery routing system by mac01021 on Friday January 04, 2019 @10:58AM (#18824897)
So you'll consider applicants who live in the USA (not Canadian citizen) and would need to be 100% remote?
Re:Show HN: A Clojure-based on-demand delivery routing system by n4r9 on Friday January 04, 2019 @11:21AM (#18825142)
I'm interested in the technical optimisation side if you're open to a couple of questions...

- I can see that some kind of clustering is occurring whilst assigning orders to couriers. Does this use a standard clustering algorithm (e.g. k-means) or something from scratch? If the latter, would you be able to go into it in a little more detail?

- Are you optimising the ordering of items after courier assignment (e.g. insertion/2-opt heuristics), or leaving that to the courier?

- It looks like you're using google maps' api to calculate travel times/distances. Does this limit the number of times a client can run the program, depending on their license?

- Did any interesting technical assumptions get made based on the type of service being provided? For example, I can see that an estimate of the service duration is made based on the size of the delivery, but I'm wondering if the actual algorithm is affected by the nature of gas delivery.

Re:Show HN: A Clojure-based on-demand delivery routing system by elwell on Friday January 04, 2019 @08:35PM (#18829318)
The optimization code was mostly written by an advisor on the project, Wotao Yin, in Java.

He used a custom clustering algorithm, not k-means.

We initially tried assigning clusters to couriers, and letting them complete the assigned orders in any ordering (usually according to deadline), however, we ran into issues when new orders came in (especially rushed delivery orders). We settled on a solution of ordering a courier's assignments in an optimized order to increase chance of finishing all assignments on-time, and then only showing the courier one assignment at a time: the top priority assignment. When we closed down, we had been experimenting with factoring in the number of gallons and of what octane each courier was currently carrying.

We had a special business license with Google Maps API, but still cached the driving time calculations to speed up the algorithm / save money. Anyways, the routing algorithm only have to run every time the orders/couriers state changes (https://github.com/Purple-Services/app-service/blob/e0a4f74c...).

When you are tracking every couriers' location you can playback GPS coords prior to an accident and determine if their average velocity was higher than acceptable. You can also tell if they aren't on-task after receiving an assignment, or if there are two on-duty couriers in the same car! We experimented with RFID tag + Bluetooth connection to courier's app, to track actual amount of gas delivered as seen by a flow meter. And, we had an algorithm for recommending gas stations for couriers to fill up at based up price / distance. In B2B sales, a VIN scanner in the courier app was useful for reporting.

Re:Show HN: A Clojure-based on-demand delivery routing system by n4r9 on Saturday January 05, 2019 @05:50AM (#18831016)
Thank you for taking the time to reply.
Re:Show HN: A Clojure-based on-demand delivery routing system by gleenn on Friday January 04, 2019 @11:20AM (#18825131)
Apple has some Clojure positions. I recently just got one actually.

https://jobs.apple.com/en-us/search?search=Clojure&sort=rele...

Re:Show HN: A Clojure-based on-demand delivery routing system by imhoguy on Friday January 04, 2019 @03:39PM (#18827394)
Wow. That is super interesting news, I didn't know Apple got into Java and even Clojure.
Re:Show HN: A Clojure-based on-demand delivery routing system by pjmlp on Friday January 04, 2019 @04:19PM (#18827732)
They post regularly Java and Clojure positions.

Apple has gotten into Java since OS X early days, when they weren't sure about the current generation of Mac OS developers being willing to adopt Objective-C.

So there was Cocoa Java Bridge, QT for Java, their own JVM and WebObjects was rewritten in Java.

Even though they got ridden of their Java OS X bindings, WebObjects still powers the Apple Store, for example.

Re:Show HN: A Clojure-based on-demand delivery routing system by Sunscratch on Friday January 04, 2019 @04:29PM (#18827809)
Actually Apple uses Java/Scala a lot, and some of the core contributors to Netty are Apple devs.
Re:Show HN: A Clojure-based on-demand delivery routing system by fiddlerwoaroof on Thursday January 03, 2019 @05:58PM (#18820194)
While we don’t guarantee that you’ll get to use any particular language, at cj we have a data analytics pipeline written in Clojure and we’re hiring in the LA area

https://engineering.cj.com

Re:Show HN: A Clojure-based on-demand delivery routing system by acisneiros on Friday January 04, 2019 @08:01AM (#18823656)
On Clojure job opportunities: you can apply to Nubank, the world’s largest digital bank outside of Asia, and an amazing place to work! Nubank uses Clojure for the vast majority of its backend and some on the frontend as well. Openings at https://sou.nu/jobs-at-nubank
Re:Show HN: A Clojure-based on-demand delivery routing system by escanda on Friday January 04, 2019 @08:33AM (#18823856)
I am working on a side project related to last mile delivery (shameless plug https://deliveryplannerapp.com ) and did try many routing libraries: open-vrp, or-tools from Google and Optaplanner.

Finally sticked to jsprit. Awesome api and sensible defaults. Highly recommended.

Re:Show HN: A Clojure-based on-demand delivery routing system by j_m_b on Friday January 04, 2019 @09:04AM (#18824081)
I worked on this as well, mainly on the dashboard-* and portal-* repos. I actually found this position on the Who's Hiring thread here on HN. Happy to answer any questions!