GithubHelp home page GithubHelp logo

vizor-games / infraworldruntime Goto Github PK

View Code? Open in Web Editor NEW
169.0 169.0 56.0 345 KB

A solution that enables Unreal Engine 4 to work with Google gRPC services from either C++ or Blueprints.

License: Apache License 2.0

C# 5.22% C++ 73.87% Batchfile 4.78% Shell 14.90% C 1.23%
blueprints cpp grpc ue4 unreal-engine

infraworldruntime's People

Contributors

ahorn42 avatar gnomeby avatar koriandrei avatar lsjostro avatar nikomoravec avatar rchehowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

infraworldruntime's Issues

About CastUtils.h unit file

I found I can not include "CastUtils.h" file in my project, if I include, my project could not be successful compiled. I saw the source, it is OK in the model unit file, And Why i can not include this unit file in other unit file by a single way?

How can I generate pb.hpp with namespace?

Hi, this is Erion who is trying to use your graceful work in my project.

I'm following the InfraworldExample and I used InfraworldProtobuild to generate c++ code for proto and it works fine.

However, I've got errors when I tried to add another proto file.

There are lots of global static variables like schemas and they are errors as overlapped definitions in Unreal unity build because Unreal makes single cpp file that includes many cpp files like ProjectName.module_13.cpp

So, I compared my generated wrapper code by protoc to InfraworldExample and I found the differences:

vizor_proto_demostration.pb.hpp of Mine:
...
} ServerTimeResponse_default_instance;
} // namespace vizor_proto_demostration
static void InitDefaultsscc_info_HelloRequest_vizor_5fdemonstration_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
...

vizor_proto_demostration.pb.hpp of InfraworldExample:
...
} ServerTimeResponse_default_instance;
} // namespace vizor_proto_demostration
namespace protobuf_vizor_5fdemonstration_2eproto {
static void InitDefaultsHelloRequest() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
...

And my question is: How can I generated it with namespace like InfraworldExample?

Thank you for reading my question.
Best regards, Erion

Shutdown hangs when there are outstanding RPC calls

While the worker thread is waiting for a response to a call, it can't be shutdown (unless false would be passed to kill(), which is really not a good idea!). A simple way to provoke it is to make a service that takes some time to respond (ie by sleeping a minute or two).

Ideally grpc::ClientContext::TryCancel() should be called on the active context (or contexts if #12 is also considered).

The problem is particularly visible when the server will never respond, then the tread and subsequently the game, will actually never exit.

Error when build platform is Linux.

My environment and setup

VisualStudio: 2017
Platform: Windows 10
UnrealEngine: Custom compiled from github 4.21.2

Issue

Hi, you was make a great job guys. Your plugin compiling for me with Windows platform selected, but when i trying to change and compile Linux platform(dedicated server), compiler throw next errors

<gamedir>/Plugins/InfraworldRuntime/GrpcIncludes/third_party/protobuf/src\google\protobuf/stubs/port.h(98,10): error : non-portable path to file '<ByteSwap.h>'; specified path differs in case from file name on disk [-Werror, -Wnonportable-include-path]
#include <byteswap.h> // IWYU pragma: export
         ^~~~~~~~~~~~
         <ByteSwap.h>

<gamedir>/Plugins/InfraworldRuntime/GrpcIncludes/third_party/protobuf/src\google\protobuf/stubs/port.h(481,47): error : use of undeclared identifier 'bswap_16'
... //other similar errors about undeclared identifier bswap16/bswap32/bswap64

My attempts to fix

I was try to rename byteswap to ByteSwap but nothing did changes. I think clang(v12_clang-6.0.1-centos7) compiler can't understand how include this file.

Also i was try add warning flag in BuildTool for non-portable path to file error, but undeclared identifier errors not gone.

Additional

I just took precompiled binaries from your latest releases. Binaries for Windows and Linux too. I put them to GrpcLibraries and GrpcPrograms folders for both platforms.

Setup problems on windows using vs 2019 on win 10 ue4 engine 4.25.1.

Hi all looking to try to incorporate this into a project i am making as i learn more about the ue4 system. For whatever reason when i follow the steps here i cant seem to get this to integrate into the ue4 source engine. Is there a more updated guild to setting this up?

Compile error in WorkerUtils.h

When I try to compile using a local build version of the latest InfraworldRuntime Plugin, I get the following error in WorkerUtils.h:

Plugins\InfraworldRuntime\Source\InfraworldRuntime\Public\WorkerUtils.h(34): error C2672: 'Invoke': no matching overloaded function found

Can anyone verify that the latest code works for them in a full pipeline or if I should avoid using latest and switch back to 1v.4?

Thanks!

Is it possible to do async RPC calls instead of in order

I noticed that event and responses remain in order, this is might be nice because you know which request triggered which response, but this also introduces latency because they execute in sequence.

Is it possible to do an async request that doesn't have to be in order? Where the request has a response event, instead of having to bind a global event?

To illustrate it I'm gonna call the method CreateItem 10 times, I added some random sleeps on the backend up to 5 seconds to simulate latency.

Lets bind the event:
I'm binding the event

Lets call it 10 times:
Calling it 10 times

This will result in the following output log:

[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 0
[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 1
[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 2
[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 3
[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 4
[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 5
[2019.08.13-17.46.29:393][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 6
[2019.08.13-17.46.29:394][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 7
[2019.08.13-17.46.29:394][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 8
[2019.08.13-17.46.29:394][880]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Send: 9
[2019.08.13-17.46.33:021][148]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 0
[2019.08.13-17.46.36:581][400]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 1
[2019.08.13-17.46.36:581][400]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 2
[2019.08.13-17.46.41:355][647]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 3
[2019.08.13-17.46.44:750][942]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 4
[2019.08.13-17.46.46:079][ 58]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 5
[2019.08.13-17.46.47:634][195]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 6
[2019.08.13-17.46.50:996][491]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 7
[2019.08.13-17.46.55:211][860]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 8
[2019.08.13-17.46.55:826][914]LogBlueprintUserMessages: [BP_GameInstance_C_4] Server: Received: 9

As you can see everything is in order but it took 26 seconds.

link error on Linux

I build grpc on Linux, while build ue4 project, shows following error:

ld.lld: error: duplicate symbol: BN_value_one
>>> defined at bcm.o:(BN_value_one) in archive H:/InfraworldRuntimeExample/Plugins/InfraworldRuntime/GrpcLibraries/Linux/libboringssl.a
>>> defined at bn_lib.c
>>> bn_lib.o:(.text+0xE0) in archive D:/unrealengine/Engine/Source/ThirdParty/OpenSSL/1.1.1c/lib/Linux/x86_64-unknown-linux-gnu/libcrypto.a

Compile for Android

Hey guys,

** EDIT: more clearly articulate the problems I am seeing **
I am trying to compile for Android and am having linking problems that seem to stem from not having a good OpenSSL dependency available in Unreal on Android. It looks like the Http library that unreal uses on Android specifically statically links in its own version of OpenSSL to get around this. The problem is that these symbols pollute the namespace so if I try to do the same thing with gRPC I get duplicate symbol errors.

I tried linking directly against libcurl in my unreal build thus letting my use the statically linked OpenSSL dependency there but the problem I encountered was that they use an older version of OpenSSL than grpc supports (1.0.1s vs 1.1.1).

I ask this here because I feel like this is a problem that users of InfraworldRuntime may have uniquely encountered

UE5 Support

Noticing the following when trying to migrate to UE5 (testing only):

Discovering modules, targets and source code for project...
ERROR: E:\...Plugins\InfraworldRuntime\Source\InfraworldRuntime\InfraWorldRuntime.Build.cs(70,13): error CS1069: The type name 'Regex' could not be found in the namespace 'System.Text.RegularExpressions'. This type has been forwarded to assembly 'System.Text.RegularExpressions, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' Consider adding a reference to that assembly.

No other errors that I can notice during migration of existing project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.