Open Source Geolocation
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Title of Series | ||
Number of Parts | 561 | |
Author | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/44454 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 2019332 / 561
1
9
10
15
18
19
23
24
27
29
31
33
34
35
38
39
40
43
47
49
52
53
54
55
58
59
60
63
65
67
69
70
78
80
82
87
93
95
97
102
103
104
107
110
111
114
116
118
120
122
123
126
127
131
133
136
137
139
141
142
148
153
155
157
159
163
164
168
169
170
171
172
173
174
181
183
185
187
188
193
196
197
198
199
200
201
205
207
208
209
211
213
214
218
221
223
224
226
230
232
234
235
236
244
248
250
251
252
253
255
256
257
262
263
264
268
269
271
274
275
276
278
280
281
283
284
288
289
290
293
294
296
297
300
301
304
309
311
312
313
314
315
317
318
321
322
327
332
333
334
335
336
337
338
339
340
343
345
346
352
353
355
356
357
359
360
362
369
370
373
374
375
376
377
378
383
384
387
388
389
390
391
393
394
395
396
406
408
409
412
413
414
415
419
420
425
426
431
432
433
434
435
436
438
439
440
441
445
446
447
448
453
455
457
459
466
467
471
473
474
475
476
479
480
484
485
486
489
491
492
496
499
500
502
505
507
508
512
515
517
518
529
531
533
534
535
536
539
540
546
550
551
552
553
554
555
557
558
559
560
561
00:00
Open sourceArchitectureInterprozesskommunikationService (economics)Open sourceVirtual machineGeometryComputer architectureBitCartesian coordinate systemMultiplication signGroup actionDifferent (Kate Ryan album)Information privacyCuboidMechanism designSemiconductor memoryCodeProjective planeDatabaseRevision controlUniform resource locatorInternet service providerSoftware1 (number)Library (computing)Goodness of fitException handlingStudent's t-testPhysical systemHookingFreewareRight angleSpacetimePoint (geometry)View (database)Forcing (mathematics)Theory of relativityLevel (video gaming)Computer-assisted translationPlanningSource codeBlogSoftware developerBus (computing)InterprozesskommunikationComputer clusterTape driveComputer animation
08:21
Elementary arithmeticTowerCellular automatonModemOpen setDisintegrationTime zoneConfiguration space1 (number)Set (mathematics)CuboidSoftwareMereologyLaptopAndroid (robot)NumberBit rateStudent's t-testUniform resource locatorModemServer (computing)Virtual machineBitInformation privacyLimit (category theory)Projective planeCellular automatonLevel (video gaming)Electronic mailing listCartesian coordinate systemTowerService (economics)Open sourceFront and back endsData managementGoodness of fitMappingGeometryDatabaseInformationSensitivity analysisMobile appInternetworkingInstance (computer science)Sound effectWeb pageDifferent (Kate Ryan album)Moment (mathematics)SmartphoneBlogSource codeSerial portTime zoneGraphical user interfaceLocal area networkSoftware maintenanceArithmetic meanShared memoryAlgebraic closureSystem callPosition operatorComputer animation
16:35
Fiber bundleService (economics)Software developerSlide ruleMobile appUniform resource locatorCore dumpPatch (Unix)Object (grammar)Multiplication signGeometryMathematicsPresentation of a groupInformation privacyFiber bundleCurvatureDistribution (mathematics)Shared memoryCASE <Informatik>CodeOpen sourceService (economics)StapeldateiTask (computing)Software developerMetropolitan area networkTerm (mathematics)Traffic reportingBitSource codeSoftware maintenanceComputing platformPhysical systemProjective planeBus (computing)Android (robot)Computer architectureSoftwareSatelliteWeb portalString (computer science)Right angleQuicksortFreewareSurfaceComputer animation
24:49
Computer animation
Transcript: English(auto-generated)
00:08
Hello, can you hear me? Well, I was going to say already start from who I am so my name is Disha Nali, I had to check to make sure.
00:23
I work for this company called IBM, I'm sorry Red Hat and it's been two weeks but I worked at Red Hat before, five years on desktop team. I've been trying to get back for a while and now I finally made it back, but not in the desktop team, but in another team, containers
00:44
related stuff. So new stuff for me to learn and stuff. Should I start with the actual? Okay, cool. And I've been involved in FOSS in different companies and different levels and stuff.
01:03
Mostly gnome stuff, but other things as well like D streamer and related stuff mostly, but I'm into flying, I have a helicopter license working on my plane license, and I like cats.
01:22
And the story I'm going to tell you is a very small boring one, but maybe some interesting somewhat. I started in 2007 and it's sounds like a Spanish conspiracy because these two guys, this guy and this guy, they were both sitting together somewhere with some people from Garmin and they said, oh, what about we have
01:47
geolocation service for Linux because there is nothing like that right now. And since D bus is the way to go nowadays, so it would be using D bus. So they decided to create a project called GeoClue, which is a D bus based geolocation service.
02:06
The concept is very simple. The application asks this service like where I am right now and the service just tells them that. And they found a victim, I mean, some are of course student to do the actual work.
02:21
And this guy did all the hard work and he made it possible, the GeoClue. And the concept was based on external providers. So each the source of location was an external source. So within the service itself,
02:41
there was nothing. It was only an API for applications to talk to and for service providers to hook into the service so they can tell it where the location and give it updates about location and stuff. And the first and the easiest one in any kind of application like geolocation
03:02
you can implement as GeoIP, which is the simplest one because any service out there can see your external IP and tell what it thinks where it is. And there is a database already out there. MaxMind is a company that maintains it and they have like a commercial version of that database and there is a
03:22
free version of that database. There is not a lot of difference between them actually in practice, but there's some. So yeah, based on that they implemented a GeoIP provider. They also kind of provided a Wi-Fi geolocation, but they couldn't really because the only ones were proprietary and they couldn't use it in open source software.
03:42
So they kind of created a source that you can manually tell it like, okay these Wi-Fis if you see these then it means I'm on this location. So user had to manually do that and that's not really, you know, it doesn't work out of the box. So it I don't think anyone actually used that. I'll be surprised if they did.
04:01
And one of the things that is essential is support for GPS devices. So they created another person came along and he was interested in GPS support in Geoclue and implemented Gipsy. Ian Holmes is his name. But there was already a project called GPS-D.
04:23
It's maintained by Ira Cramond, I think. But and the reason they didn't take that was it had a very, very conservative architecture. They wanted everything to be allocated on the stack and it created many other problems. It increased memory usage and stuff like that. And
04:43
they had a very archaic IPC mechanism. They didn't want to use the D-Bus at all. They were afraid of that. They said it doesn't work and stuff. Anyway, so there was a bit of a clash and they both have written really long blog posts explaining why they you know did what they did like why Gipsy and why GPS-D still. Anyway,
05:06
so and then since some of the Garmin people were involved in the creation of Geoclue, they used it in their devices as far as I know and also in many MIMO and MeeGo devices Geoclue was used. It still is being used in
05:24
YOLA devices if you know that one. yeah, but over time the dreams were forgotten. People got busy with other things. Geoclue was unmaintained for years. Gipsy was unmaintained for even longer. The guy who wrote Geoclue, U.C. Cooker, and he's a good friend and I still meet him and he's still involved in open source.
05:46
But the guy who wrote Gipsy, he has vanished. I think I have never, I haven't seen him for 15 years or something. And then in 2013 when I was still in desktop group of the Red Hat, I was bored. I have been doing the same application for three years
06:03
continuously, which is going on boxes, and I want to do something different. So I was like, what should I do? And talk to this guy. He's involved in all parts of GNOME at least and free software, sorry, free desktop software. And he had, he was kind of involved in Geoclue development at some point. So he had some ideas about
06:23
creating a new Geoclue, which, because the old Geoclue was getting really old, the source code was not really nicely written in the end and also it was using a lot of libraries and APIs that were not really, sorry,
06:41
they were not really like maintained there. Those APIs are not there anymore. So instead of revising that old software and also the architecture is not, it's like the external providers I mentioned. So it sounded like a really good idea on paper, but
07:02
practically, it's not such a good idea because many people created their own providers and they use them in their own devices, but they never contributed upstream. So the upstream Geoclue you take on your desktop machines, they are just, they only have GeoIP and it's not very useful at all. So because of that, we created Geoclue 2 with Bastia and Osera.
07:24
And the idea was much simpler architecture, which is not just good for developers, but also for application developers. And for anyone who uses it. For example, we only have internal sources. We don't have external source. There is one exception to that, I'll tell later, but
07:41
ideally, all sources belong in our code. And if you want to add some source, please come and contribute that. And also, Geoclue usually used to provide, Geoclue 1 used to provide geocoding service, a geocoding API, and we thought that doesn't really belong there.
08:01
It should be a separate service. People should be able to use that separately from geolocation. So that code was put into a separate library called Geocode-Geolib. And another reason for redesigning Geoclue 2 was privacy because Geoclue 1 had no concept of privacy.
08:22
It would just give the location to any application that asked it. But you know, location is like a very sensitive piece of information, so if any application can get it, it could be a really bad application that wants it. You downloaded some random application off the internet and takes your location and gives it to someone.
08:43
So the idea was having an app authorizing agent, and that has to be external. And the first OS that was added to was GNOME, because I was working on GNOME stuff, so it was natural for me to add it to that, at least myself. So currently, if you use some application right now that does location, for example, you know, maps or something,
09:05
you will get a dialogue, and then it saves that permission from you in a database and stuff. And similarly, elementary, I think one year ago, two years ago, they also added an app authorizing agent for Geoclue.
09:21
As for the sources, the first source, of course, as I mentioned, the easiest one is UIP. So we added that as first thing. And modems was another kind of easy thing, because there's already two backends for managing modems. One is Modem Manager, the other one is Ophono.
09:42
Modem Manager is the one being used on GNOME and stuff, so I use that. I actually have a blog post about that, why Modem Manager is much better than Ophono, but I'm nothing against people adding Ophono, but we have Modem Manager support already. And it does support two things. One is cell tower-based location, which is not very accurate.
10:02
It's a few kilometers at best, and the GPS, which most modems nowadays, they come with a GPS on it. So we get a GPS location, which is a lot more accurate, of course. But the problem is that not everyone has a modem, and in a lot of laptops, even if you have a modem,
10:26
many corporates just disable it because they think nobody uses it. And when you are stuck with UIP, the UIP at best can give you city-level location, and that's not good. Sometimes that's even very wrong, and people get really frustrated.
10:41
So we needed something more accurate that is more abundant, which can be used on most laptops and stuff. And that's Wi-Fi-based geolocation. The concept is simple. You see which Wi-Fi network you see. You get a list of that, the strengths, and then you send it to the server,
11:01
and the server tells you, okay, these devices are in this particular street. So you get a street-level accuracy, which is really good already. But the problem was, how do we do that? Where is the server? Which server we can use? We can't use Google's service. You can't use Microsoft's or Apple's or whatever. The one we could use was Yahoo's, which was there for a bit,
11:23
that you can use in open-source software. But there were some limits to the data rate and all that. So it wasn't ideal, but we had to use something, right? But then, soon after I started Geoclue 2, Mozilla came out with their own service, which is called Mozilla Location Service.
11:40
And that does the Wi-Fi-based geolocation. And they utilized their vast number of users around the world to gather all the data about Wi-Fis. So within months, they had a huge, huge amount of data from across the world. And it was completely open. So it's open-sourced.
12:00
And data is not open for privacy reasons, exactly. But that's a completely different topic for another talk. But we can talk about it afterwards if you want. Anyway, it was a really godsend. We used that service immediately. And we were one of the first users, external users of that service. But as I mentioned, laptops have Wi-Fi, so you can use it.
12:23
But most desktop machines do not have Wi-Fis. So what about them? Are they stuck with G-O-I-P? More or less, yes. But we came up with a solution for that. Summer, of course, student implemented this. So the idea is that you share from your phone.
12:43
All the phones nowadays, the smartphones have GPS devices nowadays. So you share your GPS location on your Wi-Fi network or your internal network. And then anyone can use it, any software. And as a part of his project, he, of course, added support in GeoClue.
13:04
So there's an application called GeoClue Share, which you can install on your Android device. And you get the Android device location on your desktop or laptop or whichever device you want. So that was a kind of work around for desktop machines. But that's the best we could do.
13:21
There's no other way. And it uses Avahi to announce its location on the network. What about standalone GPS devices? As I said, modems have GPS, but that's not the only place for GPS. There's standalone ones that you can plug into USB usually, or Bluetooth.
13:40
How about them? The problem with those is that they usually need some kind of configuration. They don't work out of the box, at least right now. There's a new Linux subsystem coming. I've heard that will solve this problem, at least for many devices, modern devices. But I don't know if it will solve for all devices. So you need to set baud rate and stuff like that on the serial port that it exposes on.
14:04
So since it needs an external means, we thought, OK, what about gypsy? We can use that. But that has been maintained for much, much longer, unmaintained for much longer than geoclue. The guy who wrote it, he's nowhere to be found.
14:20
Yeah, source code is not that great. And yeah, so we thought like, and it's written in C. And I've been more into Rust these days. So I decided to just write a new one, GPS Share, it's called. And another reason to rewrite that is that it's not a debug service,
14:42
but it works the same as the geoclue share I mentioned, the app. So it just exposes your network on the local network if you want it to. And since geoclue already had the support for NMEA over TCP, so it could readily use this software that I wrote in Rust.
15:02
So that's on GitHub, and you can use that for standalone devices. And of course, from day one, we had GNOME integration, because I was interested in that in GNOME. Maps, actually, this is a, GNOME Maps is a software I started.
15:21
Nowadays, another person is, that guy is maintaining it. And this one I mentioned is a Finnish conspiracy, and the Maps is more a Swedish one, because always a maintainer is a Swedish guy. And yeah, anyway, so yeah, anyway. And of course, one of the cool features we wanted to have with geolocation was automatic time zone update.
15:44
So many devices have implemented that so long ago, but we never had this. So it was really cool to have it in GNOME. And of course, clocks and weather needs location as well. WebKit GTK for different web pages. And yeah, so those were the apps.
16:05
And we recently, more recently, we had some positive development as well, like Free Desktop created a GitLab instance, and I think now it's the only GitLab. And GeoClue was one of the first ones to move.
16:22
I said to Daniel, yeah, I want to be the first one to move there. And it was like immediately positive effect, because it makes things so simpler and easier. And also, all of a sudden, there were many contributors to GeoClue, not just in terms of issue reporting,
16:40
but also patches were being submitted before there was rarely any external people other than me giving patches. But now there's a lot of people, well, enough people, more than before. Another change was Flatpak. So I mentioned about privacy. At that time, Flatpak wasn't there.
17:01
There was a concept of that. There was some development, but it wasn't really there. What is Flatpak? It's a bundling app, bundling solution. So you put your app with all its dependencies in one bundle, and then you can distribute it for all the distributions. You don't have to package it for different distributions. And also, one of the core concepts is sandboxing.
17:21
So first, they were focused on bundling, but nowadays, they are focusing on sandboxing as well. And when it comes to sandboxing an app, you don't want the app to access system bus at all. And GeoClue is on system bus for many reasons. So I talked to the person, Mattias Klassen, who is working on the sandboxing solutions.
17:43
So they are called portals. The portals are a way for app to get to system without actually directly having access to the system, host system. So it's much more secure. And he wanted to do a geolocation portal.
18:01
But since we already have a privacy story, we had to remove some of that code. And now, hopefully, we will eventually remove all of our privacy stuff in favor of the Flatpak geolocation portal. And Flatpak will handle all your apps.
18:20
We'll talk to Flatpak's portal, and that will talk to GeoClue for you. So it will be more secure that way. But we have challenges ahead. The Mozilla location service, when it was announced, Mozilla was still doing devices.
18:40
They were into mobile stuff, and that was their main use case for it. But they haven't been into that for two years at least now. They are really nice people, so they are keeping it up. The service is still there. We can still use it. And I think you can also contribute back to it, like with their Android app. But how long would it be there?
19:03
Nobody knows. So there is this uncertainty about the service. And this service is extremely important for free desktop right now, because if you can't get your location, all these apps, they are not very useful. And especially, there is something like automatic times on update.
19:21
Once you get used to that, you're kind of expecting it to always work, right? So it would be a pity if we can't locate you anymore all of a sudden, and we have only your city-level location at best. So I would be interested in hearing about if anyone has any suggestion on how to fix this problem.
19:40
The code is open source. It can be moved somewhere else. It can be hosted by somewhere else, the same service. So if anyone has any ideas, let me know. You want more platforms? A lot of embedded devices, they took GeoClue 1, and they are still using that one. And that source code is not even there anymore.
20:02
It's not just unmaintained. It's just not there, the source code, upstream. So it's a maintenance burden, so I think they really should all move to GeoClue 2. Now, of course, it's a bit of a task because the API is different, architecture is different, but I think it's worth it to do that effort. And it's been a while.
20:21
It's been like four years, three, four years that GeoClue 2 came out, so it's time. Now, we need more developers. As I mentioned with GitLab, I saw more contribution coming in, a lot more than before, but I would like some more developers to actually start actively working on it. We have many different tasks to still fix in GeoClue,
20:42
so have work. If you want to work on something cool, please consider this project. Also, as I mentioned before, Rust. So I really don't believe that any new source code should be written in C and C++, at least. I understand existing source code,
21:02
especially large codebase remaining in C and C++ because it's a lot of work to port to Rust, so that's understandable. But this GeoClue score is not that big, and it could be done if I count in mandates like, I don't know, a month at best,
21:22
if I do work on it full-time. But that's the worst-case scenario. I'm hoping maybe it will be a Summer of Code project, but we will see. But if anyone else wants to help me with that, it would be awesome, and it will go much, much faster and much easier. And if you want to have some kind of practice
21:43
of Rust or porting to Rust from C, this is a really ideal project for that because it's a simple architecture, very few objects, and it would be really good practice if you want that practice for this. Yeah, that's my presentation. Okay, thank you very much.
22:08
Ten minutes of question and answers, if you want. So you have all the freedom to share.
22:27
Yes, not really. I would like to improve. The question was that, if we have other sources in mind for GeoClue for getting location, no, the thing is that the app I mentioned,
22:43
GPS Share, that doesn't support all devices yet. I didn't get enough time to work on that and improve on that. So if you want to, or someone else wants to help on that, that would be awesome. Yeah, that's my main thing. Another source could be the GPS Sharing app for Android.
23:04
It's only for Android. There is no support for Apple for, what is it called, iPhone. So yeah, so if someone can add that, that would be cool too.
23:28
No, the question was what about Galileo, most more or less. But when we say GPS, it's not just GPS, it's all the satellites, all the networks. We want them all.
23:41
And yeah, GNSS, yeah. And actually there were patches to GPS Share for fixing that. Like I was assuming in the strings that it starts with a GP, which is for GPS. But someone fixed that, I think. So it supports all those.
24:07
Is there anybody, because we have five, six minutes left, that wants to do a lightning talk. In the previous sort of surface time slots,
24:22
there was always somebody who wanted to do a little blurb in front of us. And he got a standing applause almost, just because he dared, or she dared. Is there a she that for once wants to sort of stand up and do something? Come on. Don't you want something from the crowd?
24:42
No? You're just here to consume. Oh, well, thank you very much.