How-To: a browser based, real time, shared memory inspection/debugger application [closed]

Background:

I have a C application running under Linux utilizing shared memory. I also have a debugger written in Python that can link to said shared memory and access individual variable values of global scope.

Question:

How can I develop a local browser-based application/page that, via my Python process, I can connect with in order to display near real-time variable values in a prettified form?

Usage:

I should be able to launch my background applications, then launch this server/client application in a browser, then be given an option to load a page with list of variables names (2-way communication), after which it simply should start displaying all the names with their values.

What I need:

Technical, process-flow solution, that utilizes solely Python if possible (understanding html/css/js/etc are necessary), and provides the ability to update the browser page’s list of values automatically at >= 20Hz.

Additional details:

  • It needs to update the page between 20-60Hz, preferably in order (e.g. ‘time’ may be a value and want to update as 1.3 -> 1.4 -> 1.5…
  • Only needs to work with Firefox
  • Linux-only development, don’t care about Windows or Mac
  • I don’t want to use a real GUI app like QT/WX/GTK

4

The concept of a local web app is a good and appropriate one. I have built several of these, and they work well. They have very fast update times, and let me work with Web tools rather than the declining breed of GUI toolkits.

I recommend a WebSocket-based connection between your Python code and your web page/client/app. This will give you near-real-time update speed and the ability to communicate bi-directionally between Python and a JavaScript-based front-end/app. You can use whatever JavaScript frameworks or widgets you like. There are some quite good graphing, plotting, and visualization frameworks for web apps these days–some better than what you typically see in GUIs, even.

There are an increasing number of ways to integrate WebSockets and Python. I prefer the Flask web app framework for its combination of simplicity and generality. You can run it natively (it has a built-in web server), atop Tornado, behind a real web server, etc. For a local app, you may want to review this simple demo which requires no extra middleware.

1

You might use an HTTP server library like libonion (or perhaps Wt), perhaps even in your C application, and use AJAX techniques (perhaps with Jquery) -and perhaps WebSocket- to periodically update the dynamic web page. FWIW, my MELT monitor is doing this.

Notice that web technology cannot guarantee any update frequency, in particular in the event of long latency (imagine the browser being in Australia, and your C application running in the middle of the USA with a bad internet connection between them). But if both the HTTP server program (e.g. your C application using libonion) and the browser are near (on the same LAN) you probably would be able to get 20Hz updates.

In my view, you might not need any Python or PHP code (by adding HTTP server ability in your C application with libonion). However, you need to become familiar with web technologies (HTML5, Javascript, DOM) and HTTP. For that w3schools -and other websites- is not perfect but has a lot of useful information.

If for whatever reason you still need to have a separate Python process, I’m sure you would be able to find Python HTTP server libraries.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật