Hitchwiki / hitchwiki

The Hitchhiker's Guide to Hitchhiking the World
https://hitchwiki.org
32 stars 9 forks source link

Make it possible to have different types of spots? #168

Closed leocarona closed 5 years ago

leocarona commented 6 years ago

It would be nice if the Hitchwiki app, MyHitchhikingSpots for Android, eventually starts syncing all hitchhiking spots (with waiting times, etc) added by the users to Hitchwiki. But besides hitchhiking spots, the app also allows the users to save other locations that she/he wants to remember, as well as the final destination of each hitchhiking trip.

Possible solution

To avoid the need of keeping a separate webservice/database, should we then add new attributes to the spots to include these differences? On the app, we have columns such as IsHitchhikingSpot, IsWaitingForARide, IsPartOfARoute, IsDestination, AttemptResult, and a few more that can be checked here.

Impact: probably all the existing queries that Hitchwiki has nowadays should be updated to include some new conditions to their WHERE clause.


I'd love to hear what you guys would say about this. Should we not care about this now, maybe? Any other ideas on how to make the synchronisation between the app and Hitchwiki possible? There might be a lot of new spots been added by people through the app, it can help our databases grow. We can keep in mind that MyHitchhikingSpots is a Hitchwiki app and maybe we can do more to make it feel like it.

PS) Sorry if I'm adding this topic in the wrong place. Please, redirect me to a proper place to discuss this if there's any.

traumschule commented 6 years ago

thinking in mediawiki logic routes have a name, tag, start_date, end_date. they can be defined with a template on a user page. when a user adds a spot with a matching tag or date with an app (text snippets appended to the page), the software shows them as as a trip, maybe blog entries on the left and a map with POIs on the right. Would that be similar to what you had in mind?

leocarona commented 6 years ago

Hnn, I've been focused on the app development so I'm not much familiar with MW tech terms. Would you try to explain that to a dumb person, maybe? :)

I've just edited my post also trying to make it a bit more complete and possibly easier to be understood - could you please see if the solution you thought of can also be used considering the other columns mentioned now?

traumschule commented 6 years ago

TBH the app is not my wokring field and I need to read into the code first. So I'll leave some space for others to comment here :)

simison commented 6 years ago

IsHitchhikingSpot, IsWaitingForARide, IsPartOfARoute, IsDestination, AttemptResult

It probably won't make sense to complicate the setup now at this point. There might be some types of spots that make sense adding in different type (gas stations, gas stations with cross-over?), but first we just need to get the thing out.

It probably won't make sense to mix main spots table with private temporary content relevant to only one user; it will just bloat it up and make it slower to query.

In far future when this is rolling smoothly in HW, it might make sense to deploy the same software for Trashwiki and Nomadwiki. Especially Nomadwiki could do with all sorts of other spots: good wild camping beaches, abandoned buildings, good parks for camping, free water sources etc etc

If you can find a clean way to store it under /User:Username -namespace, that probably wouldn't hurt, but note that everyone can read+write to those pages so they're not really private.

leocarona commented 6 years ago

Good points. I'll try and think in other possible solutions.

Does MW restrict developers from adding new customised tables to the database? How does it sound for you guys if we add a table containing these additional fields?

That way I think we can store data that is private for MyHitchhikingSpots users in a new table and this way it shouldn't affect the speed of the current existing queries.

Please notice that the main goal of the app is to get users to save spots that will be public for everyone using Hitchwiki one day. The options of adding additional private spots is mostly to make the app more useful for yourself if you need to save some other types of spots on your way (gas station, police stations, speed bumps, radars, a place where the driver stopped to take a pee and you saw something nice, etc). We could also consider using these spots of other types saved through the app as public HW data if/when HW begins to give options to add other types of spots one day.

I also agree that there's a lot more urgent stuff that need to get more focus right now on HW, so nobody should need to start working on what we're discussing here any soon. It might be just a good idea to discuss the possible solution for this right now so that I can have some perspective about the future of the app and its option to sync data to HW, which is an option awaited by many HW users using the app.

traumschule commented 6 years ago

A new table would make sense, although it's a lot work to maintain it. MW templates are the easiest solution, IMHO. Possible workflow:

  1. http://beta.hitchwiki.org/en/Special:HWMap#hwmap-add (login: hitchwiki/autobahn)
  2. zoom to a spot, click 'continue' (currently broken #173) 3a. public spots can be added to a page (of a user or some city/country) via form with a template:
    {{Spot
    |lat=
    |lng=
    |desc=
    |IsHitchhikingSpot=
    |IsWaitingForARide=
    |IsPartOfARoute=
    |IsDestination=
    |AttemptResult=
    }}

    (The variable names are suboptimal, for example if it a sport is part of a route, you could set route=ROUTE_ID|ROUTE_NAME or leave it empty.)

3b. a form with a 'private' checkbox can be set -> the spot is written to the user page (encrypted with gpg or similar), hidden in a comment 4b. when the user page is viewed decryption only happens when the user is logged in ... (The private option does not really make sense, is complicated to setup and nd I can't see why private spots should be in HW)

If it's not written to a wiki page, how would it be related to HW? Then it is more like a independent application, i guess.

leocarona commented 6 years ago

Thanks, I'll have a look about MW templates option to share spots publicly.

About the option of private spots,

The idea is that the app should be useful for the user while hitchhiking, to encourage them to save their hitchhiking spots and to share them publicly to other hitchhikers through HW website or other HW tools.

Some users said they were having to use a second app (like Maps.Me, Google Maps, etc) in parallel to MHS because once in a while they found themselves willing to save a non-hitchhiking location to remind later. Non-hitchhiking locations could be the user's destination (needed to draw the start and end of a hitchhiking route on the map); could be a gas station that the user wants to remember later; etc. These non-hitchhiking locations wouldn't be useful for other people, but having the option to save them might make the app a bit more useful for the users themselves.

Other than that, some users might not feel comfortable in using the app if every information they save on it is publicly shared. I think it can be nice and necessary for users to opt-out, to select which spots they want public and which ones they want private. This is my opinion, but I'd be happy to hear your points of view on it too.

I could also consider to eventually build/find a separate web-service to store the private data, while only public data can be uploaded to HW.

Have you tried out the app yourselves? Maybe it would help if you tried it while hitchhiking one day, if you're an Android user.

leocarona commented 6 years ago

I have just edited my last answer here.

But again about the private spots, it's important to keep in mind that HW website lets user saves hitchhiking spots that are not connected anyhow to each other. Whereas a mobile app is usually expected by users to organise their hitchhiking spots as separate routes, besides also letting them save their hitchhiking spots that don't belong to any route.

These options make the app more useful for the users, but again, to be able to draw a hitchhiking route from start to end, we need to know where does it end. The end/destination is a non-hitchhiking spot that we need to know, but it should be private because this information alone isn't useful for other hitchhikers in any way.

With these long texts I'm trying to explain the need of expanding HW to accept non-hitchhiking spots and to also support saving data that is not public to everyone.

Everyone reading this discussion who are interested in this subject, please feel free to collaborate with ideas/questions/whatever. The goal is that we move this project together, even if I'm alone on the app development currently.

traumschule commented 6 years ago

what about adding non hitchhiking spots to nomadwiki.org and referencing them with the android app?

leocarona commented 5 years ago

I guess this issue will be fixed by the new issues some of us agreed about (link below). Therefore I'm closing this current issue as discussion may be continued on the most recent one.

https://github.com/Hitchwiki/hitchwiki-private/issues/169