{"id":21741083,"url":"https://github.com/devfabiosilva/witsml21parser","last_synced_at":"2025-04-13T03:41:51.694Z","repository":{"id":192163979,"uuid":"686193302","full_name":"devfabiosilva/witsml21parser","owner":"devfabiosilva","description":"A fast, robust and portable Witsml to BSON parser","archived":false,"fork":false,"pushed_at":"2024-10-29T23:51:02.000Z","size":14997,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T20:51:28.553Z","etag":null,"topics":["bson","c","cplusplus","energistics","etp","java","nodejs","oil-and-gas","osdu","python","soap","witsml","xml"],"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/devfabiosilva.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-09-02T01:50:11.000Z","updated_at":"2024-10-29T23:51:06.000Z","dependencies_parsed_at":"2024-05-16T03:44:04.541Z","dependency_job_id":"fcb8e1c9-4f0e-4c4c-961d-90336767b741","html_url":"https://github.com/devfabiosilva/witsml21parser","commit_stats":null,"previous_names":["devfabiosilva/witsml21parser"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfabiosilva%2Fwitsml21parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfabiosilva%2Fwitsml21parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfabiosilva%2Fwitsml21parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devfabiosilva%2Fwitsml21parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devfabiosilva","download_url":"https://codeload.github.com/devfabiosilva/witsml21parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248660947,"owners_count":21141373,"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","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":["bson","c","cplusplus","energistics","etp","java","nodejs","oil-and-gas","osdu","python","soap","witsml","xml"],"created_at":"2024-11-26T06:16:36.003Z","updated_at":"2025-04-13T03:41:51.672Z","avatar_url":"https://github.com/devfabiosilva.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# witsml21parser\n\nA fast, robust and portable [Witsml 2.1](https://energistics.org/witsml-data-standards) to [BSON parser](https://bsonspec.org/)\n\n## Features\n\n- Fast\n- Robust\n- Portable ([NodeJS](https://github.com/devfabiosilva/witsml21parser/tree/master/NodeJS/) | [Java/Kotlin](https://github.com/devfabiosilva/witsml21parser/tree/master/Java) | PHP (in development) | [Python 3](https://github.com/devfabiosilva/witsml21parser/tree/master/Python))\n- Low dependency libraries.\n- No Garbage Collector on parsing\n- Low memory allocation/reallocation\n- Optimized for C/C++ applications\n\n# Before you install\n\nBefore you install you need to check these tools:\n\n```sh\nA Linux based OS\nPython \u003e= 3.8 (For Python 3 application)\nPython 3 development API (for Python 3 application)\ngcc \u003e= 9.4.0\ncmake \u003e= 3.16.3\nmake \u003e= 4.2.1\ngit \u003e= 2.25.1\nexecstack \u003e= 1.0 (for Java application)\nJava SDK development API (for Java application)\nNode JS \u003e= v16.20.2 API (for Node JS)\n```\n\n# Downloading\n\n```sh\ngit clone https://github.com/devfabiosilva/witsml21parser.git\n```\n\n# Compiling\n\n**_witsml21parser_** needs _libbson_ library to be compiled. For first time compiling you need to download and compile dependencies first.\n\nThere are two static dependencies:\n\n- libbson\n- WITSML 2.1 - ETP validation schemas C code\n\n## - Compiling libbson third-party library\n\n```sh\nmake install_bson\n```\n\nFor multi-threading fast compiling use _-jN_ option e.g:\n\n```sh\nmake -j12 install_bson\n```\n## - WITSML 2.1 - ETP validation schemas C code\n\n```sh\nmake pre pre_shared\n```\n\nFor multi-threading fast compiling use _-jN_ option e.g:\n\n```sh\nmake -j12 pre pre_shared\n```\n\n## - Compiling WITSML 2.1 to BSON parser\n\nAfter compiling _libbson_ third-party library and _WITSML 2.1 - ETP validation schemas C code_ just type:\n\n```sh\nmake\n```\n\nFor multi-threading fast compiling use _-jN_ option e.g:\n\n```sh\nmake -j12\n```\n\n### Executing\n\nJust type:\n\n```sh\n./cws \u003cFILE_NAME\u003e\n```\n\nE.g:\n\n```sh\n./cws BhaRun.xml\n```\n\nIt will convert BhaRun.xml to BhaRun.bson file\n\n## - Compiling WITSML 2.1 to BSON parser for Java/Kotlin\n\nTo compile native library for Java/Kotlin just type:\n\n```sh\nmake jni\n```\n\nFor multi-threading fast compiling use _-jN_ option e.g:\n\n```sh\nmake -j12 jni\n```\n\n### Executing Java WITSML 2.1 to BSON parser\n\nBefore you run your code you MUST set native library environment.\n\n- Go to Java sources [folder](https://github.com/devfabiosilva/witsml21parser/tree/master/Java/library)\n- Execute shell script:\n\n```sh\nsource env.sh\n```\n- Open with your favorite IDE and run Java code [here](https://github.com/devfabiosilva/witsml21parser/tree/master/Java/library)\n- Run Tests and Aplication\n\n# SAMPLE APP jwitsml21cmd-1.0.jar\n\nThis app shows how to use WITSML 2.1 BSON parser in Java/Kotlin\n\n## Before use\n\nYou need to compile JNI\n\n```sh\ncd \u003cWITSML 2.1 BSON PARSER PROJECT FOLDER\u003e/\nmake jni\n```\n\nFile _libjwitsmlparser21.so_ must be in root project folder.\n\nCompile Java library with _maven_\n\n```\ncd \u003cWITSML 2.1 BSON PARSER PROJECT FOLDER\u003e/Java/library\nmvn -U clean install\n```\n\n## Running\n\n```sh\ncd \u003cWITSML 2.1 BSON PARSER PROJECT FOLDER\u003e/Java/sampleApp\nsource env.sh\njava -jar jwitsml21cmd-1.0.jar \u003cWITSML 2.1 XML FILES\u003e\n```\n\n### Examples\n\n```sh\njava -jar jwitsml21cmd-1.0.jar ../../examples/xmls/OpsReport.xml\n\n```\n\n```sh\nWelcome to WITSML 2.1 parser\n\n========================\nOpening ../../examples/xmls/OpsReport.xml\nInstance name: jWITSMLParser 2.1 - (0x7f599422ab40)\nSaving to file OpsReport.json\nSaving to file OpsReport.bson\n\nStatistics for \"../../examples/xmls/OpsReport.xml\":\n        {arrays=60, booleans=22, costs=9, dateTime=73, doubles=28, enums=55, long64s=47, measures=382, memoryUsed=3160, strings=463, total=1139}\n```\n\n```sh\njava -jar jwitsml21cmd-1.0.jar ../../examples/xmls/OpsReport.xml ../../examples/xmls/Risk.xml\n```\n\n```sh\nWelcome to WITSML 2.1 parser\n\n========================\nOpening ../../examples/xmls/OpsReport.xml\nInstance name: jWITSMLParser 2.1 - (0x7fe87424aba0)\nSaving to file OpsReport.json\nSaving to file OpsReport.bson\n\nStatistics for \"../../examples/xmls/OpsReport.xml\":\n        {arrays=60, booleans=22, costs=9, dateTime=73, doubles=28, enums=55, long64s=47, measures=382, memoryUsed=4532, strings=463, total=1139}\n\n========================\nOpening ../../examples/xmls/Risk.xml\nInstance name: jWITSMLParser 2.1 - (0x7fe8742a8b30)\nSaving to file Risk.json\nSaving to file Risk.bson\n\nStatistics for \"../../examples/xmls/Risk.xml\":\n        {arrays=12, dateTime=17, enums=14, long64s=9, measures=18, strings=106, total=176}\n```\n\n# Executing NodeJS (\u003e=v16.20.2) WITSML 2.1 to BSON parser\n\n## Before use (first time only)\n\nYou need to compile JS WITSML 2.1 to BSON parser\n\nIn your root _witsml21parser_ folder\n\n```sh\nmake nodejs \u0026\u0026 cd $(pwd)/NodeJS \u0026\u0026 source env.sh\n```\n\n## Running\n\nIn your [NodeJS](https://github.com/devfabiosilva/witsml21parser/tree/master/NodeJS/) folder:\n\n```sh\nnode app.js\n```\n\n# Executing Python 3 WITSML 2.1 to BSON parser\n\n## Before use (first time only)\n\nYou need to compile PyWITSML 2.1 to BSON parser\n\nIn your root _witsml21parser_ folder\n\n```sh\nmake py \u0026\u0026 cd $(pwd)/Python \u0026\u0026 source env.sh\n```\n\n## Running\n\nIn your [Python](https://github.com/devfabiosilva/witsml21parser/tree/master/Python/) folder:\n\n```sh\npython3 witsml21parser.py\n```\n\n# BENCHMARKS\n\nPrimary benchmarks in Java had been shown that WITSML 1.4.1.1 parsing objects are 56 % faster than JAXB in Java application.\n\nJAXB only parses XML objects and store their values in respective Java objects. In other hand, WITSML BSON parser not only parses XML objects in C structs but it creates BSON objects, adds objects to BSON, serializes it and parses it to Java native byte object.\n\nBut wait! How is WITSML BSON parser faster than JAXB doing more stuffs?\n\nAnswer is simple.\n\n- Less allocation/reallocation in memory\n- Referencing objects instead create and copy\n- gSoap optimization on parsing XML to C structs. See some interesting [GENIVIA](https://www.genivia.com/) articles [here](https://www.genivia.com/ugrep.html)\n- Recycled alloc'd memory\n- Low memory usage\n- Only two library dependency ([gSoap](https://www.genivia.com/products.html) and [libbson](https://github.com/mongodb/mongo-c-driver/tree/master/src/libbson))\n- No garbage collector on parsing objects\n\n# SIGNING KEY\n\n_Keys for signature_:\n\n**[fabioegel@gmail.com](mailto:fabioegel@gmail.com)**\n**fingerprint**: 6E21 A6B6 E1A4 6580 CA00 FA54 1077 26E9 14B9 16A2\n\n# LICENSES\n\nThis project is fully open source and MIT license.\n\n## WARNING\n\nWITSML 2.1 BSON parser needs library with different licenses.\n\nSee [version.json](https://github.com/devfabiosilva/witsml21parser/blob/master/version.json) for details.\n\n# DONATIONS\n\nAny donation is welcome.\n\nConsider any amount of donation in _BITCOIN_: *1JUzcSh3vsBCRji5n5rJsbHQfW3hYrNAW4*\n\nThank you :)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfabiosilva%2Fwitsml21parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevfabiosilva%2Fwitsml21parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevfabiosilva%2Fwitsml21parser/lists"}