Git Product home page Git Product logo

Comments (10)

Katsute avatar Katsute commented on June 26, 2024

Use similar binary search implemented in #90 against bus line not possible

Store raw data in cache, DO NOT STORE OBJECTS; will cause memory issues.

< 10,000 busses

https://bt.mta.info/wiki/Developers/SIRIVehicleMonitoring

Please note that the calls made without either a VehicleRef or LineRef produces quite a load on the system, so use them sparingly. Any developers found to be making repeated calls (e.g. at less than 30 second intervals) for all vehicles in the system may find their key revoked.

from onemta.

Katsute avatar Katsute commented on June 26, 2024

Only this subclass needs to be modified

Stop monitoring should derive values from vehicle request if possible.

from onemta.

Katsute avatar Katsute commented on June 26, 2024

JSON parser needs to be massively optimized to avoid memory issues; use JIT (just-in-time) parsing, where we load immediate keys into memory, then parse the subsequent object when requested.


This count needs to be optimized to only run once: not possible due to split logic

final long count = Regex9.count(quotes.reset(after));

https://sites.google.com/site/gson/streaming

https://stackoverflow.com/a/11876086

Regex may actually be more inefficient since we are rescanning the string multiple times. Use character loop stream instead.


Return a method to parse for:

else if(arrayMatcher.group("array") != null) // open new array
list.add(openArray(reader, json));
else if(arrayMatcher.group("map") != null) // open new map
list.add(openMap(reader, json));

and

else if(mapMatcher.group("array") != null) // open new array
obj.set(key, openArray(reader, json));
else if(mapMatcher.group("map") != null) // open new map
obj.set(key, openMap(reader, json));

from onemta.

Katsute avatar Katsute commented on June 26, 2024

@mashiro-san create a branch upgrade-json

from onemta.

 avatar commented on June 26, 2024

@Katsute I have created a new branch upgrade-json@f3dfe30

from onemta.

Katsute avatar Katsute commented on June 26, 2024
  • get methods need to be optimized so synchronized isn't blocking threads
  • pull bus stop alert info from gtfs feed
  • derive stop vehicles from all vehicles

from onemta.

Katsute avatar Katsute commented on June 26, 2024

Use CopyOnWriteArrayList to allow concurrent reads and locked writes.

ConcurrentMap?

In order to make write thread safe, have synchronized write block also check if its expired before fetching (any current active writes will make the result not expired, any queued writes will see that the resource is no longer expired and will return the new one instead).

Get first then check if expired to prevent concurrency issues.

from onemta.

Katsute avatar Katsute commented on June 26, 2024

@mashiro-san create a new branch upgrade cache

from onemta.

 avatar commented on June 26, 2024

@Katsute I have created a new branch upgrade-cache@ebf9c8e

from onemta.

Katsute avatar Katsute commented on June 26, 2024

Possibly use #100 to implement this.

from onemta.

Related Issues (18)

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.