Giter Site home page Giter Site logo

dustinfast / ptc-sim Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 8.26 MB

A PTC Back Office Server with web interface, track/locomotive simulators, and EMP messaging subsystem.

License: MIT License

Python 74.25% CSS 2.12% HTML 5.29% JavaScript 18.35%
positive-train-control locomotive google-earth flask-web simulation

ptc-sim's Issues

Convert to py3

Convert the existing PTC-Sim code base to Python 3. Most of it is done, but the struct.pack and decode functions are causing problems.

Persistent map infoboxes are not functional

On asynch refresh, the status map's currently open infobox goes away.
Correct behavior:

If (!curr selected loco) {
    // persist currently open infobox
} else {
    // persist currently open infobox if non-loco OR if curr_selected_loco
}

Status map track lines don't update in web if changed server side.

Note that this is currently a non-issue, because they're never changed server side. However plans exist to change them based on milepost status in the future - this needs fixed before then.
Also note that changing track lines client-side may be expensive, because there are potentially a large number of them.

Heroku deployment unstable

Port binding fails with ADDRESS ALREADY IN USE and after a minute or two of runtime, memory usage exceeds 500mb limit (presumably as a result of multiple threads failing/restarting due to port bind issue).

Heroku web log output -

2018-11-23T18:28:09.088733+00:00 app[web.1]: Exception in thread Thread-15:
2018-11-23T18:28:09.088737+00:00 app[web.1]: Traceback (most recent call last):
2018-11-23T18:28:09.088739+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/threading.py", line 801, in __bootstrap_inner
2018-11-23T18:28:09.088741+00:00 app[web.1]:     self.run()
2018-11-23T18:28:09.088743+00:00 app[web.1]:   File "/app/lib_messaging.py", line 353, in run
2018-11-23T18:28:09.088745+00:00 app[web.1]:     sock.bind((BROKER, SEND_PORT))
2018-11-23T18:28:09.088747+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/socket.py", line 228, in meth
2018-11-23T18:28:09.088749+00:00 app[web.1]:     return getattr(self._sock,name)(*args)
2018-11-23T18:28:09.088751+00:00 app[web.1]: error: [Errno 98] Address already in use

Heroku main log -

2018-11-23T18:29:16.367777+00:00 heroku[web.1]: Process running mem=533M(104.3%)
2018-11-23T18:29:16.367829+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)

Connection timeout watcher prevents graceful exit.

lib_msging.Connection._timeoutwatcher does not allow graceful exit when the sim_track, sim_bos, and sim_broker modules are run individually. It likely needs a stop function. The line to start the thread in Connection.init() is commented out in the meantime.

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.