Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate development mode #374

Open
ikkentim opened this issue Dec 7, 2020 · 2 comments
Open

Deprecate development mode #374

ikkentim opened this issue Dec 7, 2020 · 2 comments
Labels
area-Core Issues related to SampSharp.Core enhancement
Milestone

Comments

@ikkentim
Copy link
Owner

ikkentim commented Dec 7, 2020

Development mode (also known as multi-process mode) provides an option to run SampSharp outside of the samp-server.exe process. It was initially created as the main and only way to run SampSharp. It later transpired that it adds a lot of latency to every single call to a native function.

In response to this problem I've looked into writing a custom .NET Core host which is what we now know as production mode in SampSharp, with the caveat that Linux x86 is not yet officially supported in the .NET runtime.

This means that, at the moment, the communication between the plugin and the .NET environment can happen through two different pipelines: direct interop between the native code and .NET and via a named pipe/domain socket.

With the addition of fast native proxy factories, which can only work on production mode because it relies on direct interop, it became clear that the named pipe/domain socket pipeline contains a number of flaws which render it hard to maintain, such as bugs in native invocation which are difficult to be fixed in the current codebase.

I've therefore decided that it's time to give up the "development" mode in favor of a more maintainable project where hosted mode will also be used in a development environment. See https://sampsharp.net/running-in-production for information on using production mode.

Timeline

  • Add deprecation warning in 0.10.0
  • Update documentation to reflect changes (and generally improvement)
  • Remove development mode in 0.11.0
@Sasino97
Copy link

Sasino97 commented Dec 8, 2020

Will the future development hosted mode support pausing the code, breakpoints, etc..?

@ikkentim
Copy link
Owner Author

ikkentim commented Dec 8, 2020

Yep, that works just fine, you can just attach your debugger. In the project settings for your game mode, under debug, select samp-server.exe as startup executable and your server directory as the startup directory. The debugger will automatically attach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Core Issues related to SampSharp.Core enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants