[JAVA-163] Support Unix Domain Sockets Created: 09/Sep/10 Updated: 20/Mar/18 Resolved: 20/Mar/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 6 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Add support for unix domain sockets (AF_UNIX) – potentially with junixsocket (http://code.google.com/p/junixsocket/) This dep should probably be done in way where it is optional. This can easily be done by checking for the existence of the classes used for unix domain sockets before using them. This would make it an optional runtime dep.; it will still be a compile time dep. |
| Comments |
| Comment by Githook User [ 20/Mar/18 ] | |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Test: Limit Java version for UnixServerAddress tests
| |
| Comment by Githook User [ 20/Mar/18 ] | |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Complete unix socket support Ensure jnr library is optional via UnixServerAddress
| |
| Comment by Githook User [ 20/Mar/18 ] | |
|
Author: {'email': 'joan@profuzdigital.com', 'name': 'Joan Karadimov', 'username': 'joankaradimov'}Message: Support Unix Domain Sockets via jnr-unixsocket
| |
| Comment by Joan Karadimov [ 18/Sep/17 ] | |
|
I've opened this pull request in github with a Unix domain sockets implementation: It has the following features:
| |
| Comment by Boris Petrov [ 07/May/17 ] | |
|
Hello, Sorry for the late answer, I hadn't configured email notifications for this Jira. Well, there's nothing special in my use case - I want to connect to a local MongoDB instance running on the same machine as the Java application. Unix Domain Sockets have (way?) better performance and throughput than TCP ones, and the connection to a DB is definitely something one would want to optimize, so why not use domain sockets? Is there any reason for this to not be implemented (especially if it's not a big deal)? | |
| Comment by Jeffrey Yemin [ 24/Apr/17 ] | |
|
Hi Boris, No, we don't have any current plans to implement support for Unix Domain Sockets. Can you tell us about your use case for it? | |
| Comment by Boris Petrov [ 24/Apr/17 ] | |
|
Any plans for this to be implemented? I tried implementing it only in our code but ServerAddress seems to be hardcoded in too many places and just doing a:
Doesn't work. For example, in version 3.4.2: Maybe if this and similar calls are not using specific overloads of ServerAddress which are for IP/port, domain sockets could be easily implemented in client code. | |
| Comment by Tristan Christopher [ 05/Feb/15 ] | |
|
The junixsocket library is evolved since what is shown in http://code.google.com/p/junixsocket/. It no longer requires native library files to be manually placed in the system's java library path. You just need to include these dependencies. http://mvnrepository.com/artifact/com.kohlschutter.junixsocket/junixsocket-common/2.0.4 | |
| Comment by Jeffrey Yemin [ 12/Jul/13 ] | |
|
In principle, should be able to do this with a custom ConnectionFactory in 3.0 branch. See https://github.com/mongodb/mongo-java-driver/blob/3.0.x/driver/src/main/org/mongodb/connection/ConnectionFactory.java. But I doubt we'll put this in the driver directly since it requires a 3rd party library unless we add support for optional dependencies. |