Giter VIP home page Giter VIP logo

Comments (3)

ricardobalk avatar ricardobalk commented on June 6, 2024 1

This one is on me. Will see what I can create.

from server.

moogacs avatar moogacs commented on June 6, 2024

Would you merge #13 ! And I agree with you that it would be better if it's in the request body instead of the URL

from server.

denysvitali avatar denysvitali commented on June 6, 2024

I'm curious to see what's your idea for this topic: I see different options that might be explored, depending on the project goals / use cases.

One publisher, few listeners

Use cases

  • Location sharing with your friends

This is a situation where you basically have one publisher and N listeners, with N usually < 10.

Security

In this case, the endpoints must be secured as follows:

  • One key for the publisher (so that only he can push location changes)
  • One key for the listeners (so that only people with the key can see the shared location, for X minutes)

Single location broadcast

For certain situations, it might make sense to broadcast the location of an object / person.
This is a one to many approach, and ideally the clients do not need to authenticate themselves to see the location because the information shall be public.

Use cases

  • Public transport location broadcasting
  • Position of a cyclist in a race

Security

  • One key for the publisher (so that only he can push location changes)
  • No key for the listeners - the location is broadcasted and everyone should be able to see this position

Many publishers, few listeners

Certain use-cases might need different publishers to send their location to a centralized place.

Use cases

  • Group of friends at an event, sharing their position in real-time
  • N users approaching the same location and wanting to share their ETAs

Security

  • Multiple keys for publishing, but each key must be able to update only one position
  • N listeners that are able to view the location on the map

Many publishers, many listeners

This is the most complex use case: in certain situations you might want to broadcast the position of many objects / people in real time, and let this be visible by a lot of people.

Use cases

  • A race, where every publisher is a participant and every listener is a spectator
  • A ride-sharing app, where the users can see every (free) driver location on the map

This approach requires a better handling of the locations in the database, ideally with a Geo Spatial database such as PostGIS, so that only the locations in a certain bounding box / in a radius from the user's location are returned.

Security

  • Multiple keys for publishing, but each key must be able to update only one position
  • No key for the listeners - the location is broadcasted and everyone should be able to see this position

from server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.