René's URL Explorer Experiment


Title: Java 25, the Foreign Function & Memory API and removal of Unsafe · Issue #259 · lmdbjava/lmdbjava · GitHub

Open Graph Title: Java 25, the Foreign Function & Memory API and removal of Unsafe · Issue #259 · lmdbjava/lmdbjava

X Title: Java 25, the Foreign Function & Memory API and removal of Unsafe · Issue #259 · lmdbjava/lmdbjava

Description: @stroomdev66 and I (@at055612) have recently been added as committers on this project to help out @benalexau, having been long time users of LmdbJava and occasional contributors. We actively use LmdbJava in a number of different use case...

Open Graph Description: @stroomdev66 and I (@at055612) have recently been added as committers on this project to help out @benalexau, having been long time users of LmdbJava and occasional contributors. We actively use Lm...

X Description: @stroomdev66 and I (@at055612) have recently been added as committers on this project to help out @benalexau, having been long time users of LmdbJava and occasional contributors. We actively use Lm...

Opengraph URL: https://github.com/lmdbjava/lmdbjava/issues/259

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Java 25, the Foreign Function \u0026 Memory API and removal of Unsafe","articleBody":"@stroomdev66 and I (@at055612) have recently been added as committers on this project to help out @benalexau, having been long time users of LmdbJava and occasional contributors.\nWe actively use LmdbJava in a number of different use cases in our OSS project and are very grateful to @benalexau, @krisskross and all the other contributors for a great library.\n\nNow that Java 25 and its new Foreign Function and Memory API are in general availability, it seems sensible to incorporate them into LmdbJava.\nThis has been a long anticipated change (see #42).\nWe are therefore keen to make changes to LmdbJava to incorporate the FFM API and remove the use of `Unsafe`.\n@stroomdev66 has done some initial experimentation with replacing jnr-ffi with the new FFM API.\n\nSuch changes need to be done in a way that does not cause too much pain for the LmdbJava user community.\nWe have had some initial exploratory conversations with @benalexau about the way forward and this is a current rough plan.\n\n---\n\n# LmdbJava v1.x\n\n* Maintain the current Java compile target of Java 8.\n* Address the two outstanding PRs:\n  * #250 - This one is mine and needs to be finished to address comparator issues introduced in 0.9.0.\n    It will mean the removal of `MDB_UNSIGNEDKEY` that was added in 0.9.1 to partially address 0.9.0.\n  * #255\n* Uplift any existing dependencies, including LMDB.\n\nUsers that are not in a position to move to Java 25 can continue to use v1.x with no change.\n\n\n# LmdbJava v2.x\n\n* Change the Java compile target to Java 25.\n* Change the internal LmdbJava code to use the FFM API for interaction with LMDB.\n* Change `Env` to create and hold on to an `Arena` instance for its life.\n  This will be used for creating MemorySegments internally.\n* Change the internal LmdbJava code to use MemorySegments when interacting with LMDB.\n* Change the existing BufferProxy implementations to map the buffers to MemorySegments.\n* Add a new MemorySegmentProxy class so that client code can fully exploit MemorySegment, e.g. `Env\u003cMemorySegment\u003e`.\n* Remove any use of Unsafe.\n\nThis seems like the best way to use the FFM API without causing a lot of breaking change for users of LmdbJava.\nIt may come at the cost of some performance penalty due to mapping between buffer implementations and MemorySegment.\nThere may also be performance differences between MemorySegment and Unsafe buffer access.\n\nThis work is currently in progress on this branch:\nhttps://github.com/lmdbjava/lmdbjava/tree/java-foreign-function-and-memory-api\n\nand there is a draft PR for the work here #258.\n\nUsers that can migrate to Java 25, but have a lot of existing code built around Netty/Agrona/DirectByteBuffer can use this with hopefully no or minimal change.\n\n\n# LmdbJava v3.x\n\n* Include all of the v2.x work.\n* Remove the generic `\u003cT\u003e` type from `Env`/`Dbi`/`Txn`, etc.\n* Change the LmdbJava API to exclusively use `MemorySegment` rather than `T`.\n* Remove the netty and agrona dependencies.\n* Remove BufferProxy and all its implementations.\n\nWe think that ultimately MemorySegment is the natural replacement of the various buffer implementations.\nIt offers a much richer API for working with ranges of memory.\nTherefore it seems sensible for MemorySegment to be the only mechanism for passing data in/out of LMDB.\n\nWe assume that for people that use Netty and Agrona in their projects, that Netty/Agrona will in time improve their libraries to integrate with MemorySegments so that LmdbJava users can map back/forth themselves.\n\nRemoving the various buffer implementations will make the LmdbJava code simpler and make it easier for the LmdbJava maintainers to maintain the project and support users' issues.\n\nUsers who can migrate to Java 25 and have little or no legacy buffer based code can move to this version.\n\n---\n\nWe welcome any comments or suggestions that people have on the Java25/FFM/Unsafe changes and/or the general direction of LmdbJava development.\n","author":{"url":"https://github.com/at055612","@type":"Person","name":"at055612"},"datePublished":"2025-10-24T13:02:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/259/lmdbjava/issues/259"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0c70bb5d-823a-246e-59ae-720bc7e307d9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB0E2:6CA27:1D9F568:27FCCC7:69707B37
html-safe-noncee1b55776bc281148e91be8e5ee7442549d1b16f463653b45e629f922402649e5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMEUyOjZDQTI3OjFEOUY1Njg6MjdGQ0NDNzo2OTcwN0IzNyIsInZpc2l0b3JfaWQiOiIyMTE4OTAwNDIzMzcwNzY3MTU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1948a98184919abb363630d4a07103fb7fcebd0c0b6560d7764b200229316df7
hovercard-subject-tagissue:3549401788
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lmdbjava/lmdbjava/259/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9f6e5b45a7e6ec190b55f36e0637e1094421152ca67c85275161e96d248c7182/lmdbjava/lmdbjava/issues/259
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9f6e5b45a7e6ec190b55f36e0637e1094421152ca67c85275161e96d248c7182/lmdbjava/lmdbjava/issues/259
og:image:alt@stroomdev66 and I (@at055612) have recently been added as committers on this project to help out @benalexau, having been long time users of LmdbJava and occasional contributors. We actively use Lm...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameat055612
hostnamegithub.com
expected-hostnamegithub.com
None9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2
turbo-cache-controlno-preview
go-importgithub.com/lmdbjava/lmdbjava git https://github.com/lmdbjava/lmdbjava.git
octolytics-dimension-user_id19765602
octolytics-dimension-user_loginlmdbjava
octolytics-dimension-repository_id60480511
octolytics-dimension-repository_nwolmdbjava/lmdbjava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id60480511
octolytics-dimension-repository_network_root_nwolmdbjava/lmdbjava
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7d6181066430cc06553c8396ca201e194ae33cb9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues/259#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Flmdbjava%2Flmdbjava%2Fissues%2F259
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Flmdbjava%2Flmdbjava%2Fissues%2F259
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=lmdbjava%2Flmdbjava
Reloadhttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues/259
Reloadhttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues/259
Reloadhttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues/259
lmdbjava https://patch-diff.githubusercontent.com/lmdbjava
lmdbjavahttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Flmdbjava%2Flmdbjava
Fork 124 https://patch-diff.githubusercontent.com/login?return_to=%2Flmdbjava%2Flmdbjava
Star 866 https://patch-diff.githubusercontent.com/login?return_to=%2Flmdbjava%2Flmdbjava
Code https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava
Issues 8 https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues
Pull requests 1 https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/pulls
Actions https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/actions
Projects 0 https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/projects
Wiki https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/security
Please reload this pagehttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues/259
Insights https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/pulse
Code https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava
Issues https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues
Pull requests https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/pulls
Actions https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/actions
Projects https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/projects
Wiki https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/wiki
Security https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/security
Insights https://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/lmdbjava/lmdbjava/issues/259
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/lmdbjava/lmdbjava/issues/259
Featurehttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues?q=type:"Feature"
Java 25, the Foreign Function & Memory API and removal of Unsafehttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues/259#top
enhancementAdditional or new functionalityhttps://github.com/lmdbjava/lmdbjava/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/at055612
https://github.com/at055612
at055612https://github.com/at055612
on Oct 24, 2025https://github.com/lmdbjava/lmdbjava/issues/259#issue-3549401788
@stroomdev66https://github.com/stroomdev66
@at055612https://github.com/at055612
@krisskrosshttps://github.com/krisskross
#42https://github.com/lmdbjava/lmdbjava/issues/42
@stroomdev66https://github.com/stroomdev66
gh-249 Remove MDB_UNSIGNEDKEY, let CursorIterable call mdb_cmp #250https://github.com/lmdbjava/lmdbjava/pull/250
Fix resulting buffer from BufferProxy's out method being ignored. #255https://github.com/lmdbjava/lmdbjava/pull/255
https://github.com/lmdbjava/lmdbjava/tree/java-foreign-function-and-memory-apihttps://github.com/lmdbjava/lmdbjava/tree/java-foreign-function-and-memory-api
#258https://github.com/lmdbjava/lmdbjava/pull/258
enhancementAdditional or new functionalityhttps://github.com/lmdbjava/lmdbjava/issues?q=state%3Aopen%20label%3A%22enhancement%22
Featurehttps://patch-diff.githubusercontent.com/lmdbjava/lmdbjava/issues?q=type:"Feature"
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.