{"id":26436238,"url":"https://github.com/sharvillimaye/lightningjx","last_synced_at":"2025-07-28T07:06:09.079Z","repository":{"id":253954086,"uuid":"841574080","full_name":"sharvillimaye/LightningJX","owner":"sharvillimaye","description":"LightningJX (Lightning JSON/XML) is a high-performance, real-time data processing library designed for efficiently handling JSON and XML data streams.","archived":false,"fork":false,"pushed_at":"2024-08-29T02:46:18.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T08:16:01.437Z","etag":null,"topics":["c","datastream","json-parser","realtime","xml-parser"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharvillimaye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-12T17:16:09.000Z","updated_at":"2024-09-08T18:46:54.000Z","dependencies_parsed_at":"2025-03-19T00:15:09.572Z","dependency_job_id":null,"html_url":"https://github.com/sharvillimaye/LightningJX","commit_stats":null,"previous_names":["sharvillimaye/lightning-xml","sharvillimaye/lightningjx"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sharvillimaye/LightningJX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvillimaye%2FLightningJX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvillimaye%2FLightningJX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvillimaye%2FLightningJX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvillimaye%2FLightningJX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharvillimaye","download_url":"https://codeload.github.com/sharvillimaye/LightningJX/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharvillimaye%2FLightningJX/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267475817,"owners_count":24093361,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","datastream","json-parser","realtime","xml-parser"],"created_at":"2025-03-18T08:15:47.825Z","updated_at":"2025-07-28T07:06:08.915Z","avatar_url":"https://github.com/sharvillimaye.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LightningJX\n\n**LightningJX** is a high-performance, real-time data processor designed for efficiently handling JSON and XML data streams. Built with speed and flexibility in mind, LightningJX operates as a server where clients can connect and send data streams in real time. It can also be integrated as a library in C/C++, C#, and Python projects. Its lightweight design ensures minimal latency, making it ideal for applications requiring rapid and reliable data processing.\n\n## Features\n\n* **Real-Time Stream Processing:** Optimized for low-latency, LightningJX processes incoming data streams in real time, ensuring your applications can handle dynamic data efficiently.\n* **Support for JSON and XML:** LightningJX handles both JSON and XML data formats, providing versatility in how you process data.\n* **Server Mode:** LightningJX operates as a server, allowing multiple clients to connect and send data streams for processing. By default, the server logs incoming data to a file, but this behavior can be fully customized through a user-defined callback function.\n* **Custom Message Handling:** LightningJX provides a default handler template that logs data to a file. Users can customize this template to specify exactly how incoming messages should be processed.\n* **Library Integration:** LightningJX can also be embedded as a library in your existing C/C++, C#, or Python projects for seamless data processing capabilities.\n* **High Performance:** Designed with performance in mind, LightningJX processes large volumes of data with minimal overhead, keeping your applications responsive.\n* **Cross-Platform Compatibility:** LightningJX is built to run on multiple platforms, making it versatile for deployment across different environments.\n\n## Installation\n\n### Standalone Server\n\n1. Clone the Repository:\n\n    ```bash\n    git clone https://github.com/sharvillimaye/lightningjx.git\n    cd lightningjx\n    ```\n\n2. Build the Server:\n\n    ```bash\n    make\n    ```\n\n3. Run the Server:\n\n    ```bash\n    ./bin/lightningjx-server [options]\n    ```\n\n### Library Integration\n\n#### C/C++\n\n1. Include Header:\n\n    ```c\n    #include \"lightningjx.h\"\n    ```\n\n2. Link Library: \u003cbr\u003e *When compiling your C/C++ project, link against the LightningJX library.*\n\n    ```bash\n    gcc -o yourproject yourproject.c -L/path/to/lightningjx -llightningjx\n    ```\n\n#### C#\n\n1. Add DLL Reference: \u003cbr\u003e *Add a reference to the LightningJX DLL in your C# project.*\n2. Use in Code:\n\n    ```csharp\n    using LightningJX;\n    ```\n\n#### Python\n\n1. Install the Python Package:\n\n    ```bash\n    pip install lightningjx\n    ```\n\n2. Use in Code:\n\n    ```python\n    import lightningjx\n    ```\n\n## Usage\n\n### Server Mode\n\nWhen running in server mode, LightningJX listens on a specified port for incoming connections and processes JSON or XML data streams sent by clients. The server's behavior is fully customizable through a callback function that you must define.\n\n#### Default Behavior\n\nBy default, the LightningJX server logs all incoming data to a file named `data.log` in the current working directory. This provides basic functionality out of the box, allowing users to see the server in action without requiring any custom configuration.\n\n#### Starting the Server\n\nTo start the server, you need to specify the port and data type. However, the server will not process incoming data unless you define a callback function.\n\n```bash\n./lightningjx-server -p 8080 -t json\n```\n\nThe above command will start the server on port 8080 and process JSON data streams, logging them to `data.log`. \n\n#### Server Options\n\n* `-p \u003cport\u003e`: Specify the port on which the server will listen (default: 8080).\n* `-t \u003ctype\u003e`: Specify the data type to process (`json` or `xml`).\n* `-v`: Enable verbose logging.\n\n### Custom Message Handling\n\nIf the default logging behavior doesn't meet your needs, you can define a custom callback function to handle incoming messages according to your application's requirements. The default handler can be used as a template for this customization.\n\n#### Default Handler Template in C\n\n```c\n#include \"lightningjx.h\"\n#include \u003cstdio.h\u003e\n\nvoid default_handler(const char* data) {\n    // Log data to file\n    FILE *f = fopen(\"data.log\", \"a\");\n    if (f == NULL) {\n        printf(\"Error opening file!\\n\");\n        return;\n    }\n    fprintf(f, \"%s\\n\", data);\n    fclose(f);\n}\n\nint main() {\n    LightningJX_SetMessageHandler(default_handler);\n    LightningJX_StartServer(8080, JSON);\n    return 0;\n}\n```\n\n*More information about library usage in Python and C# can be found in the `examples` directory.*\n\n## Contributing\n\nContributions are welcome! Please submit pull requests, report issues, or suggest features via the GitHub repository.\n\n## License\n\nCopyright (c) 2024 Sharvil Limaye. Released under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharvillimaye%2Flightningjx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharvillimaye%2Flightningjx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharvillimaye%2Flightningjx/lists"}